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
remove generator meta tag
function child_manage_woocommerce_styles() { remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); //first check that woo exists to prevent fatal errors if ( function_exists( 'is_woocommerce' ) ) { //dequeue scripts and styles if ( ! is_woocommerce() && ! is_cart() && !...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_generator_meta() {\n\t\tremove_action('wp_head', 'wp_generator');\n\t}", "function wooadmin_remove_woo_commerce_generator_tag()\n{\n remove_action('wp_head',array($GLOBALS['eshopbox'], 'generator'));\n}", "function sunset_remove_meta_version(){\n return '' ;\n}", "public function remove...
[ "0.83115333", "0.71560496", "0.69236887", "0.68502927", "0.68327254", "0.68086493", "0.67820764", "0.66032714", "0.6590257", "0.65888155", "0.64749736", "0.63825434", "0.634984", "0.62173784", "0.61655414", "0.6136781", "0.61357534", "0.609761", "0.60716504", "0.5982813", "0....
0.0
-1
/ Functions with real dynamic content
function echo_summary_view_for_contest($id) { $image = get_corresponding_header_icon_url_for_contest_functionid(get_functionid_for_contestid($id)); echo "<img class=\"summary\" src=\"$image\">"; if (contest_is_upcoming($id)) { echo return_upcoming_contest_info_for_id($id); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function content();", "function content();", "function getContent() ;", "abstract protected function displayContent();", "public function content();", "abstract protected function view_generatePageContent();", "protected function content_template() {}", "protected function content_...
[ "0.73958635", "0.7244878", "0.715818", "0.7072995", "0.70001614", "0.69993204", "0.6981715", "0.6981715", "0.69708335", "0.6883392", "0.6775866", "0.6716481", "0.66473573", "0.6608085", "0.6605489", "0.6605489", "0.6605489", "0.6605489", "0.6605489", "0.6605489", "0.6605489",...
0.0
-1
/ More Static ones here..
function echo_contest_summary_for_id($id) { echo_summary_view_for_contest($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function static_things()\n\t{\n\n\t\t# code...\n\t}", "public function helper()\n\t{\n\t\n\t}", "private function _i() {\n }", "private function __() {\n }", "protected function init()\n\t{\n\t\t\n\t}", "public function init() {\t\t\n\n }", "static public function init() {\n }",...
[ "0.738008", "0.67231965", "0.62631583", "0.6245449", "0.61097896", "0.6073725", "0.6050689", "0.6047523", "0.6024668", "0.6015519", "0.6001484", "0.59837675", "0.5918047", "0.5902412", "0.589915", "0.5892147", "0.58873355", "0.58873355", "0.58873355", "0.58873355", "0.5887335...
0.0
-1
Display a listing of the resource.
public function index() { // $data=Peminjaman::with('buku','anggota')->get(); return view('Peminjaman.index',compact('data')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // $data=Peminjaman::all(); $data1=Buku::all(); $data2=Anggota::all(); return view('Peminjaman.tambah',compact('data','data1','data2')); }
{ "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 $peminjaman) { // $aturan=[ 'buku_id'=>'numeric', 'anggota_id'=>'numeric' ]; $pesan=[ 'numeric'=>'wajib di isi' ]; $this->validate($peminjaman,$aturan,$pesan); Peminjaman::create($peminjaman->al...
{ "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(Peminjaman $peminjaman) { // }
{ "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.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // $pin =Peminjaman::find($id); $data1=Buku::all(); $data2=Anggota::all(); return view('Peminjaman.ubah', compact('pin','data1','data2')); }
{ "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 $peminjaman,$id) { // $aturan=[ 'buku_id'=>'numeric', 'anggota_id'=>'numeric' ]; $pesan=[ 'numeric'=>'wajib di isi' ]; $this->validate($peminjaman,$aturan,$pesan); $pin = $peminjaman->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // Peminjaman::find($id)->delete(); return redirect('peminjaman'); }
{ "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
Return an associative array of all storable object properties, with references to the actual object property values.
public function &getProperties($includePrimaryKey = false) { $pk =& $this->primaryKey; $props = array(); foreach($this->__reflection()->getProperties() as $prop) { if($prop->isPublic() && !$prop->isStatic()) { $name = $prop->getName(); if(!$includePrimaryKey && $name == $pk) continue; $pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllProperties(): array\n {\n return get_object_vars($this);\n }", "public function get_properties()\r\n\t{\r\n\t\treturn get_object_vars($this);\r\n\t}", "public function getProperties()\n {\n return get_object_vars($this);\n }", "public function getProperties(): ...
[ "0.7882886", "0.73982847", "0.7386481", "0.7196698", "0.7188134", "0.7149823", "0.70256364", "0.6848243", "0.68415624", "0.6803964", "0.68035597", "0.67745614", "0.6747662", "0.6737376", "0.6734362", "0.67330337", "0.67230314", "0.67230314", "0.67230314", "0.67230314", "0.672...
0.0
-1
Pre update event process
public function preUpdate(PreUpdateEventArgs $args) { $entity = $args->getEntity(); $user = $this->getUser(); if (!$entity instanceof ContainUpdaterInterface || !$user) { return $this; } $entity->setUpdatedBy($user); $em = $args->getEntityManager(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _preupdate() {\n }", "public function preUpdate()\n {\n }", "public function preUpdateCallback()\n {\n $this->performPreUpdateCallback();\n }", "public function preUpdateCallback()\n {\n $this->performPreUpdateCallback();\n }", "function before_update()...
[ "0.8488921", "0.8399765", "0.8119015", "0.8119015", "0.7975724", "0.775655", "0.775655", "0.7678696", "0.7644174", "0.759656", "0.7551708", "0.7550216", "0.7550216", "0.74956584", "0.74874127", "0.74802184", "0.7421554", "0.7375182", "0.7331969", "0.73059535", "0.7263406", ...
0.0
-1
Pre persist event process
public function prePersist(LifecycleEventArgs $args) { $entity = $args->getEntity(); $user = $this->getUser(); if (!$entity instanceof ContainAuthorInterface || !$user) { return $this; } $entity->setCreatedBy($user); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prePersistCallback()\n {\n $this->performPrePersistCallback();\n }", "public function prePersistCallback()\n {\n $this->performPrePersistCallback();\n }", "public function prePersist()\n {\n }", "public function preSave() {}", "public function preSave() { }",...
[ "0.7314062", "0.7314062", "0.7176485", "0.71491396", "0.7013928", "0.6928474", "0.6805932", "0.6805932", "0.67344964", "0.67279154", "0.66322744", "0.6624566", "0.66186696", "0.6614982", "0.6612773", "0.66007257", "0.65774405", "0.6570396", "0.65577745", "0.6542936", "0.65323...
0.0
-1
Get the registered name of the component.
protected static function getFacadeAccessor() { return 'profil-pengguna'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getComponentName()\n {\n return $this->_componentName;\n }", "public function getComponentName()\n {\n $component = $this->argument('component') ?: app('components')->getUsedNow();\n\n $component = app('components')->findOrFail($component);\n\n return $compone...
[ "0.8145252", "0.81059104", "0.79843503", "0.7875069", "0.7621859", "0.71461004", "0.7101458", "0.705496", "0.705496", "0.705496", "0.705496", "0.705496", "0.705496", "0.705496", "0.70394325", "0.70209575", "0.69877225", "0.69877225", "0.69877225", "0.6984164", "0.6965933", ...
0.0
-1
Lists all Event models.
public function actionIndex() { Yii::$app->cache->gc(true); $searchModel = new EventSearchForm(); $query = Event::find()->where(['>=', 'UNIX_TIMESTAMP(end_date)', time()]); $query = $query->joinWith('user'); $pagination = new Pagination([ 'defaultPageSize' => 1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function all()\n {\n $model = new Event();\n $events = $model->readAll();\n return ['events'=>$events];\n }", "public function index()\n {\n return Event::all();\n }", "public static function list_events()\n\t{\n\t\treturn cms_orm('CmsDatabaseEvent')->find_all(arr...
[ "0.77450883", "0.7733477", "0.7713843", "0.767619", "0.74362737", "0.72278905", "0.7187115", "0.71243876", "0.7094248", "0.7068907", "0.70083624", "0.69831514", "0.6962089", "0.6957023", "0.69384605", "0.6919972", "0.69112074", "0.689187", "0.6839851", "0.68231994", "0.681498...
0.6794318
22
Load Goa party from goabase api
public function actionLoadgoaparty($id){ $goaBaseApi = new GoaBaseApi(); $goaParty = $goaBaseApi->getParty($id); return $this->render('goaparty', ['party' => $goaParty]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function partyByName($party_name)\n {\n // ASCII = english name\n // UTF-8 = greek name\n if (mb_detect_encoding($party_name) == 'ASCII') {\n $party = Party::where('fullname_en', '=', $party_name)->first();\n } else if (mb_detect_encoding($party_name) == 'UTF-8') {\...
[ "0.5505238", "0.5182065", "0.5158959", "0.51213515", "0.5101965", "0.4982141", "0.49760327", "0.49708676", "0.49707845", "0.49644774", "0.49644774", "0.49644774", "0.49644774", "0.49644774", "0.49644774", "0.49644774", "0.49644774", "0.49644774", "0.49644774", "0.49644774", "...
0.5724518
0
Displays a single Event model.
public function actionView($id) { $model = $this->findModel($id); $socialMediaModels = SocialMedia::find()->where(['event_id' => $id])->orderBy('id')->all(); ++$model->clicks; $model->update(); // make "linked" link for hashtags foreach ($socialMediaModels as $soci...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view...
[ "0.80864143", "0.7893261", "0.7711113", "0.7711113", "0.74939424", "0.74646515", "0.74646515", "0.74646515", "0.7390202", "0.7303332", "0.73020774", "0.72810096", "0.7261841", "0.72399926", "0.72249234", "0.71939045", "0.7187111", "0.7161048", "0.71340775", "0.7092115", "0.70...
0.0
-1
Creates a new Event model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreate() { if (Yii::$app->user->can('admin')) { throw new ForbiddenHttpException('You are not allowed to perform this action.'); } $model = new Event(); $socialMediaModels = []; $model->max_num_socialMedia = 20; $model->num_socialM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new Event();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\...
[ "0.8578604", "0.84373766", "0.82750595", "0.8127694", "0.7517022", "0.7287367", "0.7137557", "0.711212", "0.7088466", "0.70688343", "0.70607364", "0.703428", "0.7027968", "0.7027968", "0.70162916", "0.6993274", "0.6986412", "0.69775426", "0.6966218", "0.6966218", "0.6966218",...
0.6411049
77
Updates an existing Event model. If update is successful, the browser will be redirected to the 'view' page.
public function actionUpdate($id) { $model = $this->findModel($id); if (Yii::$app->user->can('admin') || (Yii::$app->user->id != $model->user_id)) { throw new ForbiddenHttpException('You are not allowed to perform this action.'); } /*if ($model->user_id !== Yii::$app->u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Events']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Events'];\n\t\t\tif($model->save())\n\t\t\t\t$this->r...
[ "0.7461516", "0.7337306", "0.72270215", "0.71775776", "0.71349293", "0.6980152", "0.6952172", "0.6871746", "0.6838319", "0.65652776", "0.65471834", "0.65352964", "0.65216005", "0.64700586", "0.63878757", "0.63759995", "0.63706136", "0.63603544", "0.63419336", "0.6339927", "0....
0.0
-1
Creates a new Social Media Link. If creation is successful, the browser will be redirected to the 'view' page.
public function actionLink($id) { $model = $this->findModel($id); if (Yii::$app->user->id == $model->user_id) { return $this->redirect(['update', 'id' => $id]); } $socialMediaModels = SocialMedia::find()->where(['event_id' => $id])->orderBy('id')->all(); // mak...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return view('backend.pages.social_links.create');\n }", "public function create(){\n $dataReceiveFromPost = array(\n 'socialMedia' => $this->input->post(\"socialMedia\"),\n 'url' => $this->input->post(\"url\"),\n );\n $resultS...
[ "0.7152225", "0.7032875", "0.6740546", "0.6729699", "0.66965824", "0.6678348", "0.6600189", "0.6565194", "0.65465164", "0.6517087", "0.6516304", "0.64939463", "0.646906", "0.64464754", "0.6410109", "0.6380649", "0.637872", "0.6358425", "0.6327149", "0.6298797", "0.6222172", ...
0.61585116
25
Deletes an existing Event model. If deletion is successful, the browser will be redirected to the 'index' page.
public function actionDelete($id) { $model = $this->findModel($id); if (!Yii::$app->user->can('admin') && Yii::$app->user->id != $model->user_id) { throw new ForbiddenHttpException('You are not allowed to perform this action.'); } $model->deleteImage($model->image); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() {\n\n $id = $this->uri->segment(4);\n $this->events_model->delete_event($id);\n redirect('admin/events');\n\n }", "public function delete(){\r\n\t\t// Check for request forgeries\r\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\r\n\t\r\n\t\t// G...
[ "0.7811307", "0.75612575", "0.7403664", "0.730768", "0.71056336", "0.7098973", "0.708466", "0.70354104", "0.6990566", "0.6836926", "0.68230855", "0.68192375", "0.67750746", "0.6712019", "0.6699232", "0.6695821", "0.66951805", "0.66598684", "0.6617327", "0.6560723", "0.6555088...
0.0
-1
Is called by the cron job, checks if a cronjob is running and reloads all social media content.
public function actionCron() { if (!Yii::$app->cache->get('cron')) { Yii::$app->cache->set('cron', true); try { $eventModels = Event::find()->all(); foreach ($eventModels as $eventModel) { $socialMediaModels = SocialMedia::find()->where...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cron()\n\t{\n\t\tglobal $wpdb,\n\t\t\t\t\t $wgobd_importer_helper,\n\t\t\t\t\t $wgobd_events_helper,\n\t\t\t\t\t $wgobd_settings_controller;\n\n\t\t// ====================\n\t\t// = Select all feeds =\n\t\t// ====================\n\t\t$table_name = $wpdb->prefix . 'wgobd_event_feeds';\n\t\t$sql = \"SELECT...
[ "0.62960064", "0.6002295", "0.59985125", "0.59789884", "0.5807026", "0.57494456", "0.5748267", "0.5744877", "0.5737135", "0.57294106", "0.5722282", "0.5692741", "0.5669009", "0.5638065", "0.559893", "0.5586244", "0.55589575", "0.54940087", "0.54729044", "0.5446612", "0.543938...
0.6509287
0
Finds the Event model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (($model = Event::findOne($id)) != null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function findModel($id)\r\n {\r\n if (($model = Events::findOne($id)) !== null) {\r\n return $model;\r\n }\r\n\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }", "protected function findModel($id)\n {\n if (($model = EventT...
[ "0.6909712", "0.6859031", "0.6736683", "0.6736683", "0.6736683", "0.67142", "0.6704311", "0.6654512", "0.6620141", "0.6618055", "0.6618055", "0.65298706", "0.65207946", "0.64376724", "0.6415396", "0.6344483", "0.6304588", "0.6302471", "0.6189635", "0.61583847", "0.61404026", ...
0.673747
2
Checks if socialmedia is in the cache, else loads social media content.
public function findSocialMedia($id, $socialMediaModels) { //todo als Cron-Job oder ähnliches //Yii::$app->cache->gc(true); if (!Yii::$app->cache->get('socialmedia' . $id)) { $socialMediaApi = new SocialMediaApi(); foreach ($socialMediaModels as $key => $socialMediaModel) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function inCache()\n\t{\n\t\t$content = $this->_cache->retrieve($this->redditid); //faster if we have it in cache already\n\t\treturn $content;\n\t}", "public function isCached() {}", "public function isCached(): bool;", "function have_social_media(){\n\t$social_media = get_social_media();\n\treturn ...
[ "0.60945153", "0.60057694", "0.58437186", "0.5834118", "0.580944", "0.5786", "0.5685354", "0.56390876", "0.56099904", "0.55999047", "0.55372965", "0.5497684", "0.5483717", "0.54763114", "0.5426461", "0.5413291", "0.5395933", "0.5383037", "0.5381986", "0.5359928", "0.53350496"...
0.5042607
48
Sort date from eventList
private function sortEventList($eventList){ $anz = count($eventList); $temp=""; for ($a = 0; $a < $anz; $a++) { for ($b = 0; $b < $anz -2; $b++) { if ($eventList[$b +1]->start_date < $eventList[$b]->start_date) { $temp = $eventList[$b]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_sort_event_list()\n\t{\n\t$temp = $this->get_event_list();\n\tif (!empty($temp))\n\t{\n\t\tusort($temp, [&$this, \"ical_dtstart_compare\"]);\n\t\treturn $temp;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n\t}", "public function sort_projects_by_date ()\n {\n\n }", "public function getSo...
[ "0.74938416", "0.65839666", "0.6485", "0.6463082", "0.63868636", "0.6334563", "0.6244892", "0.6176524", "0.6129585", "0.60245866", "0.60062766", "0.6005522", "0.5977371", "0.5972849", "0.5971844", "0.59616023", "0.5933118", "0.59314245", "0.59272987", "0.5795483", "0.5784241"...
0.81565565
0
/ Make sure the caller has rate quota left and use it if needed. This module must be called after the user data has been assigned into the endpoint (ie. after APIAuthModule).
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_user_over_quota()\n {\n }", "public function testRateLimit()\n {\n $this->markTestIncomplete('Not yet implemented.');\n }", "protected function get_email_rate_limit()\n {\n }", "public function checkCreditLimit() {\n \n Mage::getModel(...
[ "0.7122056", "0.62184715", "0.6156436", "0.61009866", "0.6100634", "0.6031333", "0.59737915", "0.5951008", "0.59188646", "0.5908091", "0.5905105", "0.5887422", "0.5887422", "0.5873192", "0.58711934", "0.5842104", "0.58123475", "0.58123475", "0.58123475", "0.58123475", "0.5811...
0.0
-1
Use API rate quota if required.
public function run(APIEndpoint $endpoint) { if (!$endpoint->requires_quota()) { return; } $quota = $endpoint->get_caller()->get_quota(); if ($quota->has_state('api_t_start')) { $t = $quota->get_state('api_t_start'); if (time() - $t >= gtlim('API_RATE_T')) { // Reset rate quota and time after the cutof...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rate($rate)\n {\n // Update API Rate Limiter\n $this->rate = $rate;\n }", "protected function configureRateLimiting(): void\n {\n RateLimiter::for('api', function (Request $request) {\n return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip(...
[ "0.65724987", "0.65363127", "0.65363127", "0.64696", "0.64696", "0.64696", "0.64696", "0.64502174", "0.6439209", "0.62942404", "0.6243948", "0.6157251", "0.6133878", "0.61255085", "0.6124383", "0.6027495", "0.6019407", "0.5970086", "0.59656316", "0.5936998", "0.590452", "0....
0.5956218
19
Returns the corresponding parent.
abstract public function parent();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_parent() {\n\t\treturn $this->parent();\n\t}", "public function get_parent();", "protected function get_parent()\r\n {\r\n return $this->parent;\r\n }", "function get_parent() {\n return $this->get_mapped_property('parent');\n }", "public function getParent()\n ...
[ "0.8761789", "0.8725119", "0.867668", "0.8497202", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "0.84284776", "...
0.0
-1
Use known routes instead of find routes recursively
private function _getFromKnownRoutes($source, $userRole){ // pr($userRole);die; $knownRoutes = [ 'Expert' => [ 'Appointments' => ['Users','Experts'], 'Conversations' => ['Users','Experts'] ], 'User' => [] ]; if(isset(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function load_routes() {\n\n // 1. plugins routes\n foreach($this->context->plugins() as $plugin) {\n \n if(false === $plugin->is_type('IRoutesPlugin')) continue;\n\n foreach($plugin->routes() as $route_value) {\n $this->routes[]= $route_value;\n }\n }\n\n // 2. confi...
[ "0.7215689", "0.7088724", "0.69434935", "0.6906194", "0.6901884", "0.68630147", "0.6826024", "0.6720935", "0.6720935", "0.66849315", "0.66722447", "0.66722447", "0.6663022", "0.6657879", "0.66372544", "0.66244894", "0.6620528", "0.6606545", "0.6603113", "0.6599434", "0.656110...
0.0
-1
function to ignore the role Access for common apis for both Expert and Customers
private function _ignoreRoleAccess($prefix){ if($prefix){ $commonApis = [ 'api' => [ 'Users' => ['addPhone'], 'UserDeviceTokens' => ['add','edit'], 'SpecializationServices' => ['index'], 'ExpertSpecializa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rol_conductor_not_access()\n {\n if ($this->rol != 1 && $this->rol != 2) {\n exit($this->httpResponse(\"error\", \"forbbiden\", \"Your role do not have permission\", 403)->json());\n }\n }", "public function rol_conductor_only_access()\n {\n if ($this->rol...
[ "0.6486725", "0.63079035", "0.62683296", "0.6145359", "0.6128574", "0.60971445", "0.6065098", "0.6021666", "0.6021666", "0.59413856", "0.59299886", "0.59209114", "0.58816683", "0.58645564", "0.5860146", "0.58368206", "0.58193684", "0.5787158", "0.5736261", "0.57143116", "0.56...
0.66071016
0
method to check wether current controller & action matches some list of un authorized controllers
private function _checkUnAuthorized($unAuthorizedLocations){ if(isset($unAuthorizedLocations[$this->reqController])){ if($unAuthorizedLocations[$this->reqController][0] == 'all' || in_array($this->reqAction, $unAuthorizedLocations[$this->reqController])){ return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isAllowed() {\n\t\treturn $this->allowedActions == array('*') ||\n\t\t\t\tin_array($this->_request->params['action'], array_map('strtolower', $this->allowedActions));\n\t}", "private function isAllowed() {\n $allowed = array(\n \"rss\" => array(\"feed\"),\n \"torre...
[ "0.72284794", "0.7045802", "0.6968813", "0.6601951", "0.6561469", "0.6438388", "0.641015", "0.63915116", "0.6387289", "0.6377999", "0.6369382", "0.6353566", "0.63106054", "0.62579525", "0.61957026", "0.6193204", "0.61681736", "0.61679536", "0.61679536", "0.6160561", "0.615997...
0.58839923
39
method to get unauthorized locations for current user based on the resource ownership of the vendor
private function _checkOwnerShip($targetId, $userRole, $entityId){ $target = 'Users'; $associationRoute = $this->_getFromKnownRoutes($this->reqController, $userRole); if(!$associationRoute){ $associationRoute = $this->_getAssociationRoute($this->reqController, $target, [], []...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n if (Auth::check()){//The user is logged in\n //Show all current managers associated to owner\n\n $managers = User::where('account_owner', Auth::user() -> id)\n ->where('user_role', 2)\n ->orderBy('name', 'desc')\n ...
[ "0.6630221", "0.57750076", "0.5684562", "0.55618614", "0.5341715", "0.5269406", "0.5243142", "0.5201039", "0.51915646", "0.5186802", "0.5152518", "0.5141708", "0.5141471", "0.51251006", "0.509583", "0.5089354", "0.5084619", "0.5062845", "0.5049751", "0.5042079", "0.5038659", ...
0.0
-1
Calculates an association route between source and target model
private function _getAssociationRoute($source, $target, $route, $exclude){ if($source == $target) { return $target; } $tableObject = TableRegistry::get($source); $entityClass = $tableObject->entityClass(); $entityClass = (new \ReflectionClass($...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destinations(){\n $this->belongsToMany(Destination::class);\n }", "public function route(){\n\n\t\t// belongsTo(RelatedModel, foreignKey = route_id, keyOnRelatedModel = id)\n\t\treturn $this->belongsTo(Route::class);\n\t}", "public function link($from,$to)\n {\n //\n ...
[ "0.54888225", "0.54252654", "0.53722924", "0.53400636", "0.52018255", "0.5178212", "0.51626736", "0.51306427", "0.5101064", "0.49980292", "0.49609435", "0.49051705", "0.48482326", "0.4824491", "0.48200256", "0.47924343", "0.47924343", "0.47924343", "0.47924343", "0.47924343", ...
0.6623788
0
Check the session for previously entered form data.
protected function loadFormData() { $app = JFactory::getApplication(); $data = $app->getUserState('com_jvisualcontent.edit.extrafield.data', array()); if (empty($data)) { $data = $this->getItem(); } $this->preprocessData('com_jvisualcontent.extrafield', $data); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function InitIsValidPost() \r\n\t{\t\t\r\n\t\t$sVar = (isset($_POST['__SVar']) ? $_POST['__SVar'] : ( isset($_GET['__SVar']) ? $_GET['__SVar'] : \"\" ));\r\n\r\n\t\t$this->isValidPost = ($sVar == $_SESSION['myHiddenVar']);\r\n\r\n\t\tSession::SessionInit($mySessionVar);\r\n\r\n\t\treturn $this->isValidPost;...
[ "0.6498352", "0.6336637", "0.62124085", "0.6132207", "0.6114657", "0.60743725", "0.6069858", "0.60587907", "0.6043341", "0.6013429", "0.6007634", "0.6000854", "0.5997324", "0.59227365", "0.5922305", "0.590197", "0.58918464", "0.58865273", "0.5857186", "0.5856016", "0.58518445...
0.0
-1
For methods that require Auth Adding Middle Layer to authenticate every request Checking if the request has valid api key as part of the parameters
function authenticate(\Slim\Route $route) { // Getting request headers //$headers = apache_request_headers(); $response = array(); $app = \Slim\Slim::getInstance(); $apiKey = $app->request->params('apikey'); // Verifying Authorization Header if (isset($apiKey)) { $db = new DbHandler...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function authenticate(\\Slim\\Route $route) {\r\n // getting request header\r\n $headers = apache_request_headers();\r\n $response = array();\r\n $app = \\Slim\\Slim::getInstance();\r\n // verifying authorization header\r\n \r\n if (isset($headers['Authorization'])) {\r\n // $db = new DbHandler();\r\n /...
[ "0.7394396", "0.7387564", "0.7354594", "0.73307085", "0.732884", "0.732884", "0.732862", "0.72336626", "0.7229021", "0.71814793", "0.70410246", "0.6886968", "0.6789589", "0.6789589", "0.66653436", "0.65309656", "0.6482107", "0.64532775", "0.6401184", "0.63812876", "0.6373667"...
0.7400555
0
Register new JOIN with specified type with set of on conditions (linking one table to another, no parametric on conditions allowed here).
public function join($type, $table, $on = null) { $this->joinTokens[$this->activeJoin = $table] = ['type' => strtoupper($type), 'on' => []]; return call_user_func_array([$this, 'on'], array_slice(func_get_args(), 2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addJoin($type, $table, $alias = NULL, $condition = NULL, $arguments = []);", "public function set_join($table_or_alias, $on = null, $type='LEFT')\n { \n $table = $this->getJoinableTable($table_or_alias);\n if(!$this->is_used_table($table))\n {\n $table = (Morm...
[ "0.759629", "0.7317749", "0.71656543", "0.7034575", "0.6906883", "0.66534823", "0.66329795", "0.658463", "0.6429498", "0.6390415", "0.63331795", "0.632487", "0.63027173", "0.6288177", "0.62751377", "0.62631816", "0.6245539", "0.6235607", "0.6204659", "0.6176801", "0.6175807",...
0.66332775
6
Register new INNER JOIN with set of on conditions (linking one table to another, no parametric on conditions allowed here).
public function innerJoin($table, $on = null) { $this->joinTokens[$this->activeJoin = $table] = ['type' => 'INNER', 'on' => []]; return call_user_func_array([$this, 'on'], array_slice(func_get_args(), 1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function innerJoin($table, $conditions = []);", "public function joinOn($tableJoin, $columnJoin, $tableOn, $columnOn);", "private function addJoinOnClause($other, $type, $onClause) {\r\n\t\tif (is_array($onClause)) {\r\n\t\t\t$onClause=implode(' ', $onClause);\r\n\t\t}\r\n\t\tif (count($this->_salt_join...
[ "0.67993444", "0.63841873", "0.62103987", "0.6159764", "0.6095986", "0.60927427", "0.6042208", "0.6017697", "0.5971336", "0.596147", "0.5944028", "0.59108245", "0.59045464", "0.5901086", "0.58964753", "0.5883165", "0.58322394", "0.5820531", "0.5813977", "0.57628953", "0.57608...
0.5798907
19
Register new RIGHT JOIN with set of on conditions (linking one table to another, no parametric on conditions allowed here).
public function rightJoin($table, $on = null) { $this->joinTokens[$this->activeJoin = $table] = ['type' => 'RIGHT', 'on' => []]; return call_user_func_array([$this, 'on'], array_slice(func_get_args(), 1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rightJoin($table, $conditions = []);", "function rightJoin($conditions)\n\t{\n\t\treturn $this->join('RIGHT', $conditions);\n\t}", "public static function rightJoin($source, $on, $alias = null, array $bindings = []);", "public function rightJoin($table, $key, ?string $operator = null, $foreig...
[ "0.75426203", "0.6993322", "0.6663103", "0.66162723", "0.655545", "0.64825094", "0.6346379", "0.61344033", "0.6092237", "0.6002024", "0.59078836", "0.5905868", "0.59005636", "0.59003294", "0.58639234", "0.5802059", "0.5767909", "0.5750758", "0.5744014", "0.5729698", "0.572581...
0.6469522
6
Register new LEFT JOIN with set of on conditions (linking one table to another, no parametric on conditions allowed here).
public function leftJoin($table, $on = null) { $this->joinTokens[$this->activeJoin = $table] = ['type' => 'LEFT', 'on' => []]; return call_user_func_array([$this, 'on'], array_slice(func_get_args(), 1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function leftJoin($table, $conditions = []);", "public function leftJoin($table, $alias = NULL, $condition = NULL, $arguments = []);", "public static function leftJoin($source, $on, $alias = null, array $bindings = []);", "function leftJoin($conditions)\n\t{\n\t\treturn $this->join('LEFT', $conditions...
[ "0.75580126", "0.723384", "0.6936638", "0.68953705", "0.67973894", "0.67409563", "0.6729952", "0.66230464", "0.6607875", "0.64992785", "0.6400107", "0.6260476", "0.6236505", "0.6222576", "0.6211636", "0.61573154", "0.6120269", "0.61052996", "0.60741925", "0.6011203", "0.59848...
0.6800365
4
Register new FULL JOIN with set of on conditions (linking one table to another, no parametric on conditions allowed here).
public function fullJoin($table, $on = null) { $this->joinTokens[$this->activeJoin = $table] = ['type' => 'FULL', 'on' => []]; return call_user_func_array([$this, 'on'], array_slice(func_get_args(), 1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fullOuterJoin($table);", "public function leftJoin($table, $conditions = []);", "public function join($table, $on, $field = null, $comparitor = null);", "public function joinOn($tableJoin, $columnJoin, $tableOn, $columnOn);", "public function set_join($table_or_alias, $on = null, $type='LEF...
[ "0.5942434", "0.5643703", "0.55640864", "0.55603325", "0.5541785", "0.53078884", "0.5291819", "0.5225621", "0.5197811", "0.51808584", "0.51302886", "0.51093346", "0.5107836", "0.5074838", "0.50630224", "0.50248724", "0.49944013", "0.49753523", "0.49329835", "0.49230638", "0.4...
0.64135015
0
Simple ON condition with various set of arguments. Can only be used to link column values together, no parametric values allowed.
public function on($joined = null, $operator = null, $outer = null) { $this->whereToken( 'AND', func_get_args(), $this->joinTokens[$this->activeJoin]['on'], $this->onWrapper() ); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOn($on = null): void\n {\n if (null !== $on) {\n if (self::CROSS === $this->p_type) {\n throw new InvalidArgumentException('No join conditions are allowed for CROSS JOIN');\n } elseif (!empty($this->p_natural) || !empty($this->p_using)) {\n ...
[ "0.6634879", "0.638205", "0.6163566", "0.59587705", "0.59395903", "0.59362954", "0.5868449", "0.5858704", "0.5756276", "0.56096816", "0.55098665", "0.5501396", "0.5479497", "0.5459679", "0.54548246", "0.5427898", "0.5417509", "0.5366299", "0.5338554", "0.53203535", "0.5317379...
0.51672
26
Simple AND ON condition with various set of arguments. Can only be used to link column values together, no parametric values allowed.
public function andOn($joined = null, $operator = null, $outer = null) { $this->whereToken( 'AND', func_get_args(), $this->joinTokens[$this->activeJoin]['on'], $this->onWrapper() ); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function logicalAND(){\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('AND', $values);\n\t}", "public function andWhere($col, $operator = self::NO_OPERATOR, $value = self::NO_VALUE);", "public function whereAND()\n ...
[ "0.75649023", "0.6955614", "0.6759863", "0.66151446", "0.6552937", "0.6537053", "0.65040386", "0.64872473", "0.64791954", "0.6450177", "0.638853", "0.6384082", "0.632392", "0.6207506", "0.6198633", "0.61416954", "0.6119272", "0.6106958", "0.610402", "0.6074517", "0.6070675", ...
0.6064994
21
Simple OR ON condition with various set of arguments. Can only be used to link column values together, no parametric values allowed.
public function orOn($joined = null, $operator = null, $outer = null) { $this->whereToken( 'AND', func_get_args(), $this->joinTokens[$this->activeJoin]['on'], $this->onWrapper() ); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 orWhere()\r\n {\r\n $arguments = func_get_args();\r\n $columnName = array_shift($arguments);\r\n $...
[ "0.7143903", "0.7027942", "0.69334835", "0.6727424", "0.66723424", "0.66529894", "0.66154176", "0.6558359", "0.6479069", "0.64590067", "0.6384072", "0.6356165", "0.63420206", "0.6311057", "0.62997836", "0.61352277", "0.61336637", "0.6122162", "0.60913664", "0.60602856", "0.60...
0.57306653
42
Simple ON WHERE condition with various set of arguments. You can use parametric values in such methods.
public function onWhere($joined, $variousA = null, $variousB = null, $variousC = null) { $this->whereToken( 'AND', func_get_args(), $this->joinTokens[$this->activeJoin]['on'], $this->whereWrapper() ); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function on($column1,$column2,$operator = \"=\");", "public function where() {\r\n\t\t$args = func_get_args();\r\n\t\treturn call_user_func_array(array($this, 'andWhere'), $args);\r\n\t}", "public function where()\n {\n $args = func_get_args();\n $num_args = count($args);\n \n // Custom que...
[ "0.64103115", "0.63773274", "0.6247565", "0.6137387", "0.609356", "0.6028849", "0.6018295", "0.60128963", "0.59937614", "0.59906906", "0.5977416", "0.5935582", "0.5852484", "0.5849529", "0.5820011", "0.58146423", "0.5781572", "0.5767845", "0.57545954", "0.5751849", "0.5714854...
0.53193945
76
Simple AND ON WHERE condition with various set of arguments. You can use parametric values in such methods.
public function andOnWhere($joined, $variousA = null, $variousB = null, $variousC = null) { $this->whereToken( 'AND', func_get_args(), $this->joinTokens[$this->activeJoin]['on'], $this->whereWrapper() ); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function logicalAND(){\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('AND', $values);\n\t}", "public function where() {\r\n\t\t$args = func_get_args();\r\n\t\treturn call_user_func_array(array($this, 'andWhere'), $ar...
[ "0.75843495", "0.7573578", "0.7350388", "0.73310894", "0.72500384", "0.724184", "0.7013795", "0.69916445", "0.6983285", "0.6950905", "0.6928973", "0.68072873", "0.6709135", "0.66775686", "0.6546578", "0.6536436", "0.64954984", "0.6472122", "0.6408446", "0.6403547", "0.6394007...
0.61776865
37
Simple OR ON WHERE condition with various set of arguments. You can use parametric values in such methods.
public function orOnWhere($joined, $variousA = null, $variousB = null, $variousC = null) { $this->whereToken( 'AND', func_get_args(), $this->joinTokens[$this->activeJoin]['on'], $this->whereWrapper() ); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function orWhere() {\r\n\t\t$args = func_get_args();\r\n\t\tif (count($this->_wheres)) {\r\n\t\t\t$criteria = call_user_func_array(array($this->_wheres[count($this->_wheres)- 1], 'orWhere'), $args);\r\n\t\t} else {\r\n\t\t\t$statement = array_shift($args);\r\n\t\t\t$criteria = new Dbi_Sql_Criteria($this, ne...
[ "0.7623725", "0.76085687", "0.75495446", "0.74845964", "0.73583275", "0.7328685", "0.73284024", "0.71745545", "0.7143103", "0.713291", "0.71285325", "0.71018136", "0.70872205", "0.7068401", "0.6976912", "0.6925852", "0.6902818", "0.6867711", "0.6844337", "0.6831796", "0.67989...
0.61038417
67
Convert various amount of where function arguments into valid where token.
abstract protected function whereToken( $joiner, array $parameters, &$tokens = [], callable $wrapper );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processedWhereClause($where) {\n\t$x = explode(\" \", $where);\n\t$temp_where = \"\";\n\tforeach($x as $value) {\n\t\t$temp_where .= \" \";\n\t\tif(strpos($value, \"=\")) {\n\t\t\t$kv = explode(\"=\", $value);\n\t\t\t$temp_where .= $kv[0] . \"='\" . $kv[1] . \"'\";\n\t\t} else {\n\t\t\t$temp_where .= $val...
[ "0.69939864", "0.6761625", "0.656423", "0.65481263", "0.65106976", "0.63381374", "0.63313335", "0.6329169", "0.62272376", "0.6218739", "0.6154451", "0.61227334", "0.6104862", "0.6083068", "0.6053338", "0.5975394", "0.5925017", "0.59222424", "0.5916025", "0.59108937", "0.58707...
0.5606135
35
Convert parameters used in JOIN ON statements into sql expressions.
private function onWrapper() { return function ($parameter) { if ($parameter instanceof FragmentInterface) { return $parameter; } return new Expression($parameter); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function buildJoinClause() {\r\n\t\t$sql='';\r\n\t\tif (count($this->_salt_joins)>0) {\r\n\t\t\tforeach($this->_salt_joins as $alias => $join) {\r\n\t\t\t\t$sql.=' '.$join['type'].' JOIN '.$join['table'].' ON '.implode(' ', $join['on']);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $sql;\r\n\t}", "private static ...
[ "0.67143553", "0.6678323", "0.6659047", "0.6504775", "0.63145536", "0.62844163", "0.62645155", "0.6199933", "0.6198333", "0.6152015", "0.6110812", "0.60860515", "0.6075788", "0.60554844", "0.6030637", "0.60255474", "0.6021137", "0.59971225", "0.5988982", "0.59823924", "0.5978...
0.0
-1
Applied to every potential parameter while ON WHERE tokens generation.
private function whereWrapper() { return function ($parameter) { if ($parameter instanceof FragmentInterface) { //We are only not creating bindings for plan fragments if (!$parameter instanceof ParameterInterface && !$parameter instanceof QueryBuilder) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function parseFilterParams(): void\n {\n\n $this->parseFilters();\n\n $where = $this->uriParser->whereParameters();\n\n if (empty($where)) {\n return;\n }\n\n /** @scrutinizer ignore-call */\n $tableColumns = $this->getTableColumns();\n $tabl...
[ "0.5914309", "0.58888423", "0.58709806", "0.5749924", "0.5709801", "0.56760097", "0.54962164", "0.54638326", "0.54273283", "0.5359981", "0.53272694", "0.5295493", "0.5293256", "0.52760583", "0.52301604", "0.52241963", "0.5219512", "0.51979536", "0.5194947", "0.51721907", "0.5...
0.5227745
15
Find a region by ID.
public static function find($id) { $regionDb = Yadda_Db_Table::getInstance('region'); $select = $regionDb ->select() ->from('region') ->where('status = ?', 'active') ->where('id = ?', $id); $region = $regionDb->fetchRow($select); if ($region === null) { throw new Yadda_Model_Exception('There is n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function find($id) {\n\t\treturn Doctrine::getTable ( 'Regions' )->findOneBy ( 'region_id', $id );\n\t}", "public function getRegionById($id)\n\t{\n\t\tif($id === null)\n\t\t\treturn null;\n\t\t$this->ensureRegionsLoaded(array($id));\n\t\tif(!isset($this->_regions[$id]))\n\t\t\treturn null;\n\t\tre...
[ "0.8358393", "0.66860247", "0.66278726", "0.64072245", "0.6303355", "0.62986165", "0.6257389", "0.62041575", "0.61952657", "0.6162741", "0.6153608", "0.61195225", "0.6116599", "0.6092943", "0.6081218", "0.6079749", "0.6052687", "0.60417145", "0.60000944", "0.60000944", "0.600...
0.7944306
1
Returns a paginated list of regions matching the given parameters.
public static function search(array $params) { // build query $regionDb = Yadda_Db_Table::getInstance('region'); $select = $regionDb ->select() ->from('region') ->where('status = ?', 'active') ->order('name'); // fetch $paginator = new Zend_Paginator(new Zend_Paginator_Adapter_DbSelect($sele...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function regions(Request $request): RegionCollection\n {\n return RegionCollection::make(Region::query()->with('translates')->paginate($request->get('perPage') ?? 50));\n }", "public static function all(array $params = array()) {\n\t\t// build query\n\t\t$regionDb = Yadda_Db_Table::getInstanc...
[ "0.6666061", "0.65811896", "0.6450932", "0.64392364", "0.629342", "0.6120395", "0.61152184", "0.6073787", "0.59615517", "0.5918425", "0.5908692", "0.5877012", "0.5875595", "0.58669007", "0.5859056", "0.5857596", "0.5811992", "0.5809966", "0.5809694", "0.5756056", "0.5728041",...
0.6704238
0
Returns an array of all regions.
public static function all(array $params = array()) { // build query $regionDb = Yadda_Db_Table::getInstance('region'); $select = $regionDb ->select() ->from('region') ->where('status = ?', 'active') ->order('name'); // fetch $regions = $regionDb->fetchAll($select); $return = array(); forea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_all_regions() {\r\n $DB = new \\Nefuzz\\Php\\DBC();\r\n $result = ($DB)->query_to_array(\"\r\n SELECT *\r\n FROM regions;\r\n \",'',[]);\r\n $DB->quit();\r\n return $result;\r\n }", "private function getRegions(): array\n {\n try {\n /** @...
[ "0.83330953", "0.8279045", "0.8130707", "0.79290026", "0.7450753", "0.73934555", "0.7266118", "0.72426546", "0.7239433", "0.7148533", "0.71271944", "0.71066576", "0.70308644", "0.697075", "0.6964486", "0.68218553", "0.67834324", "0.6626281", "0.657984", "0.6563723", "0.653249...
0.70869803
12
Returns an associative array (ID => name) of all regions.
public static function index($addEmpty = false) { $regionDb = Yadda_Db_Table::getInstance('region'); $regions = $regionDb->fetchAll(null, 'name'); $return = (bool) $addEmpty === true ? array('' => '') : array(); foreach ($regions as $region) { $return[$region->id] = $region->name; } return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRegions() {\n $query = \" SELECT ID,Name,CityID FROM #__ssregions \";\n $this->_db->setQuery($query);\n return $this->_db->loadAssocList();\n }", "public function getRegions() {\n $query = <<<SQL\n SELECT\n *\n FROM\n region\nSQL;\n\t\t\n\t\treturn $this->DB->e...
[ "0.82735443", "0.80721676", "0.8003379", "0.7776884", "0.7760253", "0.7622808", "0.7536318", "0.7445861", "0.732338", "0.73223054", "0.7266823", "0.7157858", "0.7087895", "0.7067953", "0.6844985", "0.6808119", "0.68026084", "0.6779567", "0.67563975", "0.6744693", "0.6724499",...
0.63905156
33
Creates a new region.
public static function create(array $values) { $insert = array(); // validate - id if (!isset($values['id']) || empty($values['id'])) { throw new Yadda_Model_Exception('Please provide an ID for the new region.'); } else { $id = trim(strtolower($values['id'])); $region = null; try { $region = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createToRegion($region)\n {\n // TODO: Implement createToRegion() method.\n }", "public function create()\n {\n return view('backend.region.create');\n \n }", "public function createRegion($name)\n {\n \t$this->state = self::STATE_REGION_CREATE;\n \t$region =...
[ "0.7402579", "0.72056437", "0.72023356", "0.70269537", "0.7003206", "0.6938643", "0.68484014", "0.6764048", "0.67341113", "0.67006123", "0.66175956", "0.6582799", "0.65268934", "0.6447237", "0.64321244", "0.6350188", "0.6240096", "0.6240096", "0.61230683", "0.61109453", "0.60...
0.665905
10
Converts a region row object to an array.
public static function toArray($region) { return array( 'id' => $region->id, 'name' => isset($region->name) ? $region->name : null, 'lat' => isset($region->lat) && $region->lat !== null ? (float) $region->lat : null, 'long' => isset($region->long) && $region->long !== null ? (float) $region->long : null ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getRowAsArray();", "public function toArray(){\n\t\treturn json_decode(json_encode($this->rows), true);\n\t}", "public function getRowDataAsArray( $iRow )\r\n {\r\n return $this->data[$iRow];\r\n }", "public function toArray() {\n\t\tforeach($this->_rows as $i => $row) {...
[ "0.74998134", "0.67951405", "0.6701318", "0.64403456", "0.63062185", "0.62881124", "0.6234305", "0.6158783", "0.61094934", "0.6091654", "0.6083686", "0.60407126", "0.60230803", "0.59716725", "0.5964659", "0.59583354", "0.59583354", "0.59583354", "0.59583354", "0.59583354", "0...
0.6808456
1
Find Meta Service Metrics for a nonadmin user.
public function findByMetaIdAndContact(int $metaId, ContactInterface $contact): ?array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function metrics($user_id = 'me') {\n \t$result = $this->get(\"/v2/users/{$user_id}/metrics\");\n \treturn $result;\n }", "public function findServicesDowntimesForNonAdminUser(): array;", "function paces_get_users_all_details( $user_id ){\n return get_metadata( 'user', $user_id );\n}", "publ...
[ "0.5972274", "0.56363", "0.5463804", "0.5361344", "0.5267238", "0.5202716", "0.518031", "0.5160211", "0.51215464", "0.5109712", "0.50758505", "0.5073204", "0.50724345", "0.5035563", "0.5030633", "0.5027781", "0.499708", "0.49824306", "0.49699515", "0.49592644", "0.49278292", ...
0.0
-1
Find Meta Service Metrics for a nonadmin user using SQL regexp service search and metric.
public function findByContactAndSqlRegexp( string $metricName, string $regexpString, ContactInterface $contact ): ?array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function metrics($user_id = 'me') {\n \t$result = $this->get(\"/v2/users/{$user_id}/metrics\");\n \treturn $result;\n }", "function getAllReports(){\n global $errors;\n\tif (in_array($_SESSION['user']['role'], ['admin'])) {\n\t\tglobal $conn, $roles, $keyword;\n\t\t$sql = \"SELECT * FROM repor...
[ "0.5193046", "0.5148894", "0.5019362", "0.49109045", "0.48917776", "0.47886133", "0.47000948", "0.4699067", "0.4653645", "0.46240857", "0.455254", "0.4548656", "0.45162448", "0.44882306", "0.4472489", "0.44717714", "0.44703698", "0.44570047", "0.4454439", "0.44487864", "0.444...
0.0
-1
Find Meta Service Metrics for an admin user.
public function findByMetaId(int $metaId): ?array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function metrics($user_id = 'me') {\n \t$result = $this->get(\"/v2/users/{$user_id}/metrics\");\n \treturn $result;\n }", "public function findServicesDowntimesForAdminUser(): array;", "public function admins()\n {\n return $this->newQuery('getUsers', ['type' => 'AdminUsers']);\n }...
[ "0.5866052", "0.55005014", "0.5389249", "0.53510654", "0.52953017", "0.52677965", "0.52526456", "0.51433134", "0.51259315", "0.51238215", "0.5122769", "0.5103745", "0.51028866", "0.5089422", "0.5075603", "0.50174886", "0.5015007", "0.50093424", "0.49919614", "0.49707", "0.495...
0.0
-1
Find Meta Service Metrics for an admin user using SQL regexp service search and metric.
public function findBySqlRegexp(string $metricName, string $regexpString): ?array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function metrics($user_id = 'me') {\n \t$result = $this->get(\"/v2/users/{$user_id}/metrics\");\n \treturn $result;\n }", "function getAllReports(){\n global $errors;\n\tif (in_array($_SESSION['user']['role'], ['admin'])) {\n\t\tglobal $conn, $roles, $keyword;\n\t\t$sql = \"SELECT * FROM repor...
[ "0.5234762", "0.51400363", "0.498763", "0.49706236", "0.49480426", "0.49471435", "0.49172598", "0.48804057", "0.4798091", "0.4795935", "0.4786672", "0.47255105", "0.470884", "0.4648722", "0.46418184", "0.4610412", "0.4604389", "0.46030703", "0.46025935", "0.45913148", "0.4566...
0.0
-1
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('CREATE TABLE config (id INT AUTO_INCREMENT NOT NULL, code CHAR(255) NOT NULL, value CHAR(255) DEFAULT NULL, des...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNE...
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.73290...
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE simpleshop_product DROP FOREIGN KEY FK_7EA9B5673DA5256D'); $this->addSql('ALTER TABLE sim...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo'...
[ "0.7950277", "0.78636813", "0.76065636", "0.7493955", "0.7320625", "0.7245268", "0.7187498", "0.71543235", "0.715298", "0.7141911", "0.7135835", "0.71214414", "0.71154845", "0.71057886", "0.7098064", "0.70800334", "0.7078775", "0.70729095", "0.7068331", "0.7066272", "0.705336...
0.0
-1
Extract CSS and move it inline JTMailer always put HTML as body.
public function onJtmailPresending(MailEvent $event) { $message = $event->getMessage(); /* Get HTML and Text messages */ switch ($message->getContentType()) { /* Text only */ case 'text/plain': return; /* HTML only */ case 'te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function getTransactionalEmailCSS()\n {\n $file ...
[ "0.64962256", "0.64962256", "0.64962256", "0.64962256", "0.64962256", "0.610543", "0.5855399", "0.5840615", "0.5805651", "0.5801226", "0.5789414", "0.57276225", "0.56321144", "0.5632025", "0.56120867", "0.560823", "0.5575287", "0.55176", "0.55121815", "0.5477666", "0.5432915"...
0.0
-1
Create a new message instance.
public function __construct($tituloCorreo, $usuario, $destinatario, $mensaje, $filename, $asunto) { // $this->tituloCorreo = $tituloCorreo; $this->usuario = $usuario; $this->destinatario = $destinatario; $this->mensaje = $mensaje; $this->filename = $filename; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We wi...
[ "0.81376195", "0.7959614", "0.77619994", "0.7713793", "0.76559645", "0.7553059", "0.7458076", "0.71510184", "0.6852663", "0.68347865", "0.67154217", "0.6689976", "0.6683088", "0.6644564", "0.6628052", "0.6549025", "0.6514292", "0.6501647", "0.645071", "0.645071", "0.645071", ...
0.0
-1
Retrieve existing extension attributes object or create a new one.
public function getExtensionAttributes() { return $this->_getExtensionAttributes(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExtensionAttributes();", "public function getExtensionAttributes();", "public function getExtensionAttributes();", "public function getExtensionAttributes();", "public function getExtensionAttributes();", "public function getExtensionAttributes();", "public function getExtensionAttri...
[ "0.674368", "0.674368", "0.674368", "0.674368", "0.674368", "0.674368", "0.674368", "0.674368", "0.674368", "0.674368", "0.674368", "0.674368", "0.674368", "0.674368", "0.6168628", "0.6096815", "0.5797734", "0.5797318", "0.5797318", "0.57972354", "0.57957065", "0.57957065",...
0.57117134
31
Set an extension attributes object.
public function setExtensionAttributes( \Loop\Tracker\Api\Data\ItemsExtensionInterface $extensionAttributes ) { return $this->_setExtensionAttributes($extensionAttributes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAttributes();", "public function setExtensionAttributes(\\Magento\\Tax\\Api\\Data\\AppliedTaxExtensionInterface $extensionAttributes);", "public function setExtension($extension, $attributes = array()) {\n\t\t$this->connections [$this->active]->setExtension ( $extension, $attributes );\n\t}"...
[ "0.69624007", "0.6806445", "0.67975146", "0.6626065", "0.655601", "0.65525913", "0.6545836", "0.6514346", "0.65032536", "0.6427793", "0.64174604", "0.64086866", "0.6383069", "0.6383069", "0.6383069", "0.6330351", "0.63235587", "0.62166697", "0.60595465", "0.6057609", "0.60486...
0.61463314
18
Create a new command instance.
public function __construct() { parent::__construct(); // No DB logging. DB::connection()->disableQueryLog(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "pu...
[ "0.8011161", "0.73343915", "0.7261552", "0.7165296", "0.7159216", "0.7138823", "0.6750306", "0.6720341", "0.6718429", "0.6696386", "0.6678263", "0.6645555", "0.65633243", "0.65445185", "0.6482728", "0.64691955", "0.6429075", "0.638223", "0.63785976", "0.6376661", "0.6314948",...
0.0
-1
Execute the console command.
public function fire() { $this->info('Starting Import'); // Import data. $this->_import_eod_options_data(); $this->info('Ending Import'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() meth...
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.614841...
0.0
-1
Import end of day options data.
private function _import_eod_options_data() { // Clear database. DB::statement('TRUNCATE TABLE OptionsEod'); // Setup our models. $symbols_model = App::make('App\Models\Symbols'); $optionseod_model = App::make('App\Models\OptionsEod'); // Lets get an index of all the underlying symbols. $sy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function set_end_options(): void {\n Simply_Static\\Options::instance()\n ->set('additional_files', Utils::array_to_option_string($this->files))\n ->set('additional_urls', Utils::array_to_option_string($this->urls))\n ->set('archive_end_time', Simply_Static\\Util::fo...
[ "0.6324207", "0.5772403", "0.53170556", "0.51526564", "0.5148073", "0.5027425", "0.50140834", "0.5002238", "0.496932", "0.4896738", "0.48954314", "0.4885654", "0.47373962", "0.47163844", "0.47014284", "0.4681895", "0.4670022", "0.46614787", "0.46241546", "0.46133116", "0.4609...
0.6520106
0
Import data we have gotten on a daily baises from EOD Options.
private function _import_daily_eod_options_data($symbol_index) { // Query dropbox and list files. $client = new Client(env('DROPBOX_ACCESS_TOKEN'), env('DROPBOX_APP_KEY')); $adapter = new DropboxAdapter($client); $db_filesystem = new Filesystem($adapter); $files = $db_filesystem->listContents('/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _import_eod_options_data()\n\t{\n // Clear database.\n DB::statement('TRUNCATE TABLE OptionsEod'); \t\n \t\n\t\t// Setup our models.\n\t\t$symbols_model = App::make('App\\Models\\Symbols');\n\t\t$optionseod_model = App::make('App\\Models\\OptionsEod');\n\t\t\n\t\t// Lets get an index of al...
[ "0.7269885", "0.6336099", "0.6263408", "0.6158965", "0.6039248", "0.60306394", "0.60063887", "0.5749182", "0.57326597", "0.5624004", "0.54702735", "0.54525226", "0.5452295", "0.5443806", "0.53924406", "0.5351593", "0.53510046", "0.5343794", "0.533978", "0.5308475", "0.5267914...
0.6765243
1
Import just one day's data from the unziped CSV file.
private function _import_from_daily_csv_file($file, $symbol_index) { $batch = []; // Do the CSV magic. $reader = Reader::createFromFileObject(new SplFileObject($file)); // symbols model $symbols_model = App::make('App\Models\Symbols'); // Loop through the option data. foreac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionImportFromCsv()\n {\n HBackup::importDbFromCsv($this->csvFile);\n }", "public function importcsv()\n\t{\n\t\tif( $this->import_start() )\n\t\t{\n\t\t\t// Reads the content which has been uploaded to the tmp file into a text var\n\t\t\t$content = file_get_contents($this->file['t...
[ "0.6739292", "0.6437693", "0.6195104", "0.6019271", "0.59645367", "0.5868316", "0.5804911", "0.5783331", "0.5777469", "0.5732038", "0.5666319", "0.56439173", "0.5631292", "0.56304616", "0.5612842", "0.5602491", "0.560102", "0.5580468", "0.5575635", "0.5558984", "0.55314547", ...
0.58105624
6
Return a list of files with eod data.
private function _get_option_eod_summary_files() { $files = []; if(is_dir('/Users/spicer/Dropbox/Apps/Stockpeer')) { $base = '/Users/spicer/Dropbox/Apps/Stockpeer/'; } else { $base = '/tmp/market_data/'; $this->_get_data_from_dropbox(); } foreach($this->eod_opti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDatafiles()\n {\n return $this->game->getDatafiles();\n }", "public function getFiles();", "public function getFiles();", "public function getFiles();", "public function getFiles ();", "public static function getFiles()\n\t{\n\t\t$result = Array();\n\t\t$files = sfCore::$d...
[ "0.6756202", "0.6754651", "0.6754651", "0.6754651", "0.6681217", "0.6674859", "0.665485", "0.6650601", "0.66485107", "0.6637627", "0.6613034", "0.65925366", "0.65880877", "0.65870667", "0.6546304", "0.65412086", "0.6536871", "0.6536775", "0.6522086", "0.6520818", "0.6515558",...
0.73023045
0
Download files from Dropbox.
private function _get_data_from_dropbox() { $tmp = '/tmp/market_data/'; // tmp/market_data/ if(! is_dir($tmp)) { mkdir($tmp); } // data/optionsendofday/IWM if(! is_dir($tmp . '/data/OptionsEndOfDay/IWM')) { mkdir($tmp . '/data/OptionsEndOfDay/IWM', 0777, true); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function downloadFile();", "public function download()\n {\n $encrypt = $this->services['encrypt'];\n $file_name = $encrypt->decode($this->getPost('id'));\n $type = $this->getPost('type');\n $storage = $this->services['backup']->setStoragePath($this->settings['working_direct...
[ "0.6879092", "0.67751414", "0.66468436", "0.65955806", "0.6519499", "0.6474283", "0.6408808", "0.6392682", "0.6390261", "0.6371924", "0.6341764", "0.6335101", "0.6328385", "0.621745", "0.6149", "0.6113433", "0.60727966", "0.6063108", "0.59824413", "0.5976453", "0.59526485", ...
0.5793646
30
Get the console command arguments.
protected function getArguments() { return []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getArgs()\n {\n return $this->meta[Cli::ARGS] ?? [];\n }", "private function getArguments() {\n return array_slice($argv, 1);\n }", "public function getArgs() {\n return $this->commandArgs;\n }", "public function getCommandLineArguments()\n {\n retur...
[ "0.7929734", "0.79042095", "0.7831461", "0.7587314", "0.75166816", "0.70980483", "0.7015334", "0.7015334", "0.7015334", "0.7015334", "0.7015334", "0.7011597", "0.7011597", "0.6969377", "0.6941954", "0.6919662", "0.69183534", "0.6889421", "0.6861143", "0.68576336", "0.6853908"...
0.65485007
85
Get the console command options.
protected function getOptions() { return []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getOptions() {\n return [\n ['env', null, InputOption::VALUE_OPTIONAL, 'The environment the command should run under.', null],\n ];\n }", "protected function getOptions()\n {\n return [\n ['command', null, InputOption::VALUE_OPTIONAL, 'The termi...
[ "0.780034", "0.77587676", "0.7517654", "0.734501", "0.7340313", "0.7306486", "0.7279262", "0.726863", "0.72377974", "0.7191515", "0.7157065", "0.7155818", "0.713727", "0.7112813", "0.7110364", "0.7110364", "0.7110364", "0.7110364", "0.7110364", "0.7110364", "0.7110364", "0....
0.703143
51
Retourne le nombre d'historique
public function countAllByMembre(Membre $membre) { return $this->createQueryBuilder('h') ->select('count(h) nbHistorique') ->where('h.membre = :membre')->setParameter('membre', $membre) ->getQuery()->getOneOrNullResult()['nbHistorique']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdHistorique() {\n return $this->idHistorique;\n }", "public function getHistorial()\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from historiales');\n $stmt->execute();\n }", "public function getCdHistorico()\n {\n return $this->cd_historico;\n }", ...
[ "0.708629", "0.6580433", "0.64230114", "0.6275286", "0.62670255", "0.62086946", "0.61149955", "0.6051766", "0.60196704", "0.59994864", "0.5988982", "0.5944709", "0.5892154", "0.58681244", "0.5864745", "0.5856294", "0.5848151", "0.5820812", "0.5820812", "0.57615525", "0.575504...
0.0
-1
Provide either a Zend_Session_Namespace or a string along with a property name under which to store contents.
public function __construct($namespace, $member) { if (null === $member || !is_scalar($member) || (0 === strlen($member))) { throw NamespaceException::invalidPropertyName($member); } if (!$namespace instanceof \Zend_Session_Namespace) { $namespace = new \Zend_Se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function namespaceSet($var, $value) {\r\n\t\t$_SESSION[self::SESSION_NAMESPACE][$var] = $value;\r\n\t}", "static function setProperty($namespace, $prop, $value)\n\t{\n\t\tif ($namespace == '') {\n\t\t\t$namespace = __CLASS__;\n\t\t}\n\t\tif (is_null($prop)) {\n\t\t\tunset(self::$_properties[$namespace]);...
[ "0.5917515", "0.55511785", "0.5549255", "0.55224943", "0.54544294", "0.54412425", "0.54136115", "0.53416467", "0.5327926", "0.5322238", "0.53110325", "0.5291771", "0.52808213", "0.5277777", "0.5241896", "0.5241896", "0.52209765", "0.51853675", "0.5166372", "0.51629406", "0.51...
0.0
-1
Check whether the storage is empty
public function isEmpty() { return !isset($this->getNamespace()->{$this->getMember()}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_empty(){\r\n\t\treturn $this->size==0;\r\n\t}", "public function is_empty()\n\t\t{\n\t\t\tif ($this->is_cached()) {\n\t\t\t\treturn !is_null($this->content);\n\t\t\t}\n\n\t\t\tif ($this->exists() || $this->saved) {\n\t\t\t\treturn $this->size() <= 0;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "...
[ "0.74716973", "0.7285602", "0.6982764", "0.6908048", "0.6900094", "0.6868147", "0.67686206", "0.67543846", "0.67505896", "0.67417234", "0.6714472", "0.67049915", "0.6693385", "0.6673284", "0.667323", "0.6672379", "0.6650948", "0.6648772", "0.664288", "0.6599895", "0.6577888",...
0.0
-1
Read contents of storage
public function read() { return $this->getNamespace()->{$this->getMember()}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function read()\n\t{\n\t\t$content = $this->storage->read();\n\t\t$data = array();\n\t\tforeach($content['data'] as $key=>$value) {\n\t\t\t$storage = new \\Zentric\\Storage(array(\n\t\t\t\t'key' => $key\n\t\t\t\t, 'folder' => STORAGE\n\t\t\t\t, 'driver' => 'Array'\t\t\t\n\t\t\t));\t\t\t\n\t\t\t$data[] = $storage->...
[ "0.7855143", "0.7054087", "0.7054087", "0.7054087", "0.7054087", "0.7054087", "0.7054087", "0.7054087", "0.7054087", "0.7054087", "0.7054087", "0.7054087", "0.7054087", "0.69644696", "0.6933722", "0.690313", "0.676574", "0.66663975", "0.6664073", "0.6664073", "0.6649905", "...
0.0
-1
Write contents to storage
public function write($contents) { $this->getNamespace()->{$this->getMember()} = $contents; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save()\n\t{\n\t\tif($this->beforeSave())\n\t\t{\n\t\t\t$dest = $this->getStorageFile();\n\t\t\t\n\t\t\tif(file_exists($dest) and is_writable($dest)===false)\n\t\t\t{\n\t\t\t\t@chmod($dest,0777);\n\t\t\t}\n\t\t\t\n\t\t\t$fp = fopen($dest,$this->mode);\n\t\t\tfwrite($fp,$this->data);\n\t\t\tfclose($f...
[ "0.71482015", "0.70803714", "0.69821054", "0.6769129", "0.66977686", "0.6666014", "0.6666014", "0.66531235", "0.6623625", "0.65937775", "0.6590111", "0.6475641", "0.6466115", "0.6432422", "0.6431833", "0.64162785", "0.6374766", "0.6324359", "0.6297792", "0.62567157", "0.62529...
0.6035874
37
Specify Model class name
public function model() { return Schedule::class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getModelName()\n {\n if (isset($this->options[\"type\"])) {\n $type = ucfirst($this->options[\"type\"]);\n $class = \"\\\\app\\\\models\\\\feeds\\\\\" . $type;\n if (class_exists($class)) {\n return $class;\n }\n }\n ...
[ "0.768929", "0.76618075", "0.7585344", "0.7583571", "0.7583571", "0.7542252", "0.75075734", "0.74778146", "0.74702877", "0.74578375", "0.74578375", "0.7453601", "0.7453601", "0.7447208", "0.7444998", "0.7435527", "0.74304074", "0.7416409", "0.74128395", "0.74125767", "0.74125...
0.0
-1
Specify Validator class name
public function validator() { return ScheduleValidator::class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validator()\n {\n\n return EmpreValidator::class;\n }", "public function validator()\n {\n return ZhuanTiValidator::class;\n }", "public function validator()\n {\n\n return ConfigValidator::class;\n }", "public function validator()\n {\n return...
[ "0.72592807", "0.72251856", "0.7150773", "0.71146023", "0.7076195", "0.7076195", "0.7076195", "0.7076195", "0.7076195", "0.7014993", "0.69791174", "0.68493617", "0.6822873", "0.67854977", "0.6781244", "0.6729631", "0.672608", "0.67218333", "0.66956973", "0.66793686", "0.66786...
0.6538089
31
Boot up the repository, pushing criteria
public function boot() { $this->pushCriteria(app(RequestCriteria::class)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initRepository(): void;", "public function init_repo() {\n\n\t\t\t// include the repository configuration\n\t\t\t$repos = include_once(CONFIGPATH . 'repositories.php' );\n\n\t\t\t// the $_GET['deploy'] parameter from request\n\t\t\t$requested_deploy = filter_input( \\INPUT_GET, 'deploy', \\FILTER...
[ "0.61221844", "0.59051174", "0.5761602", "0.57011706", "0.5698458", "0.56439424", "0.56439424", "0.557433", "0.5560698", "0.54299444", "0.5423752", "0.5405016", "0.5380625", "0.5370148", "0.5349332", "0.5335366", "0.5313453", "0.52780914", "0.5239638", "0.52233356", "0.518485...
0.0
-1
Get the facade accessor.
protected static function getFacadeAccessor(): string { return 'autopresentermapper'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final static function getFacadeAccessor() {\n\n\t\t/**\n\t\t * Facade is very simple to use but it can provide a real troubles\n\t\t * if we want have a new instance of related object every time instead a singleton.\n\t\t */\n\t\tunset(static::$resolvedInstance['DelegapiClient']);\n\t\treturn 'DelegapiClien...
[ "0.81263566", "0.76811993", "0.7440739", "0.7411451", "0.7386718", "0.7384132", "0.7362343", "0.7343413", "0.7250475", "0.72091854", "0.71902984", "0.7158807", "0.7137446", "0.71369475", "0.7127083", "0.7039666", "0.70367116", "0.70367116", "0.7026316", "0.7004698", "0.698359...
0.72246885
9
Get the facade class.
protected static function getFacadeClass(): string { return Facade::class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getFacadeClass()\n {\n return TravelPerk::class;\n }", "protected function getFacadeClass()\n {\n return PusherBeams::class;\n }", "public function retornaFacade ()\n {\n try {\n // Retorna o nome da classe facade\n return $this->_cla...
[ "0.76561874", "0.76208615", "0.7610145", "0.74600923", "0.72164166", "0.7214597", "0.71838", "0.70774853", "0.7060769", "0.7029519", "0.7000669", "0.6887118", "0.68383116", "0.6817372", "0.6817372", "0.67685515", "0.6760814", "0.6748346", "0.6720909", "0.66768444", "0.6657625...
0.8359229
0
Get the facade root.
protected static function getFacadeRoot(): string { return AutoPresenterMapper::class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getFacadeRoot()\n {\n }", "public static function getFacadeRoot()\n {\n }", "public static function getFacadeRoot()\n {\n }", "public static function getFacadeRoot()\n {\n }", "public static function getFacadeRoot ( )\n {\n ...
[ "0.87597144", "0.87597144", "0.87597144", "0.87597144", "0.87142324", "0.86972713", "0.86972713", "0.75246793", "0.75246793", "0.7509527", "0.7416818", "0.7403025", "0.7348721", "0.7324908", "0.7321274", "0.7310487", "0.7310487", "0.7310487", "0.7305973", "0.72783136", "0.727...
0.7014507
28
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.
protected function setUp() { $this->object = new Pane; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }", "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_conn...
[ "0.7593096", "0.71712965", "0.6927249", "0.6909755", "0.689123", "0.688266", "0.68152905", "0.6802125", "0.6752058", "0.6751711", "0.67455655", "0.6732383", "0.67130816", "0.67064613", "0.670096", "0.66827595", "0.66827595", "0.66827595", "0.66827595", "0.66827595", "0.667805...
0.0
-1
Tears down the fixture, for example, closes a network connection. This method is called after a test is executed.
protected function tearDown() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tearDown(): void\n {\n parent::tearDown();\n\n Mockery::close();\n\n unset($this->faker, $this->waqi);\n }", "public function teardown()\n {\n //\n }", "protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test dat...
[ "0.73065555", "0.72364944", "0.7221215", "0.71869916", "0.71860623", "0.7148144", "0.71395123", "0.7134097", "0.7119696", "0.71024513", "0.70808", "0.707869", "0.7076699", "0.7052117", "0.7048074", "0.7032501", "0.7021807", "0.7014196", "0.70003164", "0.69998145", "0.69991523...
0.0
-1
Declares the validation rules. The rules state that username and password are required, and password needs to be authenticated.
public function rules() { //echo $this->scenario; $rules[] = array('last_name,first_name,company_id,email,companyrole_id', 'required', 'on'=>'create'); $rules[] = array('id,companyrole_id', 'required', 'on'=>'update'); $rules[] = array('personalphones', 'checkpersonalPhones', 'on'=>'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n\t{\n\t\treturn array(\n\t\t\t// username and password are required\n\t\t\tarray('username, password', 'required'),\n\t\t\t// rememberMe needs to be a boolean\n\t\t\tarray('rememberMe', 'boolean'),\n\t\t\t// password needs to be authenticated\n\t\t\tarray('password', 'authenticate'),\n\t\t...
[ "0.7669122", "0.7669122", "0.74879825", "0.7358366", "0.7287219", "0.72671556", "0.7252849", "0.7249616", "0.7215109", "0.71844596", "0.71464556", "0.71017116", "0.7061328", "0.7038431", "0.7034937", "0.7001096", "0.6995491", "0.69825536", "0.69133484", "0.69013023", "0.68874...
0.0
-1
register signal & tickts
public function registerTicks() { if (!$this->_isSubProcess) { // register signal,send signal to parent process // 使用ticks需要PHP 4.3.0以上版本 echo "i am registering signal for main process!\n"; // 安装信号处理器 pcntl_signal(SIGINT, array($this,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n register_tick_function([&$this, 'tick']);\n }", "public function onTick($currentTick){ \n }", "function tick_handler()\n{\n echo \"called\\n\";\n}", "public function onTick() {\r\n\r\n }", "function tick();", "public function tick();", "private fu...
[ "0.7177069", "0.62790525", "0.60348064", "0.6032207", "0.5911731", "0.5812185", "0.5709681", "0.5654872", "0.55474186", "0.5463986", "0.54326826", "0.53226155", "0.53038853", "0.52809507", "0.5277291", "0.51221144", "0.50967526", "0.509577", "0.5088748", "0.508826", "0.501912...
0.6851136
1
this function is used for ensuring running gearman worker not to be interrupted
public function gearmanRunOnceBeforeExit() { echo "i am handling signal!\n"; if (!isset($this->_app)) { $this->_app = CApp::getApp(); } // var_dump($this->sub_process_keys); foreach ($this->sub_process_keys as $_k => $_subProcessKey) { $workeName = $thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function gracefulStop(){\n $this->handleWorkerOutput('warn', \"Work done, exiting now.\");\n $this->stop();\n }", "public function gearmanWorkerStop()\n {\n for($i = 0; $i < $this->_gearmanForkCount; $i++){\n $this->sub_process_keys[] = $i+1;\n }\n forea...
[ "0.63283414", "0.62497145", "0.6187386", "0.58987856", "0.5823127", "0.5809223", "0.5743171", "0.56973636", "0.5689473", "0.56821793", "0.5492178", "0.5454132", "0.54520893", "0.54484385", "0.5381954", "0.53758806", "0.53637993", "0.5336607", "0.5336099", "0.53348863", "0.528...
0.6922119
0
use kill command to stop process it is unsafe and particularly dangerous for running gearman worker
public function gearmanWorkerStop() { for($i = 0; $i < $this->_gearmanForkCount; $i++){ $this->sub_process_keys[] = $i+1; } foreach ($this->sub_process_keys as $_sub_key) { $shell_cmd = "ps aux | grep ".$this->_workerFileName. " |"; $shell_cmd .= "grep -v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function kill();", "private function serveStop()\n {\n foreach ($this->pid as $pid) {\n $command = \"kill -9 {$pid} > /dev/null 2> /dev/null &\";\n @exec($command, $output);\n }\n }", "public function kill(): void;", "function kill_Process()\n {\n ...
[ "0.780975", "0.7335286", "0.72063285", "0.7094114", "0.7086525", "0.70338255", "0.6961979", "0.6866553", "0.6847355", "0.67614466", "0.66687155", "0.6592907", "0.6512263", "0.6483066", "0.6429606", "0.6396682", "0.63490456", "0.6286256", "0.62840074", "0.6283107", "0.6277343"...
0.7410336
1
Set name of the quickie sender
public function setAuthor($author) { $this->author = $author; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setGiftcardSenderName($value);", "function setFromName($to_set=\"noreply\"){\n\t\t\t$this->from_name = $to_set;\n\t\t}", "public function nameCommand()\n {\n $userName = $this->getFromName();\n if (!empty($this->e->getParams())) {\n $newName = implode(' ', $this->e->...
[ "0.6843585", "0.6722104", "0.66989005", "0.6677015", "0.6552855", "0.6506503", "0.6403242", "0.63776344", "0.63082284", "0.6297223", "0.62731904", "0.6246282", "0.6241106", "0.6200633", "0.619566", "0.619566", "0.6164848", "0.6159936", "0.6144231", "0.6125021", "0.6122529", ...
0.0
-1
Set name of the quickie sender
public function getAuthor() { return $this->author; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setGiftcardSenderName($value);", "function setFromName($to_set=\"noreply\"){\n\t\t\t$this->from_name = $to_set;\n\t\t}", "public function nameCommand()\n {\n $userName = $this->getFromName();\n if (!empty($this->e->getParams())) {\n $newName = implode(' ', $this->e->...
[ "0.6843585", "0.6722104", "0.66989005", "0.6677015", "0.6552855", "0.6506503", "0.6403242", "0.63776344", "0.63082284", "0.6297223", "0.62731904", "0.6246282", "0.6241106", "0.6200633", "0.619566", "0.619566", "0.6164848", "0.6159936", "0.6144231", "0.6125021", "0.6122529", ...
0.0
-1
Load the needed libraries.
public function __construct() { parent::__construct(); $this->load->model('Players'); $this->load->model('Leagues'); $this->load->helper('form'); //RESTRICTED TO LOGGED IN MEMBERS ONLY //Just in case not logged in we direct to login page if ($this->session->userdata('logged_in')) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadLibraries(){\n\t\trequire_once('uf-store.acf.functions.php');\n\t\trequire_once('uf-store.ajax.functions.php');\n\t\trequire_once('uf-store.shortcode.functions.php');\n\n\t\t//UFStore\n\t\trequire_once('uf-store.cart.class.php');\n\t\trequire_once('uf-store.shipping.class.php');\n\t\trequire...
[ "0.8041295", "0.7872291", "0.77858925", "0.7691104", "0.76625913", "0.7577121", "0.75461775", "0.7325678", "0.723254", "0.7153171", "0.7029496", "0.7020306", "0.7012841", "0.69977975", "0.6922977", "0.68834114", "0.68030155", "0.667139", "0.66134936", "0.65574205", "0.6551838...
0.0
-1
Loads the content for the drafts view:
public function index($year=NULL, $page_content='probowl', $content_data=array()) { //this is loading a view from one of the methods to display on the page //RESTRICTED TO LOGGED IN MEMBERS ONLY //Just in case not logged in we direct to login page if (!$this->session->userdata('logged_in') ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDrafts()\n {\n $mostRecommended = Post::mostRecommended();\n $last = Post::lastPosts()\n ->orderBy('created_at')\n ->where('public', 0)\n ;\n\n $categories = PostCategory::all();\n\n $drafts = Post::where...
[ "0.65148693", "0.65022784", "0.64151174", "0.6345991", "0.6175783", "0.61727476", "0.61697763", "0.6050392", "0.5955103", "0.5954854", "0.59541744", "0.59541744", "0.5953953", "0.5947845", "0.59446025", "0.59062546", "0.58712345", "0.5864848", "0.57960814", "0.57955074", "0.5...
0.0
-1
receives a post data for a roster puts it in the database
public function submit_probowl($team_id){ $year=$this->current_year; $received_players = rtrim($this->input->post('players'),','); $players = explode(",",$received_players); $incomplete=0; while(count($players)<8){ $incomplete=1; $players[]=0; } $closed=1; if($closed){ echo "Pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendPost(){\n\t\t\t// record the post in the database\n\t\t\t\n\t\t}", "protected function post() {\n // Get data form request body\n $request_data = $this->get_request_body();\n if ($request_data->room_name == \"\" || $request_data->username == \"\") {\n ...
[ "0.6381216", "0.6348381", "0.62722725", "0.61329746", "0.6066395", "0.6051743", "0.60353124", "0.5935081", "0.5933123", "0.59189874", "0.59185547", "0.58969754", "0.58969754", "0.58969754", "0.5879666", "0.58511734", "0.58409333", "0.5838517", "0.58144116", "0.5799708", "0.57...
0.0
-1
$sql = "SELECT db_lifting_price FROM `tbli_sku_mou_price_mapping` where sku_id=$sku_id and quantity=1";
public function get_dd_price ( $sku_id ) { $sql = "SELECT db_lifting_price FROM `tbli_sku_mou_price_mapping` where sku_id=$sku_id HAVING MIN( quantity )"; $query = $this->db->query( $sql ); return $query->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_unit_price($sku_id) {\n $sql = \"SELECT t1.outlet_lifting_price as price, t2.sku_code, t2.sku_description\n FROM `tbli_sku_mou_price_mapping` as t1 \n Inner JOIN `tbld_sku` as t2 On t1.sku_id=t2.id\n where sku_id=$sku_id and quantity=1\";\n $...
[ "0.721611", "0.6238702", "0.62143993", "0.61865956", "0.6131574", "0.6116619", "0.6051333", "0.6025234", "0.59959334", "0.59911424", "0.59887695", "0.5976927", "0.596946", "0.5967573", "0.5916602", "0.59155047", "0.59089005", "0.5861578", "0.58375883", "0.58290946", "0.582025...
0.64230317
1
$sql = "SELECT db_lifting_price FROM `tbli_sku_mou_price_mapping` where sku_id=$sku_id and quantity=1";
public function get_prices ( $sku_id ) { $sql = "SELECT * FROM `tbli_sku_mou_price_mapping` where sku_id=$sku_id Order by quantity"; $query = $this->db->query( $sql ); return $query->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_unit_price($sku_id) {\n $sql = \"SELECT t1.outlet_lifting_price as price, t2.sku_code, t2.sku_description\n FROM `tbli_sku_mou_price_mapping` as t1 \n Inner JOIN `tbld_sku` as t2 On t1.sku_id=t2.id\n where sku_id=$sku_id and quantity=1\";\n $...
[ "0.72178304", "0.64239246", "0.6239215", "0.6213493", "0.6187477", "0.6133494", "0.6118541", "0.6052696", "0.6024721", "0.5998372", "0.599308", "0.5988375", "0.5975512", "0.5969427", "0.59683347", "0.59193027", "0.5915092", "0.5909641", "0.58617216", "0.5830128", "0.5820433",...
0.5838623
19
sku Hierarchy start Gent All Sku Hierarchy table Data //
public function getSkuHierarchy () { $sql = "select t1.id,t1.layer_name,t1.layer_code,t1.layer_description,t1.parent_layer_id,t2.id as parent_layer_id," . " (Select b.layer_name from tbld_sku_hierarchy as b where t2.id = b.id) as parent_layer_name from tbld_sku_hierarchy as t1 left join tbld_sku...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSkuHierarchyElements ()\n{\n\n// $sql = \"select t1.id as sku_hierarchy_element_by_id,t1.element_name,t1.element_code,t1.element_description,t1.element_category_id,t1.parent_element_id,\n// t2.id as parent_layer_id,t3.id,t3.layer_name as element_category,\n// ...
[ "0.62438357", "0.570148", "0.5421934", "0.5420962", "0.53625095", "0.517409", "0.51523143", "0.5120516", "0.510346", "0.5090855", "0.5054749", "0.5049899", "0.50401324", "0.50165623", "0.4974641", "0.4960896", "0.49574587", "0.49430105", "0.49391395", "0.49017552", "0.4873573...
0.6380823
0
Gent Individual Id Sku Hierarchy Code From table Data //
public function getSkuLayerIdByCode ( $hierarchy_code ) { $this->db->select( 'id' ); $this->db->where( 'layer_code', $hierarchy_code ); $query = $this->db->get( 'tbld_sku_hierarchy' )->result_array(); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSkuHierarchy ()\n {\n $sql = \"select t1.id,t1.layer_name,t1.layer_code,t1.layer_description,t1.parent_layer_id,t2.id as parent_layer_id,\"\n . \" (Select b.layer_name from tbld_sku_hierarchy as b where t2.id = b.id) as parent_layer_name from tbld_sku_hierarchy as t1 left jo...
[ "0.63171613", "0.6268051", "0.56313986", "0.55602306", "0.5334822", "0.5309512", "0.52848256", "0.5219678", "0.51957816", "0.5171037", "0.5168882", "0.51556", "0.5122436", "0.5102181", "0.50849676", "0.5084626", "0.5077614", "0.5076128", "0.5068086", "0.50285286", "0.5021309"...
0.48589742
48