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
/ / Helper methods /
private static function areAllOperationsSuccessful (array $result) : bool { return HashMap::from($result) ->all(function ($key, $value) { return $value === true; // can be true or Memcached::RES_* }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function helper()\n\t{\n\t\n\t}", "private function _i() {\n }", "private function __() {\n }", "private function static_things()\n\t{\n\n\t\t# code...\n\t}", "public function custom()\n\t{\n\t}", "public function getAlternate() {}", "protected function _process() {}", "protected f...
[ "0.686044", "0.55582243", "0.54197454", "0.5378807", "0.52885926", "0.5266212", "0.5230826", "0.5230826", "0.5230826", "0.5230826", "0.51971245", "0.5183846", "0.51716727", "0.51364625", "0.5133516", "0.5123286", "0.5123286", "0.51191944", "0.51110005", "0.5092386", "0.508306...
0.0
-1
set the elequent relationship with doctors table (many to one)
public function doctor(){ return $this->belongsTo(Doctor::class,'doctor_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function doctor_id()\n {\n return $this->belongsToMany(doctor_id::class);\n }", "public function Doctors()\n {\n return $this->belongsToMany('App\\Doctor')->using('App\\DoctorSpeciality');\n }", "public function setRelations() {}", "protected\tfunction\tsetRelations() {}", ...
[ "0.6275189", "0.62609303", "0.6099701", "0.59726", "0.59726", "0.58849114", "0.58725625", "0.5836912", "0.5676113", "0.56342417", "0.5605745", "0.55591893", "0.55083656", "0.550836", "0.5481891", "0.54708076", "0.5459929", "0.5450194", "0.54204273", "0.5391431", "0.53664666",...
0.6161951
2
set the elequent relationship with doctors table (one to many)
public function appointments(){ return $this->hasMany(Appointment::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Doctors()\n {\n return $this->belongsToMany('App\\Doctor')->using('App\\DoctorSpeciality');\n }", "public function doctor_id()\n {\n return $this->belongsToMany(doctor_id::class);\n }", "public function setRelations() {}", "public function doctor(){\n return $...
[ "0.63511616", "0.6261712", "0.61661685", "0.61463666", "0.60656327", "0.60656327", "0.5989586", "0.58130467", "0.57360387", "0.5723047", "0.5661872", "0.56098366", "0.553843", "0.5511714", "0.5456143", "0.54550177", "0.5437431", "0.54333895", "0.54201764", "0.5389901", "0.538...
0.0
-1
return all the prescriptions issued to the patient through the intermediate class Appointment
public function prescriptions() { return $this->hasManyThrough( Prescription::class, Appointment::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prescriptions() {\n return $this->hasManyThrough('App\\Prescription', 'App\\Patient', 'clinic_id', 'patient_id', 'id');\n }", "public function getAppointments()\n {\n return $this->hasMany(Appointment::className(), ['id' => 'id']);\n }", "public function appointments()\n ...
[ "0.7060157", "0.6855971", "0.65665466", "0.65665466", "0.65665466", "0.6546537", "0.65306604", "0.6474078", "0.643309", "0.6346216", "0.631028", "0.6279422", "0.6258811", "0.6211584", "0.6199713", "0.61197203", "0.6111887", "0.608494", "0.59529245", "0.5883215", "0.5769721", ...
0.82217264
0
get the patient profile image
public function avatar(){ if($this->avatar){ return asset('/avatars/patients/'.$this->avatar); }else{ return "https://www.gravatar.com/avatar/{{md5(trim($this->fname))}}?d=mm&s=150" ; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProfilePicture();", "public function getProfileImage() {\r\n $profileImage = SystemSetting::getByKey(\"ARC_USER_IMAGE\", $this->id);\r\n if (!empty($profileImage->value)) {\r\n return system\\Helper::arcGetPath() . \"assets/profile/\" . $profileImage->value;\r\n ...
[ "0.8321862", "0.79486233", "0.79157096", "0.78564686", "0.7784165", "0.7752854", "0.75825727", "0.7528041", "0.7527411", "0.7451663", "0.73926395", "0.7361501", "0.73354685", "0.732236", "0.71695954", "0.7114947", "0.70576984", "0.69770116", "0.69759905", "0.69674", "0.696645...
0.69587517
21
The patient age (Carbon)
public function age(){ return $this->dob->age; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAgeAttribute ()\n\t{\n\t\treturn \\Carbon\\Carbon::parse($this->birthdate)->age;\n\t}", "public function getAgeAttribute()\n\t{\n\t\treturn now()->diffInYears($this->birthdate);\n\t}", "public function getAgeAttribute() {\n return Carbon::createFromDate($this->attributes['DOB'])->age;...
[ "0.81948006", "0.8007337", "0.79492533", "0.77728236", "0.7741789", "0.7667064", "0.75684774", "0.7524171", "0.7499724", "0.7499724", "0.7499724", "0.7499724", "0.7499724", "0.7499724", "0.7485814", "0.7448111", "0.744472", "0.7380098", "0.7378432", "0.73762304", "0.7349635",...
0.7745454
4
get the Patient full name return string (fname .lname)
public function fullName(){ $title = ($this->gender=='Male')? 'Mr.': 'Ms.'; return $title.' '.$this->fname. ' '. $this->lname ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFullname()\n {\n return $this->firstname . ' ' . $this->lastname;\n }", "public function getFullName(){\n\n return \"{$this->firstname}{$this->lastname}\";\n }", "public function getFullName()\n {\n return \"{$this->lastname} {$this->firstname} {$this->patro...
[ "0.81022704", "0.8075574", "0.8052038", "0.8025944", "0.8014175", "0.8014175", "0.7943", "0.79390204", "0.78893054", "0.78847337", "0.788409", "0.78804046", "0.78659165", "0.7848581", "0.7846206", "0.78433394", "0.78234", "0.78224725", "0.7802384", "0.7787938", "0.7785376", ...
0.7740121
28
get the Patient Address
public function fullAddress(){ return ' '.$this->house. ' '. $this->address. ', '. $this->postcode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_address()\n\t{\n\t\treturn $this->m_address;\n\t}", "public function getAddress()\n {\n \treturn $this->address;\n }", "public function getAddress(){\r\n\t\treturn $this->address;\r\n\t}", "public function getAddress()\n\t{\n\t\treturn $this->data['address'];\n\t}", "public fu...
[ "0.74457544", "0.74345577", "0.74237263", "0.7400296", "0.7385982", "0.734468", "0.7312193", "0.7306137", "0.729366", "0.72571164", "0.72571164", "0.72482026", "0.7222612", "0.7220979", "0.7220979", "0.7220979", "0.7220979", "0.7220979", "0.7220979", "0.7220979", "0.7220979",...
0.6746702
56
return all appointments for today
public function todayAppointments(){ $today = Carbon::today()->format('Y-m-d'); //dd($today); return $this->appointments()->whereDate('date',$today)->orderby('date','asc'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAppointments()\n {\n $search['office'] = (auth()->user()->offices->count()) ? auth()->user()->offices->first()->id : '';\n\n $search['date1'] = isset($search['date1']) ? Carbon::parse($search['date1']) : '';\n $search['date2'] = isset($search['date2']) ? Carbon::parse($s...
[ "0.74740237", "0.71332127", "0.6835558", "0.6817955", "0.6792229", "0.6659481", "0.6588427", "0.65401274", "0.65291023", "0.6524496", "0.6524496", "0.6524496", "0.65140134", "0.65131205", "0.6485515", "0.6428696", "0.6383067", "0.6329027", "0.6329027", "0.6307852", "0.6284065...
0.74957526
0
Show all dogs Get a JSON representation of all the dogs
public function index(Request $request) { //kalau nak return all tanpa parameter //return $this->collection(Facility::all(), new FacilityTransformer); //kalau nak return ade filtering parameter if ($request->has('nama')||$request->has('negeri')||$request->has('daerah')||$request->ha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listDog()\n \t{\n \t\t$dogs = Dog::withoutGlobalScope(PriceScope::class)->whereBetween('price', [100, 2000])->get();\n \t\treturn view('exam.home',compact('dogs'));\t\n \t}", "public function getAllDogs(Request $request)\n {\n\n $request = Request::createFromGlobals();\n $page = ...
[ "0.7451124", "0.73499125", "0.72616845", "0.69289976", "0.67720056", "0.6748616", "0.6672904", "0.66431487", "0.6636841", "0.65981245", "0.6596574", "0.6482242", "0.644905", "0.6416991", "0.6376585", "0.63718206", "0.6348288", "0.6299913", "0.6276535", "0.62685317", "0.626590...
0.0
-1
Store a new dog in the database.
public function store(FacilityRequest $request) { return Facility::create($request->only(['fac_code','fac_name','fac_add','fac_postcode','fac_city','fac_district','fac_state','fac_telno','fac_faxNo','fac_hcategory','fac_ministry','fac_category' ])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Dog $dog, Request $request)\n {\n $this->validate($request,[\n 'activity_id'=>'required',\n 'duration'=>'int|min:1',\n ]);\n $request->merge(['dog_id'=> $dog->id]);\n DogActivity::create($request->all());\n\n return redirect(route('d...
[ "0.6897191", "0.6852598", "0.6572853", "0.61607105", "0.6142625", "0.6099078", "0.60548395", "0.60537565", "0.5957351", "0.59506434", "0.5941333", "0.59043103", "0.58900017", "0.58830315", "0.5870163", "0.5851554", "0.5822885", "0.58077496", "0.5780879", "0.57725793", "0.5751...
0.0
-1
Display the specified resource.
public function show($id) { return $this->item(Facility::findOrFail($id), new FacilityTransformer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Update the dog in the database.
public function update(FacilityRequest $request, $id) { $facility = Facility::findOrFail($id); $facility->update($request->only(['fac_code','fac_name','fac_add','fac_postcode','fac_city','fac_district','fac_state','fac_telno','fac_faxNo','fac_hcategory','fac_ministry','fac_category' ])); ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postEditDog($dog)\n {\n $rules = array(\n 'name' => 'required|max:32', \n 'kennel_prefix' => 'max:5',\n 'image_url' => 'max:255|image_url:png,gif,jpeg|image_url_size:<=700,<=500', \n 'notes' => 'max:10000',\n );\n\n ...
[ "0.6721816", "0.6620883", "0.65648544", "0.6461888", "0.6439406", "0.63850397", "0.63402176", "0.6228897", "0.62143326", "0.61902803", "0.61837274", "0.6161746", "0.61451685", "0.6075297", "0.6046318", "0.6034924", "0.59771085", "0.59630084", "0.5932775", "0.5919881", "0.5909...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { return Facility::destroy($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Create and get from a mixed $subject
public static function from($subject) { if ($subject instanceof ModelInterface) { $ret = call_user_func_array('static::fromModel', func_get_args()); } elseif ($subject instanceof ResultsetInterface) { $ret = call_user_func_array('static::fromResultset', func_get_args()); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createSubject( $subject )\n {\n \n $request = new Request( \n 'POST', \n self::ENDPOINT_URL . '/subjects/', \n [ 'content-type' => 'application/json' ], \n json_encode($subject->toArray())\n );\n \n \n $respons...
[ "0.68919307", "0.67159295", "0.65651524", "0.65612143", "0.65374964", "0.6387926", "0.63489485", "0.59224516", "0.58480406", "0.58133966", "0.58133966", "0.58133966", "0.58133966", "0.58133966", "0.58133966", "0.58133966", "0.5806838", "0.5806838", "0.5806838", "0.57397157", ...
0.6729747
1
Create and get from a Model
public static function fromModel(ModelInterface $subject) { $reflection = new \ReflectionClass(__CLASS__); $instance = $reflection->newInstanceArgs(func_get_args()); return $instance->execute()->get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->modelManager->instance($this->model);\n }", "public function create(): Model;", "public function create(Model $model);", "static function Create() \n\t{\n if (NULL == self::$userModel) {\n self::$userModel = new UserModel();\n ...
[ "0.69898605", "0.68235415", "0.67063034", "0.6677367", "0.6629197", "0.6618596", "0.6614139", "0.65641963", "0.6557883", "0.6552055", "0.65394986", "0.6492876", "0.64752495", "0.6467825", "0.6452971", "0.64065707", "0.6391991", "0.63608754", "0.6353148", "0.6323329", "0.63152...
0.0
-1
Create and get from a Resultset
public static function fromResultset($subject) { $reflection = new \ReflectionClass(__CLASS__); $instance = $reflection->newInstanceArgs(func_get_args()); return $instance->execute()->get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function factory_set( $resultset, $self = False )\n {\n $set = array();\n\n foreach ($resultset as $row) {\n $obj = $this->factory_item($row, $self);\n $obj->loaded = True;\n $set[] = $obj;\n }\n\n return $set;\n }", "private function _cre...
[ "0.6689762", "0.63832927", "0.6276974", "0.62755764", "0.62457997", "0.6131868", "0.6101183", "0.6039166", "0.6028268", "0.6018519", "0.60160494", "0.6001742", "0.5969818", "0.59491426", "0.5940522", "0.5894371", "0.58851403", "0.5873768", "0.5859929", "0.5816725", "0.5814817...
0.6216743
5
Parses the arguments that will be resolved to Relation instances
public static function parseArguments(array $arguments) { if (empty($arguments)) { throw new \InvalidArgumentException('Arguments can not be empty'); } $relations = []; foreach ($arguments as $relationAlias => $queryConstraints) { if (is_string($relationAlia...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function relations();", "public function testParseArgumentsCanParseRuleArguments()\n {\n $this->assertEquals(['min' => 10, 'max' => 100], $this->ruleParse->parseArguments('min=10,max=100'));\n $this->assertEquals([0 => 10, 1 => 100], $this->ruleParse->parseArguments('10,100'));\n }",...
[ "0.5558806", "0.5533093", "0.54748654", "0.54435164", "0.5401782", "0.51215535", "0.5103562", "0.5103562", "0.5103562", "0.5103562", "0.5103562", "0.5103562", "0.5103562", "0.5103562", "0.5103562", "0.51034975", "0.5095997", "0.5095997", "0.5095997", "0.5095997", "0.5095997",...
0.6385314
0
Returns always the same instance of this plugin.
public static function get_instance() { if ( ! self::$instance ) { self::$instance = new self(); } return self::$instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_instance() {\n\t\t\t// Store the instance locally to avoid private static replication\n\t\t\tstatic $instance = null;\n\n\t\t\tif ( null === $instance ) {\n\t\t\t\t$instance = new self();\n\t\t\t\tself::_setup_plugin();\n\t\t\t}\n\n\t\t\treturn $instance;\n\t\t}", "public function getI...
[ "0.7822202", "0.780008", "0.77917904", "0.7741688", "0.7716762", "0.77058506", "0.7694209", "0.7694209", "0.76834464", "0.76693386", "0.76642394", "0.76513267", "0.76513267", "0.76305", "0.76230353", "0.76115733", "0.76115733", "0.76115733", "0.76115733", "0.7590571", "0.7586...
0.0
-1
Indicates whether it is permitted to notify about a post or not.
public function is_post_notifiable( $post, $action ) { if ( ! $post || ! is_a( $post, 'WP_Post' ) ) { return false; } // All actions can notify about handbooks. $notifiable_post_types = array( 'handbook' ); // There's a large number of custom handbooks, and more will be created in the future. if ( str_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canPost()\n {\n $role = $this->role;\n if($role == 'author' || $role == 'admin')\n {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'DELETE':\n ...
[ "0.6946952", "0.6498154", "0.64958954", "0.649266", "0.64653337", "0.63537335", "0.6348838", "0.63475245", "0.6334246", "0.62739605", "0.627186", "0.6266791", "0.62631756", "0.6263084", "0.62560534", "0.62535495", "0.6237207", "0.62103105", "0.61896163", "0.61710155", "0.6153...
0.6300419
9
Only send notification for post getting published.
public function maybe_notify_new_published_post( $new_status, $old_status, $post ) { if ( 'publish' != $new_status ) { return; } if ( $old_status == $new_status ) { return; } if ( ! $this->is_post_notifiable( $post, 'publish' ) ) { return; } $this->notify_blog_post( $post, 'new' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _sf_send_user_publish_note($new_status, $old_status, $post) {\n\t\tif($post->post_type == 'spot') {\n\t\t\t\n\t\t\t$user = get_user_by('id', $post->post_author);\n\t\t\t\n\t\t\t//// IF THIS POST IS BEING PUBLISHED AND THE AUTHOR IS A SUBMITTER\n\t\t\tif($old_status != 'publish' && $new_status == 'publish'...
[ "0.7212498", "0.71627766", "0.7153691", "0.70109665", "0.70063597", "0.69323134", "0.6919806", "0.67551273", "0.67494625", "0.673192", "0.66867995", "0.6670828", "0.65812236", "0.6457386", "0.6454994", "0.64511937", "0.6448927", "0.6427889", "0.63557726", "0.63551277", "0.635...
0.6428538
17
Sends activity notification for new blog post.
public function notify_blog_post( $post, $type ) { if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { return; } $user_id = 'new' === $type ? $post->post_author : get_current_user_id(); $user = get_user_by( 'id', $user_id ); $content = wp_trim_words( strip_shortcodes( has_excerpt( $post ) ? $post->p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function attachPostToBlogAtTheEnd() {}", "function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password)\n {\n }", "public function post()\n\t{\n\t\t$crud = $this->generate_crud('blog_posts');\n\t\t$crud->columns('author_id', 'category_id', 'title', 'image_url', 'tags', 'publish_ti...
[ "0.68137056", "0.64132994", "0.63637364", "0.6353758", "0.62696505", "0.6222222", "0.61442786", "0.59877443", "0.5967703", "0.5925621", "0.5914046", "0.5909623", "0.5892857", "0.5856362", "0.5838192", "0.58232075", "0.58009815", "0.5796611", "0.5778905", "0.5729601", "0.57069...
0.66869944
1
Send an activity notification if the post being updated matches certain criteria.
public function maybe_notify_updated_post( int $post_id, WP_Post $before, WP_Post $after ) : void { if ( 'publish' !== $before->post_status || 'publish' !== $after->post_status ) { return; } if ( ! $this->is_post_notifiable( $after, 'update' ) ) { return; } $this->notify_blog_post( $after, 'update' );...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bp_activity_action_post_update() {\n\n\t// Do not proceed if user is not logged in, not viewing activity, or not posting\n\tif ( !is_user_logged_in() || !bp_is_activity_component() || !bp_is_current_action( 'post' ) )\n\t\treturn false;\n\n\t// Check the nonce\n\tcheck_admin_referer( 'post_update', '_wpno...
[ "0.66687524", "0.65186733", "0.6103425", "0.6051098", "0.6051098", "0.5910067", "0.5798327", "0.5696704", "0.5664538", "0.56612223", "0.56170344", "0.55855864", "0.5571894", "0.5570715", "0.5523245", "0.55169713", "0.5510293", "0.5496269", "0.5494897", "0.5487062", "0.5472054...
0.5646448
10
Handler for comment creation.
public function insert_comment( $id, $comment ) { if ( 1 == $comment->comment_approved ) { $this->maybe_notify_new_approved_comment( 'approved', '', $comment ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create($comment)\n {\n\n }", "public function doCreateComment()\n {\n if (isset($_POST)) {\n if (!$this->comment_is_valid($_POST['text'])) {\n header('Location: /post/details/?id=' . $_POST['post_id']);\n exit();\n }\n $te...
[ "0.7683835", "0.7591246", "0.753815", "0.74653035", "0.73861", "0.7334397", "0.7331976", "0.7209214", "0.71656436", "0.7154594", "0.7142718", "0.7119131", "0.6975333", "0.69745785", "0.691397", "0.6892956", "0.6876621", "0.6862857", "0.68408585", "0.6825996", "0.68184924", ...
0.0
-1
Only send notification for comment getting published on a public post.
public function maybe_notify_new_approved_comment( $new_status, $old_status, $comment ) { if ( 'approved' != $new_status ) { return; } $post = get_post( $comment->comment_post_ID ); if ( ! $this->is_post_notifiable( $post, 'comment' ) ) { return; } if ( apply_filters( 'wporg_profiles_wp_activity-is...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function comment_post($id_comment){\n if(!(($id_user = PDOQueries::get_post_publisher_id_by_comment($id_comment)) > 0) || !(($id_post = PDOQueries::get_post_id_by_comment($id_comment)) > 0) || !(($id_publisher = PDOQueries::get_publisher_id($id_post)) > 0))\n throw new \\PersonalizeExcepti...
[ "0.6552116", "0.65290844", "0.6394561", "0.6351165", "0.6287217", "0.626058", "0.616753", "0.61293286", "0.60957456", "0.6051083", "0.60471225", "0.6010277", "0.59532756", "0.5885874", "0.5859183", "0.5802466", "0.57987803", "0.5796491", "0.5789107", "0.5758429", "0.5755578",...
0.0
-1
Sends activity notification for new comment.
private function notify_new_approved_comment( $comment, $post ) { if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { return; } if ( ! $comment->user_id ) { return; } if ( ! $user = get_user_by( 'id', $comment->user_id ) ) { return; } $args = array( 'action' => 'wporg_handle_activity', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function comment($comment) {\n $comment['InsertUserID'] = Gdn::session()->UserID;\n $comment['DateInserted'] = Gdn_Format::toDateTime();\n $comment['InsertIPAddress'] = ipEncode(Gdn::request()->ipAddress());\n\n $this->Validation->applyRule('ActivityID', 'Required');\n $th...
[ "0.7074814", "0.6581473", "0.6519927", "0.64650357", "0.64277303", "0.6328328", "0.63116556", "0.62874657", "0.6272671", "0.62661654", "0.6254638", "0.6215995", "0.6167386", "0.6166804", "0.61505485", "0.6144829", "0.61312264", "0.6105554", "0.6081027", "0.6080401", "0.605578...
0.6245018
11
Handler to actual send topicrelated activity payload.
private function notify_forum_topic_payload( $activity, $topic_id ) { if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { return; } if ( ! bbp_is_site_public() ) { return; } if ( ! in_array( $activity, array( 'create-topic', 'remove-topic' ), true ) ) { return; } if ( 'create-topic' === $activi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onSend($msg){\n $data = json_decode($msg);\n $action = isset($data['action'])? $data['action']:'';\n echo \"Message has been sent\";\n \n if(array_key_exists($action,$this->subscriber_topics)){\n echo \"Received msg, broacasting to $action\";\n ...
[ "0.58663356", "0.5851877", "0.5630609", "0.562751", "0.5621317", "0.5369642", "0.5323702", "0.53118145", "0.5306066", "0.5263835", "0.52325994", "0.5181421", "0.51743144", "0.517253", "0.51522344", "0.5148622", "0.5145064", "0.5125137", "0.51244366", "0.511293", "0.5111846", ...
0.59201396
0
Handler for bbPress 2.x topic creation.
public function notify_forum_new_topic( $topic_id ) { $this->notify_forum_topic_payload( 'create-topic', $topic_id ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTopic($name)\n\t{\n\t\tif(trim($name) == \"\")return $this->message(FORUM_URES_MEZO);\n\t\tif($this->isHavePriv(FORUM_PRIV_TOPIC_CREATE))\n\t\t\treturn mysql_query(\t\"INSERT INTO `\".$this->prefix.\"topic`(`topic_name`,`topic_cat`,`topic_created_by`,`topic_created_time`) \".\n\t\t\t\t\t\t\t\"VALUES...
[ "0.6828663", "0.68250346", "0.6725831", "0.66038287", "0.6531424", "0.6470523", "0.6449085", "0.64423406", "0.6397481", "0.63533056", "0.6300511", "0.6279599", "0.62673575", "0.62354296", "0.6209599", "0.62063545", "0.6178266", "0.6175403", "0.6158153", "0.61051166", "0.61008...
0.56690097
53
Handler for bbPress 2.x topic removal.
public function notify_forum_remove_topic( $topic_id ) { $this->notify_forum_topic_payload( 'remove-topic', $topic_id ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delTopic()\n{\n global $xoopsDB, $xoopsModule;\n if (!isset($_POST['ok'])) {\n xoops_cp_header();\n echo \"<h4>\" . _AM_CONFIG . \"</h4>\";\n $xt = new XoopsTopic( $xoopsDB->prefix(\"topics\"), intval($_GET['topic_id']));\n xoops_confirm(array( 'op' => 'delTopic', 'topic_...
[ "0.7078982", "0.6758631", "0.66834825", "0.6506726", "0.64985037", "0.6476011", "0.6476011", "0.6472596", "0.6454901", "0.621463", "0.6197819", "0.6182261", "0.6167564", "0.6079395", "0.60258", "0.5997779", "0.59628636", "0.5890783", "0.5865372", "0.58490914", "0.58103573", ...
0.60632074
14
Handler to actual send replyrelated activity payload.
private function notify_forum_reply_payload( $activity, $reply_id ) { if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { return; } if ( ! bbp_is_site_public() ) { return; } if ( ! in_array( $activity, array( 'create-reply', 'remove-reply' ), true ) ) { return; } if ( 'create-reply' === $activi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handleSendMessage() {\n\t\t$json = file_get_contents(\"php://input\"); //vytánutí všech dat z POST požadavku - data ve formátu JSON\n\t\t$data = Json::decode($json); //prijata zprava dekodovana z JSONu\n\t\t$user = $this->getPresenter()->getUser();\n\t\t$addMessage = $this->addMessage($data, $user)...
[ "0.6169334", "0.59198314", "0.58171904", "0.5810356", "0.57903534", "0.57624507", "0.5705407", "0.5593771", "0.55916256", "0.5579155", "0.5577242", "0.55150706", "0.5488588", "0.54560393", "0.54274815", "0.54251635", "0.5414153", "0.5409192", "0.54054177", "0.53943425", "0.53...
0.5424185
16
Handler for bbPress 2.x topic reply creation.
public function notify_forum_new_reply( $reply_id ) { $this->notify_forum_reply_payload( 'create-reply', $reply_id ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function post_new_reply() {\n\tglobal $core, $document, $user, $boards, $threads, $posts, $db;\n\n\tif (!isset($_POST['thread_id']) || !isset($_POST['board_id']) || !isset($_POST['post_name']) || !isset($_POST['post_message'])) {\n\t\tfatal_error(\"Some or all of the information needed to post a new message are mi...
[ "0.6433204", "0.63981426", "0.62645346", "0.6187317", "0.61816645", "0.5976613", "0.5912857", "0.586522", "0.58437425", "0.58437246", "0.580418", "0.5795628", "0.5735919", "0.5731526", "0.56957704", "0.569095", "0.5679141", "0.5656749", "0.56464195", "0.56070656", "0.5605485"...
0.53963524
40
Handler for bbPress 2.x topic reply removal.
public function notify_forum_remove_reply( $reply_id ) { $this->notify_forum_reply_payload( 'remove-reply', $reply_id ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Gou_Service_ForumReply::getForumReply($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t$ret = Gou_Service_ForumReply::deleteForumReply($id);\n\t\tif (!$ret) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成...
[ "0.6173243", "0.6110355", "0.60386443", "0.59335697", "0.5903056", "0.58861184", "0.5884807", "0.58078104", "0.5772329", "0.5745504", "0.5729409", "0.5707725", "0.5707725", "0.56719047", "0.56715876", "0.56681883", "0.5620603", "0.5610656", "0.5610656", "0.55762625", "0.55628...
0.5537144
23
Returns the excerpt of the reply. This is similar to `bbp_get_reply_excerpt()` except: Excerpt length is by number of words and not number of characters. Omits inclusion of any blockquoted text.
public function get_reply_excerpt( $reply_id = 0, $words = 15 ) { $reply_id = bbp_get_reply_id( $reply_id ); $excerpt = get_post_field( 'post_excerpt', $reply_id ); if ( ! $excerpt ) { $excerpt = bbp_get_reply_content( $reply_id ); } $excerpt = $this->trim_text( $excerpt, $words, 'words' ); return app...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function excerpt()\n {\n if (!$this->desc()->empty()) {\n $excerpt = $this->desc();\n } else {\n $excerpt = excerpt($this->text(), $length = 40, $mode = 'words');\n };\n\n return $excerpt;\n }", "public function excerpt()\n\t{\n\t\treturn ( ! empty($...
[ "0.76515836", "0.7562194", "0.7428226", "0.73379225", "0.7081189", "0.6987638", "0.69305927", "0.6787165", "0.67100835", "0.66077137", "0.65599805", "0.65590245", "0.65588135", "0.6514126", "0.6487091", "0.6386918", "0.6380975", "0.6323266", "0.63138306", "0.62950516", "0.625...
0.648478
15
Trims text by words or characters.
public function trim_text( $text, $length = 15, $trim_style = 'words' ) { $length = (int) $length; $trim_style = in_array( $trim_style, array( 'chars', 'words' ), true ) ? $trim_style : 'words'; // Remove blockquoted text since the text isn't original. $text = preg_replace( '/<blockquote>.+?<\/blockquote>/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function clean($text)\n {\n $text = preg_replace('/\\W+/', '', $text);\n \n // trim and lowercase\n $text = strtolower(trim($text, '-'));\n \n return $text;\n }", "function sanifyText($text) {\n // todo whitespace stripping removes commas \"ostuh,otuh\" and concats the words\n /...
[ "0.69188327", "0.66766316", "0.66430444", "0.63031006", "0.62658346", "0.6256051", "0.6241119", "0.616963", "0.61289316", "0.6115035", "0.6071767", "0.60407156", "0.60137826", "0.59885806", "0.59490436", "0.5881841", "0.58650196", "0.58650196", "0.5826245", "0.57644933", "0.5...
0.56967753
23
Create New User name User Name email unique email type user/admin dob date of birth address profession
public function create(Request $request) { try{ $data = $request->all(); $data['email_verified_at'] = Carbon::now(); $data['password'] = Hash::make($data['password']); $created = User::create($data); if(isset($created)){ return r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function CreateUser(string $name, \n string $username, \n string $email, \n string $password, \n string $birthdate)\n {\n\n }", "public function createUser();", "public funct...
[ "0.7457281", "0.73658985", "0.73658985", "0.73658985", "0.73658985", "0.73649424", "0.7346559", "0.7329289", "0.72126853", "0.7200816", "0.7191553", "0.71124655", "0.71086645", "0.71002537", "0.70262283", "0.70057905", "0.70048046", "0.6996431", "0.699579", "0.6972558", "0.69...
0.0
-1
/ Copyright (C) 2010, All Rights Reserved. This file is part of RPInventory. RPInventory is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. RPIn...
function paginate( $smarty, $itemVarName, $currentSortIndex, $currentSortDir, $mode ){ require_once('lib/SmartyPaginate.class.php'); SmartyPaginate::reset(); /* Remove the old session data */ SmartyPaginate::connect(); SmartyPaginate::setLimit( 15 ); $smarty->assign( $itemVarName, getPaginatedResults( $smar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function smarty_function_itemname($params, $smarty)\n{\n if(isset($params['id'])){\n return aioncp::GetInstance()->get_item_name($params['id']);\n }\n\n}", "function smarty_function_echo($params, &$smarty)\n{\n if(isset($smarty->parent->tpl_vars[$params['var']]))\n {\n return $smarty->...
[ "0.66824406", "0.640931", "0.6351606", "0.6045967", "0.600682", "0.5994472", "0.59510165", "0.59400827", "0.5926806", "0.58821535", "0.58789176", "0.5868464", "0.58200896", "0.5808499", "0.5799845", "0.5765845", "0.5744255", "0.57057756", "0.5702797", "0.5692192", "0.56902736...
0.0
-1
For internal only. DO NOT USE IT.
public function deserialize($param) { if ($param === null) { return; } if (array_key_exists("Bucket",$param) and $param["Bucket"] !== null) { $this->Bucket = $param["Bucket"]; } if (array_key_exists("Region",$param) and $param["Region"] !== null) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "private function __() {\n }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}...
[ "0.62667596", "0.61522275", "0.5991058", "0.5991058", "0.5991058", "0.5991058", "0.599059", "0.599059", "0.599059", "0.599059", "0.599059", "0.599059", "0.59895796", "0.59895796", "0.594942", "0.59396714", "0.591702", "0.591702", "0.58706886", "0.5867353", "0.58557546", "0....
0.0
-1
Zapis danych do pliku z backupem
public function saveTablesToFile($name=null, $filename) { /** jeżeli bez parametru to wszystkie tabele */ if(!isset($name)) { $tables = $this->getTablesList(); } /** jeżeli parametr do tablica */ elseif(isset($name) && is_array($name)) { $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFile ();", "public function getFile();", "public function getFile();", "public function getFile() {}", "public function getFile() {}", "public function downloadFile();", "public function getFilepath();", "function download_lampiran_surat_keluar($id_sk)\n {\n $...
[ "0.639199", "0.63614154", "0.63614154", "0.6337063", "0.63362867", "0.6272049", "0.6249494", "0.6152773", "0.60841537", "0.6077122", "0.60715663", "0.60022604", "0.60022604", "0.60022604", "0.59802437", "0.59802437", "0.59802437", "0.59802437", "0.5946574", "0.59350204", "0.5...
0.0
-1
Duplicate of $wpdb::esc_like. Can be replaced once we bump WordPress version dependency to 4.0+
function esc_like($text) { return addcslashes($text, '_%\\'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function esc_like($text)\n {\n }", "public static function safe_sql_like($string){\n global $wpdb;\n\n // safe\n $string = $wpdb->prepare(\"%s\", $string);\n // trim '\n $tmp = explode(\"'\", $string);\n array_shift($tmp);\n array_pop($tmp);\n...
[ "0.6816773", "0.65232337", "0.6176501", "0.60905325", "0.6058176", "0.59971786", "0.5912803", "0.58647007", "0.5745022", "0.5730965", "0.571829", "0.57169956", "0.5683524", "0.5646241", "0.56397337", "0.5632102", "0.56103677", "0.55994177", "0.5580921", "0.5564723", "0.551404...
0.6382939
2
Checks if given file is an image based on mime type.
function is_image($file) { $type = get_image_type($file); $mime = get_image_mime_type($type); return substr($mime, 0, 5) == 'image'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isImage()\n {\n return strtolower(substr($this->getMimeType(), 0, 5)) == 'image';\n }", "public function isImage()\n {\n return str_contains($this->mimetype, 'image/');\n }", "public function isImage()\n {\n $mime_type = $this->getMimeType() ?: $this->detectM...
[ "0.7998941", "0.798145", "0.7931971", "0.78337795", "0.7780923", "0.77540976", "0.77496356", "0.77299255", "0.77058524", "0.76602066", "0.76510376", "0.7542194", "0.75233656", "0.74584746", "0.7403115", "0.73764265", "0.737469", "0.7367184", "0.7351188", "0.7326479", "0.73247...
0.83122104
0
Are we on the WordPress Settings API save page? DO NOT USE filter_input here. There seems to be a PHP bug that on some systems prevents filter_input to work for INPUT_SERVER and INPUT_ENV.
function is_options_save_page() { $self = $_SERVER['PHP_SELF']; $request = $_SERVER['REQUEST_URI']; return stripos($self, 'options.php') !== false || stripos($request, 'options.php') !== false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ffw_port_settings_sanitize( $input = array() ) {\n\n global $ffw_port_settings;\n\n parse_str( $_POST['_wp_http_referer'], $referrer );\n\n $output = array();\n $settings = ffw_port_get_registered_settings();\n $tab = isset( $referrer['tab'] ) ? $referrer['tab'] : 'general';\n ...
[ "0.6685326", "0.61415553", "0.61356187", "0.61083996", "0.608565", "0.60469514", "0.5985365", "0.5934731", "0.5927271", "0.5926812", "0.5841302", "0.5813109", "0.57908696", "0.5787945", "0.5781255", "0.5730901", "0.57296836", "0.57162905", "0.57050765", "0.56980973", "0.56966...
0.6341265
1
Are we on a Podlove Settings screen?
function is_podlove_settings_screen() { $screen = get_current_screen(); return stripos($screen->id, 'podlove') !== false && $screen->id != 'settings_page_podlove-web-player-settings'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_settings() {\n\t\t\t\tglobal $pagenow;\n\t\t\t\treturn is_admin() && $pagenow == $this->settings_parent && $_GET['page'] == $this->slug;\n\t\t\t}", "public function is_plugin_settings() {\n\n\t\treturn isset( $_GET['page'], $_GET['tab'] ) && 'wc-settings' === $_GET['page'] && 'pip' === $_GET['tab'];\...
[ "0.7601792", "0.71732724", "0.71638584", "0.7098602", "0.7015568", "0.66845447", "0.6675503", "0.6599174", "0.64648736", "0.6446677", "0.6445697", "0.64327866", "0.6432238", "0.6379396", "0.6368239", "0.63527364", "0.62000245", "0.61750424", "0.6094654", "0.6089445", "0.60812...
0.848778
0
Are we on an edit screen for episodes?
function is_episode_edit_screen() { $screen = get_current_screen(); return in_array($screen->base, ['edit', 'post']) && $screen->post_type == 'podcast'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function has_edit_screen(): bool { return true; }", "public function isEditFormShown() {}", "public function is_edit_page() {\n\t\t\tglobal $current_screen;\n\n\t\t\treturn in_array( $current_screen->id, (array) $this->_meta_box['pages'] );\n\t\t}", "protected function is_edit_page() {\n\t\treturn fal...
[ "0.791495", "0.7261454", "0.7122002", "0.68549705", "0.68472046", "0.6609266", "0.65801805", "0.65801805", "0.65569115", "0.64714736", "0.644012", "0.6424129", "0.64155513", "0.64130676", "0.6375586", "0.6364731", "0.6350217", "0.63103384", "0.6307443", "0.63019407", "0.62914...
0.8592952
0
Podcast Landing Page URL.
function get_landing_page_url() { $landing_page = \Podlove\get_setting('website', 'landing_page'); switch ($landing_page) { case 'homepage': return home_url(); break; case 'archive': if ('on' == \Podlove\get_setting('website', 'episode_archive')) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLandingPageUrl(): string\n {\n return $this->landingPageUrl;\n }", "function url()\n {\n return $this->peopletag->homeUrl();\n }", "public function getFrontPageUrl();", "public function getUrlForSplashPage(): string\n {\n return $this->generateChoiceUrl(...
[ "0.6584945", "0.6266145", "0.6186224", "0.61148417", "0.60507625", "0.60458946", "0.6032207", "0.5905409", "0.58291656", "0.57758963", "0.5744705", "0.57112247", "0.5651217", "0.5646959", "0.5636691", "0.5613903", "0.5597919", "0.5595516", "0.55790645", "0.5565443", "0.554827...
0.6026439
7
create slugs for text/titles
function slugify($slug) { $slug = trim($slug); // replace everything but unreserved characters (RFC 3986 section 2.3) and slashes by a hyphen $slug = preg_replace('~[^\\pL\d_\.\~/]~u', '-', $slug); $slug = rawurlencode($slug); $slug = str_replace('%2F', '/', $slug); return empty($slug) ? 'n-a' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function slugs();", "function sf_create_slugs()\n{\n\tglobal $wpdb;\n\n\t# forums\n\t$records=$wpdb->get_results(\"SELECT forum_id, forum_name, forum_slug FROM \".SFFORUMS);\n\tif($records)\n\t{\n\t\tforeach($records as $record)\n\t\t{\n\t\t\t$title = sf_create_slug($record->forum_name, 'forum');\n\t\t\ti...
[ "0.7816112", "0.7352862", "0.7160249", "0.7108114", "0.7080944", "0.7080944", "0.70447624", "0.7031364", "0.69838536", "0.696407", "0.6940289", "0.6940289", "0.688546", "0.6710421", "0.6528363", "0.6488925", "0.6476467", "0.6476151", "0.6425183", "0.64208984", "0.6382831", ...
0.0
-1
prepare an existing episode slug for use in URL
function prepare_episode_slug_for_url($slug) { $slug = trim($slug); $slug = rawurlencode($slug); // allow directories in slug return str_replace('%2F', '/', $slug); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createSlug() {\r\n \r\n $proposal = !empty($this->subject) ? substr(create_slug($this->subject), 0, 60) : $this->id;\r\n \r\n $result = $this->db->fetchAll(\"SELECT post_id FROM nuke_bbposts_text WHERE url_slug = ?\", $proposal); \r\n \r\n if (count($resul...
[ "0.6596095", "0.64756995", "0.62256926", "0.62190425", "0.62190425", "0.61237764", "0.6093455", "0.59840983", "0.59807336", "0.597703", "0.5959924", "0.5959924", "0.5959924", "0.5959924", "0.5935384", "0.5917748", "0.5912548", "0.5829948", "0.5818715", "0.5817684", "0.5782966...
0.81629515
0
iTunes category generator. Gratefully borrowed from powerpress.
function categories($prefix_subcategories = true) { $temp = []; $temp['01-00'] = 'Arts'; $temp['01-01'] = 'Design'; $temp['01-02'] = 'Fashion & Beauty'; $temp['01-03'] = 'Food'; $temp['01-04'] = 'Books'; $temp['01-05'] = 'Performing Arts'; $temp['01-06'] = 'Visual Arts'; $temp['02-0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function issuu_document_categories() {\n return array(\n '000000' => 'Unknown',\n '001000' => 'Auto & Vehicles',\n '002000' => 'Business & Marketing',\n '003000' => 'Creative',\n '004000' => 'Film & Music',\n '005000' => 'Fun & Entertainment',\n '006000' => 'Hobby & Home',\n '007000' => 'K...
[ "0.5693002", "0.5598186", "0.5574848", "0.5549675", "0.55261123", "0.55019057", "0.5456339", "0.5451833", "0.5441126", "0.5415014", "0.54074347", "0.54053885", "0.53769916", "0.53746605", "0.53699756", "0.5368163", "0.5364913", "0.53618485", "0.53604215", "0.5350838", "0.5338...
0.5201279
37
Un usuario se relaciona a un caso
public function casos() { return $this->hasOne('App\Caso'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function agregarUsuario(){\n \n }", "public function telaCadastroUsuario():void {\n $session =(Session::get('USER_AUTH'));\n if (!isset($session)) {\n $this->view('Home/login_viewer.php');\n }\n elseif ((int) Session::get('USER_ID')!==1) {\n Url:...
[ "0.7242818", "0.69337624", "0.6872422", "0.68023205", "0.6747905", "0.66934353", "0.66796505", "0.6676691", "0.6661754", "0.66554147", "0.6635119", "0.66178393", "0.6601649", "0.6573955", "0.6573873", "0.65582687", "0.6535543", "0.6527967", "0.6509618", "0.64968747", "0.64900...
0.0
-1
Un usuario puede tener varias actualizaciones en casos
public function actualizaciones() { return $this->hasMany('App\Actualizacioncaso'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actualizar(){\n }", "public function presupuestoModificado(){\n $this->iPresupuestoModificado = $this->iPresupuestoInicial;\n $this->save();\n }", "public function actualizar(){\n }", "public function actualizar(){\n }", "public function actualizar() {\n $ord ...
[ "0.68042487", "0.67675763", "0.6733117", "0.6733117", "0.65137994", "0.6472444", "0.64704186", "0.6391399", "0.63866514", "0.62865937", "0.6277645", "0.6272031", "0.6270816", "0.62503624", "0.6245995", "0.6238028", "0.6212144", "0.6203599", "0.6170402", "0.6169222", "0.616889...
0.0
-1
add messages to session at end of page
public function __destruct() { $_SESSION['mod_messages'] = $this->messages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setMessage()\r\n\t{\r\n\t\t$model = $this->getModel();\r\n\t\tif (!$model->isMultiPage()) {\r\n\t\t\t$this->assign('message', '');\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$message = '';\r\n\t\tif ($model->sessionModel) {\r\n\t\t\t$this->message = $model->sessionModel->status;\r\n\t\t\t//see http://fabrik...
[ "0.7014005", "0.6678771", "0.66640884", "0.6629124", "0.65650845", "0.65595144", "0.6553599", "0.6515858", "0.6491309", "0.6491241", "0.6491241", "0.6491241", "0.6491241", "0.6491241", "0.6491241", "0.6491241", "0.6491241", "0.6491241", "0.6491241", "0.6491241", "0.6491241", ...
0.6667904
2
Column name from database.
public function getName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function column_name(): mixed\n\t{\n\t\treturn self::$query->column_name;\n\t}", "abstract public static function get_column_name(): string;", "public function getColumnName();", "protected function getStaticDatabaseColumnName() {\r\n return self::$_databaseColumnName;\r\n }", "protect...
[ "0.805437", "0.8029624", "0.7761343", "0.7680524", "0.7680524", "0.7680524", "0.7680524", "0.76248", "0.7595736", "0.75872886", "0.7463314", "0.7445667", "0.74060565", "0.73756254", "0.73563874", "0.71960247", "0.716659", "0.70925176", "0.706511", "0.7016575", "0.6994096", ...
0.0
-1
Column type from database.
public function getType();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDbFieldType()\n {\n }", "public function getTypeColumn(): string\n {\n if (! isset($this->typeColumn)) {\n return 'type';\n }\n\n return $this->typeColumn;\n }", "public function getDataType(): string\n {\n return $this->col->getAttribute('data...
[ "0.7324146", "0.7318848", "0.7301678", "0.7298576", "0.7258094", "0.7258094", "0.7211228", "0.7187728", "0.70891476", "0.7085432", "0.70708907", "0.7070291", "0.7060033", "0.702823", "0.7022763", "0.69862676", "0.68949693", "0.6869052", "0.6869052", "0.6843515", "0.6810803", ...
0.0
-1
Comment from database and comment from related eloquent model.
public function getComment();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function comment()\n {\n return $this->hasMany(Comment::class);\n }", "public function comment()\n {\n return $this->hasMany('App\\Models\\Comment');\n }", "public function comment()\n {\n return $this->hasMany('App\\Comment');\n }", "public function comment(){\n...
[ "0.66370976", "0.6586649", "0.6543918", "0.6534941", "0.6491073", "0.6471365", "0.64028823", "0.636469", "0.62568307", "0.62504464", "0.6229184", "0.62193114", "0.61528355", "0.61310613", "0.6127786", "0.61272615", "0.6124493", "0.6124493", "0.6124493", "0.6124493", "0.612349...
0.5817353
82
Column options from database such as autoincrement, primary_key, unique and etc.
public function getOptions();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function columnTypes(): array\n {\n return [\n 'id' => '{{ name }} INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE',\n 'varchar' => '{{ name }} TEXT {{ null }} {{ default }} {{ unique }}',\n 'text' => '{{ name }} TEXT {{ null }} {{ default }} {{ uni...
[ "0.6460414", "0.61287063", "0.6087116", "0.60394865", "0.59596384", "0.5958163", "0.5924684", "0.59150743", "0.58910376", "0.5882412", "0.58157384", "0.58117324", "0.5807184", "0.579776", "0.57877064", "0.5784621", "0.5756197", "0.5743156", "0.5738453", "0.57273495", "0.57124...
0.0
-1
Verifica se existe esse registro no cache
public static function findById($id) { if(Cache::store('alunos')->has($id)) { //Caso exista, registra o hit event(new AlunosCacheHit); //E retorna o registro do cache return Cache::store('alunos')->get($id); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isExistInCache($key);", "function cacheObjectExists ()\n {\n return is_file($this->cacheObjectId);\n }", "function exists() {\n \n return !empty($this->cache);\n \n }", "public function isCached(): bool;", "public function VerificaCache($filename) {\n\t\t$caminho = '.....
[ "0.68570995", "0.6849608", "0.66467255", "0.6588022", "0.6519929", "0.6474882", "0.6390156", "0.6356531", "0.62487155", "0.6239915", "0.6234094", "0.6206231", "0.61965746", "0.61682737", "0.61428005", "0.6137727", "0.6130565", "0.61065924", "0.6102486", "0.6057535", "0.604450...
0.0
-1
A basic feature test employee.
public function test_list() { $response = $this->get('/api/employees'); $response->assertStatus(200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateEmployee()\n {\n }", "public function testGetEmployee()\n {\n }", "public function testGetEmployees()\n {\n }", "public function testEmployee()\n {\n $this->get('/api/employee');\n $this->assertEquals(\n Response::HTTP_OK,\n $...
[ "0.7746978", "0.73320866", "0.7323037", "0.6891005", "0.6851987", "0.6510909", "0.64976203", "0.62110114", "0.60784596", "0.6024902", "0.6017864", "0.5994299", "0.5990741", "0.5990741", "0.5990741", "0.5990741", "0.5990741", "0.5990741", "0.5990741", "0.5990741", "0.5990741",...
0.59793156
24
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('ALTER TABLE objectif ADD commercial_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE objectif ADD CONS...
{ "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.8006627", "0.791524", "0.791524", "0.791524", "0.75730014", "0.75629234", "0.7529499", "0.7499871", "0.7494279", "0.74551433", "0.7447644", "0.7435697", "0.7432973", "0.7429338", "0.74190396", "0.73792154", "0.73769516", "0.73694724", "0.7365056", "0.7352234", "0.73305804"...
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 objectif DROP FOREIGN KEY FK_E2F868517854071C'); $this->addSql('DROP INDEX IDX_E2F8685178...
{ "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
part of MStreaming bots functions
function echo_ok() { ob_start(); echo 'ok'; $length = ob_get_length(); header('Connection: close'); header("Content-Length: " . $length); header("Content-Encoding: none"); header("Accept-Ranges: bytes"); ob_end_flush(); ob_flush(); flush(); //fastcgi_finish_request(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callBackUpdate($_TELEGRAM, $th, $tc){\n // YOUR BOT CODE GOES HERE\n if ($_TELEGRAM['text'] == \"/start\")\n {\n send($_TELEGRAM['cid'], \"Hi! Welcome on MTgBot Example!\\nThis message was sent by Thread #$th.\\nThe Thread #$th sent $tc messages.\");\n }\n\n}", ...
[ "0.5854321", "0.58326393", "0.55366373", "0.5429408", "0.540141", "0.5376116", "0.53582835", "0.5343861", "0.5341707", "0.5325995", "0.53125864", "0.52734315", "0.52492565", "0.52455246", "0.5244981", "0.52270246", "0.5210585", "0.5197693", "0.51762086", "0.5164471", "0.51385...
0.0
-1
constructor function that is used when an instance of the SUV class is created (instantiated)
function __construct() { echo "Constructor called<br />"; $SUVSafety = $this->safetyRating; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _construct() {\n \t\n\t\t\n\t}", "function _construct(){ }", "function __construct() ;", "function __constructor(){}", "function __construct(){\n\t\t// nowt much...\n\t}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}",...
[ "0.73626226", "0.73085785", "0.7210464", "0.71857744", "0.7153384", "0.7034896", "0.7034896", "0.7034896", "0.7034896", "0.7034896", "0.7034896", "0.70122004", "0.6992978", "0.69800043", "0.69800043", "0.69800043", "0.6970457", "0.6967426", "0.69580746", "0.69580746", "0.6958...
0.68767816
50
get index location of last item in string
function stringAddTwo($num) { $lastNum = strlen($num) - 1; $finalNum = ""; //turn string into array $num = str_split($num); //if the last number is less than nine then simply add 1 and you're done if($num[$lastNum] < 9) { $num[$lastNum]++; foreach($num as $digit) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastCharIndex() {}", "function lastIndexOf($sourceString, $searchString) \r\n{\r\n\t$index = strpos(strrev($sourceString), strrev($searchString));\r\n\t$index = strlen($sourceString) - strlen($index) - $index;\r\n\treturn $index;\r\n}", "public function indexOfLast($needle, $offset = 0)\n {...
[ "0.7726579", "0.7648845", "0.7036031", "0.695422", "0.694326", "0.68797845", "0.68222296", "0.6802008", "0.6787976", "0.67687315", "0.6728938", "0.6704014", "0.6500268", "0.6447736", "0.6418956", "0.638407", "0.63694596", "0.62666714", "0.62383103", "0.6188142", "0.6176407", ...
0.0
-1
this will actually edit the passed variable in memory
function byRef(&$val) { $val++; return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function reassign() {\n\n\t\t}", "public function modify();", "abstract public function change();", "public function mutate();", "public function mutate();", "protected function remebmer_variable( $name, $value ){\n\t\tstatic::$instance->variables[$name] = $value;\n\t}", "abstract protect...
[ "0.64610827", "0.6425762", "0.6217435", "0.6154967", "0.6154967", "0.5909809", "0.5775182", "0.5761422", "0.5721953", "0.56966585", "0.5663098", "0.5604173", "0.55987424", "0.55691874", "0.5538712", "0.5515438", "0.5507225", "0.549149", "0.54746205", "0.54685456", "0.5460701"...
0.0
-1
this will make a copy of the passed variable and edit it
function byVal($val) { $val++; return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function reassign() {\n\n\t\t}", "function apply_fix($old_obj){\t\r\r\n\t\t// to be copied vars\r\r\n\t\t$vars = array('active_modules','active_plugins','setting');\r\r\n\t\t// set\r\r\n\t\tforeach($vars as $var){\r\r\n\t\t\t// var\r\r\n\t\t\t$this->{$var} = (isset( $old_obj->{$var} ) ) ? $old_obj-...
[ "0.6436727", "0.6036905", "0.59472734", "0.57987446", "0.5784976", "0.577117", "0.5710328", "0.5691594", "0.56220937", "0.5592928", "0.55898035", "0.55898035", "0.55880296", "0.55396765", "0.5527977", "0.5527402", "0.5509303", "0.55054355", "0.5488795", "0.5488795", "0.548879...
0.0
-1
Run the database seeds.
public function run() { $customer = new Customer(); $customer->id = 1; $customer->name = "customer 1"; $customer->phone = "2018-09-26"; $customer->email = "customer1@codegym.vn"; $customer->city_id = 5; $customer->save(); $customer = new Customer(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
getFoodTruckNearestLocation This method returns JSON data of all foodtrucks in a partular Latitude/Longitude retrieved from csv
public function getFoodTruckNearestLocation($lat, $lon ,$countOfLoc) { try { $rows = array_map('str_getcsv', file('../Mobile_Food_Facility_Permit.csv')); $header = array_shift($rows); $csv = array(); $counter = 1; $myJSON = array(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFoodTruckNearestLocationDB($lat, $lon ,$countOfLoc) {\r\n try{\r\n $query = \"\r\n SELECT * FROM (\r\n SELECT *, \r\n (\r\n (\r\n (\r\n ...
[ "0.65143555", "0.6391593", "0.5560715", "0.5535994", "0.54945916", "0.54651827", "0.5382494", "0.53443116", "0.5340008", "0.53354216", "0.5199319", "0.51734483", "0.51684", "0.515701", "0.51220787", "0.51204926", "0.5112165", "0.5102098", "0.5099035", "0.5032958", "0.5014162"...
0.73884773
0
getFoodTruckNearestLocationDB This method returns JSON data of all foodtrucks in a partular Latitude/Longitude retrieved from MYSQL db.
public function getFoodTruckNearestLocationDB($lat, $lon ,$countOfLoc) { try{ $query = " SELECT * FROM ( SELECT *, ( ( ( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFoodTruckNearestLocation($lat, $lon ,$countOfLoc) {\r\n try {\r\n $rows = array_map('str_getcsv', file('../Mobile_Food_Facility_Permit.csv'));\r\n $header = array_shift($rows);\r\n $csv = array();\r\n $counter = 1;\r\n $myJSON =...
[ "0.62735647", "0.6116956", "0.59083396", "0.5695926", "0.55033654", "0.5340375", "0.5322224", "0.5300415", "0.52903897", "0.5273668", "0.5233395", "0.5198685", "0.51730955", "0.51668566", "0.5162884", "0.5161274", "0.5120996", "0.51192355", "0.51150507", "0.5101921", "0.50933...
0.74327886
0
$sql = 'select distinct query from Reports.Reports where id in (' . $pendingReports . ')';
function fetchStoredQueries($pendingReports){ $sql = 'select distinct task from reporting.tasks'; $this->database->query($sql); $results = $this->database->resultSet(); return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_ids_for_in($sql,$col_name='id') {\n\t$rows = fetchAll($sql);\n\t$ids = array();\n\tforeach($rows AS $row) {\n\t\t$ids[] = $row[$col_name];\n\t}\n\tif (count($ids) == 0) $ids[] = '0';\n\treturn join(',',$ids);\n}", "public function getQuestionIds()\r\n{\r\n $query_string = \"SELECT questionid FROM...
[ "0.5831332", "0.58158416", "0.5757618", "0.5651377", "0.56060964", "0.560527", "0.54921037", "0.5489922", "0.5480918", "0.5472621", "0.5375201", "0.53651655", "0.5321976", "0.5299881", "0.5294847", "0.52901036", "0.52606684", "0.52389485", "0.52328706", "0.52324647", "0.52312...
0.6589
0
will assign valid report name once tables are ready
function processData($data){ $fileName = rand(1,10).'test.csv'; $formatData = json_decode($data, true); $headers = $this->formatHeaders($formatData); $rows = $this->formatRows($formatData); $this->createFile(array_unique($headers), $rows, $fileName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function nameReportFile(){\n $name= str_replace(' ','_',$this->nombrereporte).'_'.\n $this->id.'_'.h::userId().'_'.uniqid().'.'.$this->type;\n }", "protected abstract function getReportName() : string;", "private function initReport()\n {\n $this->report = new \\stdCl...
[ "0.62320596", "0.6183658", "0.60234815", "0.5959017", "0.59370863", "0.5846803", "0.58190644", "0.58131236", "0.5735573", "0.57320434", "0.5717014", "0.5658755", "0.56480473", "0.5629274", "0.56178766", "0.550497", "0.550497", "0.550394", "0.5487549", "0.545146", "0.5447515",...
0.0
-1
/ params format [ first_name last_name phoneNumber trakr_id user_id ]
public static function checkIfLoggedIn($conditions){ $firstname = isset($conditions['first_name']) ? $conditions['first_name'] : ""; $lastname = isset($conditions['last_name']) ? $conditions['last_name'] : ""; $phoneNumber = isset($conditions['phoneNumber']) ? $conditions['phoneNumber'] : ""; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function requestFirstname();", "public function requestSurname();", "function getPersonName($user) {\n if ($user==null || (!isset($user[\"lastname\"]) && !isset($user[\"firstname\"])) )\n return '';\n $ret =\"\";\n if (isset($user[\"title\"]))\n $ret = $user[\"title\"].' ';\n $...
[ "0.5785363", "0.5715713", "0.539201", "0.53585434", "0.53443265", "0.5260504", "0.52086633", "0.5207948", "0.5175861", "0.51687634", "0.51679206", "0.5163125", "0.5141774", "0.51208144", "0.5105209", "0.51007736", "0.5098209", "0.507301", "0.50632715", "0.5055364", "0.5015182...
0.0
-1
Add vat to site
public function up() { Schema::table('sites', function (Blueprint $table) { $table->float('vat')->default(21)->after('country_id'); }); // Add vat to sites_payments Schema::table('sites_payments', function (Blueprint $table) { $table->float('payment_vat')->default(21)->after('payment_rate'); }); // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cao_vip_page() {\r\n}", "public function vitimas() {\n $this->validaAutenticacao();\n $vitimas = Container::getModel('Vitimas');\n $this->view->vitimas = $vitimas->getAllDashboard();\n $vitimas->__set('id', '1');\n $this->view->vtm = $vitimas->getVitima();\n $th...
[ "0.5725555", "0.55576676", "0.55553806", "0.550532", "0.5476012", "0.5457993", "0.5447146", "0.5428132", "0.5308347", "0.5270654", "0.5225805", "0.522406", "0.5214832", "0.52024126", "0.5192554", "0.5185213", "0.5179061", "0.5163304", "0.5144589", "0.51444674", "0.51410246", ...
0.0
-1
Transform the resource into an array.
public function toArray($request) { return [ 'id' => $this->id, 'problem_id' => $this->problem_id, 'option_text' => $this->option_text, 'is_true' => $this->is_true, 'sort' => $this->sort, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function toArray(): array\n {\n if (is_null($this->r...
[ "0.7750928", "0.7750928", "0.7715773", "0.75906307", "0.7310379", "0.7138024", "0.7134791", "0.7096877", "0.7096877", "0.70968604", "0.70968604", "0.70968604", "0.70968604", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.7...
0.0
-1
Checks if the query entry is valid
public function isValid(QueryCacheKey $key, QueryCacheEntry $entry);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function valid()\n\t{\n\t\treturn $this->query->valid();\n\t}", "protected function validateQuery(): bool {\n\t\t$columnsCount = count($this->columns);\n\t\t$valuesCount = count($this->values);\n\t\tif ($columnsCount === 0 || $valuesCount === 0) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ($this->values as...
[ "0.71912116", "0.69873416", "0.63246804", "0.6310956", "0.62544566", "0.6224069", "0.62219656", "0.6192554", "0.6191364", "0.61497045", "0.61253554", "0.60465384", "0.60192657", "0.5981679", "0.59414047", "0.5902053", "0.5895677", "0.5889359", "0.5888374", "0.58738303", "0.58...
0.6562595
2
function __construct Constructor of the class, will be called in PHP5
public function __construct() { //$objCore = new Core(); //default constructor for this class }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _construct(){ }", "private final function __construct() {}", "function _construct() {\n \t\n\t\t\n\t}", "protected abstract function __construct();", "final private function __construct() {}", "final private function __construct() {}", "function __constructor(){}", "final private function...
[ "0.85815763", "0.8564649", "0.85088104", "0.84991115", "0.8468479", "0.8468479", "0.84665865", "0.8461628", "0.8457269", "0.8437333", "0.842158", "0.84191144", "0.841896", "0.84170556", "0.84170556", "0.84170556", "0.84170556", "0.84170556", "0.84170556", "0.84114534", "0.838...
0.0
-1
function invoiceList This function is used to display the invoice List. Database Tables used in this function are : tbl_invoice
function invoiceList($argWhere = '', $argLimit = '') { $varWhere = " 1 " . $argWhere; $varWhere = str_replace('fkWholesalerID','tbl_logisticinvoice.fkWholesalerID',$varWhere); //echo $varWhere = '1 AND tbl_logisticinvoice.fkWholesalerID IN (5,120,36,154,85,119,122,125,132,143,133,126,1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function invoice_list()\n {\n if (!get_permission('invoice', 'is_view')) {\n access_denied();\n }\n\n $branchID = $this->application_model->get_branch_id();\n if ($this->input->post('search')) {\n $this->data['class_id'] = $this->input->post('class_id');\...
[ "0.8318088", "0.83149314", "0.8101448", "0.7480902", "0.7218415", "0.71213675", "0.7023881", "0.70137495", "0.69743556", "0.69713706", "0.6951249", "0.69324535", "0.6884702", "0.68712956", "0.6813935", "0.67969304", "0.67772776", "0.67339534", "0.67298234", "0.6721195", "0.67...
0.720182
5
function viewInvoice This function is used to view the invoice . Database Tables used in this function are : tbl_invoice
function viewInvoice($argID, $varPortalFilter) { $varID = " FromUserType in('super-admin','user-admin') AND ToUserType = 'customer' AND pkInvoiceID ='" . $argID . "' " . $varPortalFilter; $arrClms = array( 'pkInvoiceID', 'fkOrderID', 'CustomerName', 'Custo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function invoice()\n\t{\n\t\t$tableName = 'master_invoice';\n\t\t$condition = array('send_status' => SENT);\n\t\t$result['invoice'] = $this->CustomModel->selectAllFromWhere($tableName, $condition);\n\t\t$result['count'] = ($result['invoice'] != 0) ? count($result['invoice']) : 0;\n\n\t\t$this->load->view('l...
[ "0.77131456", "0.7550216", "0.7402858", "0.7220962", "0.7219168", "0.7168501", "0.7164234", "0.7164234", "0.7164234", "0.7149205", "0.7120361", "0.70605505", "0.70223105", "0.69906026", "0.6976979", "0.69416827", "0.69383657", "0.6937983", "0.69285184", "0.69051737", "0.68916...
0.69584805
15
function removeInvoice This function is used to remove the invoice . Database Tables used in this function are : tbl_invoice
function removeInvoice($argPostIDs, $varPortalFilter) { $ctr = 0; if (isset($argPostIDs['deleteType']) && $argPostIDs['deleteType'] == 'sD') { $varWhereSdelete = " pkInvoiceID = '" . $argPostIDs['frmID'] . "' " . $varPortalFilter; $num = $this->delete(TABLE_INVOICE, $varWhereSde...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_invoice_items($id){\n $this->company_db->delete('tbl_invoice_item', array(\"header_id\"=>$id));\n }", "public function remove(): int {\n $where = 'invoice_id = ?';\n $values = [$this->invoiceId];\n return $this->delete($where, $values);\n }", "public function d...
[ "0.71376467", "0.7025082", "0.6896601", "0.68586695", "0.6800109", "0.66648006", "0.66648006", "0.66648006", "0.66648006", "0.66648006", "0.66648006", "0.66223586", "0.6615044", "0.65465087", "0.6542511", "0.6501806", "0.6494774", "0.6310268", "0.62761074", "0.6245779", "0.62...
0.6001635
33
Log::info('lenght of '.$appId.' is '. strlen($appId));
protected function genRefNo($appId) { return env('REF_PREFIX').(strlen($appId)<3? str_pad($appId, 4-(strlen($appId) ), "0", STR_PAD_LEFT): $appId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLength() {}", "public function getLength() {}", "public function getLength() {}", "public function getLength() {}", "function getPayloadLength();", "public function getLength(): int;", "public function getLength(): int;", "function getLength(): int\n {\n return $this->len...
[ "0.6623482", "0.6623482", "0.6623482", "0.6622914", "0.64988464", "0.6445004", "0.6445004", "0.64297515", "0.6421472", "0.6387477", "0.6387477", "0.6349549", "0.6321102", "0.62894446", "0.62504196", "0.61635333", "0.61251825", "0.6123524", "0.61180747", "0.6115277", "0.603792...
0.0
-1
Test login error messagebag.
public function testLoginError() { $response = $this->post('/login', ['email' => 'guest@guest.com']); $response->assertSessionHasErrors(['password']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testLoginFailedFunctionality()\n {\n $this->expectOutputString(\"err_login_failed\");\n $email = 'test@example.com';\n $ctrl = new Controller();\n // Give it the wrong password\n $ctrl->login($email,'wrong password');\n\n }", "public function test_fail_log...
[ "0.72976077", "0.7211856", "0.72001415", "0.7194656", "0.7149142", "0.6939885", "0.6877418", "0.67970085", "0.6767706", "0.6703715", "0.6697657", "0.668701", "0.66855484", "0.6662124", "0.66285294", "0.6624921", "0.66187966", "0.66072", "0.6591176", "0.65838015", "0.6552334",...
0.7768425
0
this is to let you categorise events into streams
function improv_analysis_analysis_edit() { ?> <div class="wrap"> <h1>Improv Analysis Editing</h1> <?php // Catch bad url_id in improv_analysis_analysis_edit_submit(), not here global $wpdb; $query = "SELECT * FROM improv_analysis_analyses WHERE ". "url_id = '".$wpdb->_real_escape(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __invoke()\n {\n foreach ($this->identityMap as $eventSourcedAggregateRoot) {\n $pendingStreamEvents = $this->aggregateTranslator->extractPendingStreamEvents($eventSourcedAggregateRoot);\n\n if (count($pendingStreamEvents)) {\n $this->streamStrategy->a...
[ "0.5672442", "0.54948413", "0.54948413", "0.5488594", "0.5463214", "0.54588133", "0.54588133", "0.54454726", "0.53373635", "0.5319139", "0.52828515", "0.52634954", "0.5258248", "0.52410316", "0.51671255", "0.51671255", "0.5153348", "0.5136496", "0.51184505", "0.511448", "0.50...
0.0
-1
For internal only. DO NOT USE IT.
public function deserialize($param) { if ($param === null) { return; } if (array_key_exists("Codec",$param) and $param["Codec"] !== null) { $this->Codec = $param["Codec"]; } if (array_key_exists("Fps",$param) and $param["Fps"] !== null) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "private function __() {\n }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}...
[ "0.62662613", "0.6151871", "0.5989886", "0.5989886", "0.5989886", "0.5989886", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5988404", "0.5988404", "0.5949015", "0.5939596", "0.59168774", "0.59168774", "0.58703923", "0.58665824", "0.5855589"...
0.0
-1
Display a listing of the resource.
public function index() { $employeelists = DB::table('employees')->get(); return view('employees.index')->with('employeelists', $employeelists); }
{ "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.7446737", "0.73625076", "0.7300871", "0.72476006", "0.7163127", "0.7149414", "0.7131995", "0.7105663", "0.7102927", "0.7101388", "0.704981", "0.69946545", "0.69897777", "0.6935023", "0.690029", "0.68989694", "0.68925905", "0.68878543", "0.6866467", "0.6849924", "0.6829784"...
0.0
-1
Show the form for creating a new resource.
public function create(Request $request) { $this->validate($request, [ 'fname' => 'required', 'lname' => 'required', ]); $employee = new Employee(); $employee->fname = $request['fname']; $employee->lname = $request['lname']; $employee-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { return view('employees.store'); }
{ "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(Employee $employee) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit(Employee $employee) { // }
{ "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.78548634", "0.7693446", "0.72737956", "0.72415876", "0.71732706", "0.7064379", "0.70547634", "0.6985193", "0.6948865", "0.6946892", "0.69416964", "0.6929201", "0.69028485", "0.6899143", "0.6899143", "0.68794435", "0.6864862", "0.6860578", "0.68581015", "0.6845792", "0.6836...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Employee $employee) { // }
{ "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(Employee $employee) { // }
{ "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
Declares the validation rules. The rules state that username and password are required, and password needs to be authenticated.
public function rules() { // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( array('key', 'required'), array('kind', 'safe'), ); }
{ "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.7668877", "0.7668877", "0.7487751", "0.7358184", "0.72875595", "0.7267254", "0.72525185", "0.72485185", "0.7214912", "0.7184532", "0.7146287", "0.71018624", "0.7060977", "0.7038148", "0.70349085", "0.70002043", "0.6995445", "0.6982238", "0.6912777", "0.6901249", "0.6887298...
0.0
-1
Declares customized attribute labels. If not declared here, an attribute would have a label that is the same as its name with the first letter in upper case.
public function attributeLabels() { return array( 'key' => Yii::t('form', 'Search'), //Yii::t('form', 'key'), 'kind' => Yii::t('form', 'kind'), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function attributeLabels()\n\t{\n\t}", "public static function label()\n {\n return __('Attributes');\n }", "public function attributeLabels()\n {\n return [\n 'name' => 'Name',\n 'type' => 'Type',\n 'description' => 'Description',\n 'ru...
[ "0.740033", "0.6952993", "0.6751836", "0.673617", "0.6688154", "0.66121286", "0.6590494", "0.65450895", "0.6523876", "0.6521726", "0.6491478", "0.6434854", "0.6384268", "0.6373291", "0.63622457", "0.6321261", "0.63204753", "0.62992", "0.62745917", "0.6263183", "0.6257995", ...
0.5717195
72
If location exists, it gets updated by IP address. Otherwise new row is inserted
private function storeLocation(GeoLocationItem $location) { try { $row = DB::table(IpInfoLocation::TABLE) ->where('ip', $location->ipAddress) ->first(); // Dunno why, but updateOrInsert call just throws an undefined method error. // Probab...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateLocation()\n {\n $core = Core::dbOpen();\n $sql = \"UPDATE program_locations SET city = :city, state = :state, zip = :zip\n WHERE locationID = :id\";\n $stmt = $core->dbh->prepare($sql);\n $stmt->bindParam(':city', $this->city);\n $stmt->bindParam(':state', $this->s...
[ "0.6711153", "0.632539", "0.6307383", "0.61594105", "0.6054637", "0.6026602", "0.602257", "0.599693", "0.5888941", "0.58303875", "0.57807565", "0.5773717", "0.57388145", "0.5719206", "0.57057923", "0.56735486", "0.56349283", "0.56100094", "0.56093854", "0.56065106", "0.558452...
0.7290895
0
For some IP addreses that could not be resolved a dash as value is randomly returned from API
private function getFilteredValue($value) { if ($value === '-') { return null; } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function anonymizeIpReturnsCorrectValueDataProvider() {}", "public static function invalidIpDataProvider() {}", "public function ObtenerIp()\n { \n\n return str_replace(\".\",\"\",$this->getIP()); //Funcion que quita los puntos de la IP\n\n }", "public static function validIpDataProvide...
[ "0.6714737", "0.64764386", "0.59983623", "0.59508896", "0.5948512", "0.5860382", "0.5858619", "0.58234715", "0.58148885", "0.57203794", "0.5671651", "0.56664664", "0.5653461", "0.5634075", "0.56334496", "0.5614806", "0.5607978", "0.56062055", "0.5586156", "0.5571645", "0.5555...
0.0
-1
this returns data which contains two array index values:
public function fetch_courses() { $config = array(); $config["base_url"] = base_url() . "Home/Student-Courses/"; $config['total_rows'] = $this->admin_student_courses_mdl->count_courses(); $config['per_page'] = 5; $config['use_page_numbers'] = TRUE; $config['uri_segment'] = 3...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMultipleData();", "public function getData()\n {\n //let's assume that this array is from a database\n return array('persian', 'bob', 'tabby', 'stray');\n }", "public function getDataArray(){\n return array($this->item_id,$this->name,$this->count,$this->price);\n ...
[ "0.63939077", "0.5941163", "0.5903289", "0.5862932", "0.5727017", "0.57239527", "0.5684484", "0.567461", "0.56649685", "0.56649685", "0.56339586", "0.5628998", "0.5628998", "0.5628998", "0.5628998", "0.5624204", "0.5595634", "0.55923384", "0.55923384", "0.55901456", "0.558338...
0.0
-1
this is an ajax function that adds new courses
public function add_course() { $course_name = $this->input->post("course_name"); if($course_name==""){ echo "please course/subject section is empty"; }else{ $courses = $data = $this->security->xss_clean($course_name); $courses = $this->authadmin->sanitize_string($course_name); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_courses()\n {\n if ($this->input->is_ajax_request()) {\n\n $process = $this->M_Courses->add_courses();\n $courses = 'courses';\n if ($process) {\n echo json_encode([\n 'status' => true,\n 'message' ...
[ "0.8569919", "0.77904826", "0.71145254", "0.69645417", "0.69444114", "0.683064", "0.6824", "0.6817754", "0.674902", "0.67293876", "0.6644141", "0.65975547", "0.65848136", "0.65543056", "0.65479153", "0.6540499", "0.6500271", "0.64734054", "0.6461691", "0.6457712", "0.6442643"...
0.7055584
3
Delete A course including the data existing in the merge_course table that contains course data
public function delete_course() { $id = $this->input->get("id"); if($id==""){ echo "there seems to be a problem"; }else{ $id = $this->security->xss_clean($id); $id = htmlspecialchars($id); $course_from_id = $this->admin_student_courses_mdl->course_from_id($id); $deleted_class = $this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deletecourses ($id_course) {\n $sqlQuery = \" DELETE FROM courses \";\n $sqlQuery .= \" WHERE id_course= $id_course\";\n $result = $this -> getDbManager () -> executeQuery ( $sqlQuery );\n return $result ;\n }", "public static function deleteCourse()\n {\n global $cont;\n $script...
[ "0.67806643", "0.66307116", "0.6549853", "0.6407568", "0.62209946", "0.6218145", "0.621035", "0.6115127", "0.6107304", "0.60837024", "0.60436964", "0.6015464", "0.59983766", "0.59737986", "0.59717494", "0.59417194", "0.59223014", "0.5912205", "0.5905412", "0.5818215", "0.5798...
0.6013759
12
this is an ajax function that searches for a course based on the get request paramater
public function search_course() { $search_content = $this->input->get("search"); if($search_content==""){ }else{ $search_content = $this->security->xss_clean($search_content); $search_content = htmlspecialchars($search_content); $data = $this->admin_student_courses_mdl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function category_wise_course_get() {\n $category_id = $_GET['category_id'];\n $courses = $this->api_model->category_wise_course_get($category_id);\n $this->set_response($courses, REST_Controller::HTTP_OK);\n }", "function get_details() { \n global $dbh;\n \n // allow crn or course name to...
[ "0.669923", "0.6453347", "0.63746977", "0.6349463", "0.6286662", "0.6282747", "0.6271205", "0.6240696", "0.61871415", "0.6159901", "0.6111983", "0.6074421", "0.60493916", "0.60340744", "0.5996027", "0.59930396", "0.598645", "0.59315735", "0.59141916", "0.5912604", "0.58902156...
0.66849524
1
this ajax function fetches a specific course name based on the id as a get paramter
public function fetch_course_name_for_merging() { $id = $this->input->get("id"); $id = $this->security->xss_clean(htmlspecialchars($id)); if($id==""){ echo "course name was not gotten there seems to be a problem"; }else{ $get_course = $this->admin_student_courses_mdl->c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function retrieveName(){\n\t\t$query = \"SELECT cours_id,code,intitule FROM cours WHERE cours_id=\".$this->course_id.\";\";\n\n\t\t$result = mysqli_query($this->link,$query);\n\t\t$data = $result->fetch_assoc();\n\n\t\t//Check if course exists\n\t\tif(is_null($data))\n\t\t{\n\t\t\techo 'Course with specifi...
[ "0.7151769", "0.6881356", "0.6790038", "0.6713046", "0.6632258", "0.6587846", "0.6493558", "0.64224267", "0.63592136", "0.63252246", "0.6270154", "0.62516433", "0.6241985", "0.6225451", "0.621234", "0.6210548", "0.61982703", "0.6194064", "0.6175547", "0.61040205", "0.609663",...
0.7466677
0
this ajax function adds a new merged course it:
public function add_new_merge() { $course_name = $this->input->post("course_name"); $class_name = $this->input->post("class_name"); $course_name = $this->security->xss_clean($this->authadmin->sanitize_string($course_name)); $class_name = $this->security->xss_clean($this->authadmin->sanitize_strin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_courses()\n {\n if ($this->input->is_ajax_request()) {\n\n $process = $this->M_Courses->add_courses();\n $courses = 'courses';\n if ($process) {\n echo json_encode([\n 'status' => true,\n 'message' ...
[ "0.7340121", "0.6612516", "0.63692796", "0.62752384", "0.6167571", "0.6139919", "0.6110265", "0.6075473", "0.60590464", "0.60541105", "0.60468006", "0.5952584", "0.58993226", "0.5861476", "0.5836988", "0.5827297", "0.58088994", "0.580705", "0.5794801", "0.57909715", "0.575641...
0.6956506
1
/ ADD A NEW sessions ========================================================================
public function add_sessions() { $sessions = $this->input->post("sessions"); if($sessions==""){ echo "please sessions section is empty"; }else{ $sessions = $data = $this->security->xss_clean($sessions); $sessions = $this->authadmin->sanitize_string($sessions); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function addSession($session);", "public function addToSession() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n $s->$key = $this->getId();\n if ($s->$key === null) {\n Log::warn(\"Adding null user ID to session\");\n }\n $this->setAuthe...
[ "0.77314377", "0.7492235", "0.71663225", "0.71525925", "0.69142777", "0.6862423", "0.6827963", "0.6821867", "0.67908615", "0.67528135", "0.67504025", "0.6742346", "0.6600897", "0.6557083", "0.64661676", "0.64506423", "0.6442008", "0.64090985", "0.6407895", "0.6336083", "0.623...
0.68278295
7
/ DELETE A sessions USING ITS ID ========================================================================
public function delete_sessions() { $id = $this->input->get("id"); if($id==""){ echo "there seems to be a problem"; }else{ $id = $this->security->xss_clean($id); $id = htmlspecialchars($id); $sessions_from_id = $this->admin_student_courses_mdl->sessions_from_id($id); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy($id = '') {\n\t\tif($id == '') {\n\t\t\t$id = $this->id;\n\t\t}\n\t\t$sess = ORM::for_table($this->session_type)->find_one($id);\n\t\tif($sess != false) {\n\t\t\t$sess->delete();\n\t\t}\n\t}", "public function delete() {\n $this->logger->debug(\"Deleting session\");\n $this-...
[ "0.7326263", "0.72729653", "0.71944344", "0.6919571", "0.690368", "0.6862217", "0.68259895", "0.6824635", "0.68131286", "0.6808197", "0.6799934", "0.67668426", "0.6763494", "0.6760092", "0.6754926", "0.67104477", "0.670551", "0.6578883", "0.6566022", "0.65528023", "0.6551264"...
0.6921861
3
/ SEARCH FOR A sessions ========================================================================
public function search_sessions() { $search_content = $this->input->get("search"); if($search_content==""){ }else{ $search_content = $this->security->xss_clean($search_content); $search_content = htmlspecialchars($search_content); $data["results"] =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function get_sessions();", "protected function get_sessions()\n {\n }", "public function actionGetListaSessions()\r\n\t\t{\r\n\t\t\treturn $varSession = [\r\n\t\t\t\t\t\t\t'postData',\r\n\t\t\t\t\t\t\t'conf',\r\n\t\t\t\t\t\t\t'begin',\r\n\t\t\t\t\t];\r\n\r\n\t\t}", "public fu...
[ "0.70819956", "0.671118", "0.6690345", "0.6572358", "0.6548378", "0.6491341", "0.64078474", "0.6306489", "0.6287855", "0.62685126", "0.6259252", "0.62564576", "0.62456465", "0.6197596", "0.61722875", "0.6155564", "0.61540556", "0.60828817", "0.6079546", "0.60365796", "0.60362...
0.61959517
14