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
/ $data['activity_type'] = $this > _getParam('activity_type'); $data['event_object'] = $this> _getParam('event'); $data['facebook_user_id'] = $this>_getParam('id'); $data['facebook_user_name'] = $this>_getParam('owner_name'); $data['fanpage_id'] = $this>_getParam('fanpage_id'); $data['target_user_id'] = $this>_getParam('target_id'); $data['target_user_name'] = $this>_getParam('target_name'); $data['message'] = $this>_getParam('message');
protected function addactivity($activity_type, $event_object, $fanpage_id, $target_user_id, $target_name, $message ){ $data['activity_type'] = $activity_type; $data['event_object'] = $event_object; $data['facebook_user_id'] = $this->_user->facebook_user_id; $data['facebook_user_name'] = $this->_user->facebook_user_name; $data['fanpage_id'] = $fanpage_id; $data['target_user_id'] = $target_user_id; $data['target_user_name'] = $target_name; $data['message'] = $message; $act = new Model_FancrankActivities(); $post = new Model_Posts(); /* if ($data['activity_type'] == "like-status" || $data['activity_type'] == "like-photo" || $data['activity_type'] == "like-video" || $data['activity_type'] == "like-link"){ $post->addLikeToPost($data['event_object']); }else if ($data['activity_type'] == "unlike-status" || $data['activity_type'] == "unlike-photo" || $data['activity_type'] == "unlike-video" || $data['activity_type'] == "unlike-link"){ $post->subtractLikeToPost($data['event_object']); }else if ($data['activity_type'] == "comment-status" || $data['activity_type'] == "comment-photo" || $data['activity_type'] == "comment-video" || $data['activity_type'] == "comment-link"){ $post->addCommentToPost($data['event_object']); } */ $act -> addActivities($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initializeFacebookEvent()\n {\n $this->trackingName = $this->ifVariableSet($this->parameters['tracking'],null);\n $this->numberGiftEarned = $this->ifVariableSet($this->parameters['numberGiftEarned'],0);\n $this->numberGiftSent = $this->ifVariableSet($this->parameters['number...
[ "0.60599965", "0.5757755", "0.55691695", "0.5533957", "0.5504438", "0.5462942", "0.54532325", "0.5416127", "0.5404493", "0.5373595", "0.5363646", "0.5363174", "0.5360115", "0.5357556", "0.53428733", "0.52425456", "0.5230426", "0.5222235", "0.5203201", "0.5192375", "0.51791835...
0.6309429
0
check response error from facebook graph api
private function facebookResponseCheck($result) { if(!empty($result->error)) { $type = isset($result->error->type) ? $result->error->type : ''; $code = isset($result->error->code) ? $result->error->code : ''; $message = isset($result->error->message) ? $result->error->message : ''; $msg = sprintf('type: %s, $code: %s, message: %s', $type, $code, $message); throw new Exception($msg); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_error() \n\t\t{\n\t\t\t\t$json = json_decode( $this->response );\n\t\t\t\tif( $json->faultstring )\n\t\t\t\t{\n\t\t\t\t\t\t$this->error = $json->faultstring;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\treturn false;\n\n\t\t}", "public function has_http_error($response) {\n if(!$response || !i...
[ "0.6256429", "0.6234275", "0.62125367", "0.6202816", "0.619115", "0.6112488", "0.59841853", "0.59429115", "0.59417385", "0.5915669", "0.5915669", "0.5914272", "0.5861633", "0.5848695", "0.5822073", "0.57939005", "0.5764143", "0.574654", "0.5718953", "0.5672794", "0.56537724",...
0.73957115
0
Returns the entire path in a single string
public function __toString() { return $this->toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPath() {\n if (empty($this->uriParts['path'])) {\n return '';\n }\n return implode('/', array_map(\"rawurlencode\", explode('/', $this->uriParts['path'])));\n }", "public static function getPath() {\n\t\tif ($args = func_get_args()) {\n\t\t\t$path = self::_ge...
[ "0.7560482", "0.7498773", "0.7427926", "0.73637944", "0.7265767", "0.7262139", "0.7243546", "0.72140753", "0.71746916", "0.7170932", "0.7156773", "0.71464914", "0.7140199", "0.71345633", "0.7121323", "0.7096821", "0.70520943", "0.7025706", "0.70080173", "0.7002442", "0.698179...
0.0
-1
Converts the object to a string
public function toString() { return url::buildPath($this->toArray()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function objectToString($obj);", "abstract function objectAsString($object);", "function objectToString( &$object ) {\n\n\t}", "public function to_string() { return $this->__toString(); }", "function dataToString($object=null) {\r\n\t\treturn $object->__toString();\r\n\t}", "public function __toSt...
[ "0.8290331", "0.80152243", "0.77929914", "0.77623343", "0.7743808", "0.7649999", "0.7633557", "0.7581554", "0.7564965", "0.75404686", "0.7526985", "0.7518531", "0.75075585", "0.75075585", "0.75075585", "0.75075585", "0.75075585", "0.75075585", "0.75075585", "0.75075585", "0.7...
0.0
-1
Returns an IntersectionIterator containing elements in $this that are also in $iterable
public function intersection($iterable, $strategy = null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function of(iterable $iterable): self {\n\t\t$generator = function () use ($iterable) {\n\t\t\tforeach ($iterable as $item) {\n\t\t\t\tyield $item;\n\t\t\t}\n\t\t};\n\t\treturn new self($generator());\n\t}", "public function intersect(iterable $items): self\n {\n $items = Factory::getArra...
[ "0.6072463", "0.60437727", "0.6029325", "0.5887875", "0.579804", "0.55278397", "0.54709667", "0.546725", "0.5455278", "0.54440105", "0.5418173", "0.5389925", "0.5389925", "0.5389925", "0.538118", "0.53732204", "0.5365471", "0.53622234", "0.536218", "0.5348531", "0.5331685", ...
0.64896554
0
Returns the setting value instead of property value if is set.
public function getPropertyValue($propertyName, $settingsKey) { // Load settings. if (self::$typoScriptCache === NULL) { $typoScriptCache = Tx_AdGoogleMaps_Utility_BackEnd::getTypoScriptSetup($this->getPid(), 'tx_adgooglemaps'); } $settings = $typoScriptCache[$settingsKey]; $currentValue = NULL; if (array_key_exists($propertyName, get_object_vars($this))) { $currentValue = $this->$propertyName; } // Get settings value only if set and current value is "false", "0" or empty. if (array_key_exists($propertyName, $settings) === TRUE && !$currentValue) { $currentValue = $settings[$propertyName]; } return $currentValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSettingValue()\n {\n if (array_key_exists(\"settingValue\", $this->_propDict)) {\n return $this->_propDict[\"settingValue\"];\n } else {\n return null;\n }\n }", "public function getValueToSet()\n {\n return $this->newValue;\n }", ...
[ "0.81224203", "0.7113134", "0.6982079", "0.69097865", "0.68257624", "0.68190336", "0.67986673", "0.67986673", "0.6662591", "0.66525847", "0.6534799", "0.65239966", "0.6501718", "0.6479824", "0.64773846", "0.64314556", "0.63669723", "0.63616395", "0.63616395", "0.6231985", "0....
0.59666127
51
Transpose array ($foo['baz']['bar'] > $foo['bar']['baz'])
function a_t($array) { $r=array(); foreach($array as $k1=>$ia) { foreach($ia as $k2=>$v) { $r[$k2][$k1]=$v; } } return $r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTranspose()\n {\n // check not array\n $this->assertFalse(Arrays::transpose('string'));\n\n // check bad arrays\n $this->assertFalse(\n Arrays::transpose(array('1', '2', '3')),\n 'Invalid two-dimensional array was accepted'\n );\n ...
[ "0.5695664", "0.56495565", "0.56145334", "0.5267228", "0.5258671", "0.52019745", "0.50720555", "0.5003975", "0.49917012", "0.48905623", "0.48578012", "0.48132464", "0.47079942", "0.46216288", "0.46019268", "0.459663", "0.45812762", "0.45809868", "0.45339", "0.45071772", "0.44...
0.44492617
23
$response_data_126t = array( "form_format" => TRUE, "read_data" => TRUE, "data" => array() );
public function save_records($id_form_detail, $response_data) { if ($response_data["form_format"] && $response_data["read_data"]) { if (!empty($response_data["data"])) { // var_dump($response_data["data"]);exit(); foreach ($response_data["data"] as $satuan_kotama => $array_data_satuan) { $this->save_per_satuan($id_form_detail, $satuan_kotama, $array_data_satuan); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getResponseData();", "public function getRequestData();", "public function postDataArrayProvider()\n {\n\t$data_array = array(\n\t 'photo' => 'test.jpg',\n\t 'id' => 1,\n\t 'author' => 'Anonymous',\n\t 'subject' => '',\n\t 'updated' => 0,\n\t 'content' => 'Testing'\n\t);\n\...
[ "0.6661469", "0.61560637", "0.6063444", "0.6038417", "0.5980344", "0.59250647", "0.5886728", "0.5877696", "0.5874399", "0.587134", "0.5832714", "0.5784602", "0.5770539", "0.57551736", "0.5740478", "0.5740442", "0.5733714", "0.57143134", "0.5668065", "0.5650723", "0.5643607", ...
0.0
-1
return get_theme_option(OP_ENTRY_CARD_EXCERPT_MORE, __( '...', THEME_NAME ));
function get_entry_card_excerpt_more(){ return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function themify_custom_excerpt_more($more) {\n global $post;\n return '';\n}", "function xkit_the_theme_option( $field_name, $default = '' ){\n\tprint xkit_get_theme_option( $field_name, $default );\n}", "function codium_extend_excerpt_more($more) {\n global $post;\n $readmore = __('Czytaj wie...
[ "0.6736971", "0.66720587", "0.6604045", "0.6604045", "0.6576243", "0.6531921", "0.6482173", "0.643697", "0.6405216", "0.6401118", "0.63861144", "0.6364165", "0.6323433", "0.6321211", "0.63200486", "0.6283958", "0.6236837", "0.6235942", "0.62268674", "0.6214131", "0.61934173",...
0.72823095
0
Method to store valdiation filter rules
public static function filter($rules) { static::$filters[] = $rules; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function getRules() {\n return [\n 'imeArtikla' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'cenaArtikla' => FILTER_VALIDATE_FLOAT,\n 'opisArtikla' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'kategorijaArtikla' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'zalog...
[ "0.66086787", "0.6507619", "0.6447703", "0.6369883", "0.6359987", "0.63215977", "0.63195574", "0.63150454", "0.6257946", "0.6257946", "0.6257946", "0.62349886", "0.62312895", "0.61983055", "0.6170236", "0.615807", "0.6138033", "0.6134118", "0.60906", "0.6042778", "0.6023637",...
0.66950357
0
This method does the main work of the validation
public static function these($data, $type='', $message='') { $rules = array(); static::$rules = (static::$rules === FALSE) ? Config::get('validaterule') : static::$rules; if(!empty($data)) { //Lets check the type of filter validation $house_filters = array(); if( !empty($type) && is_string($type)){ $type = trim($type); $house_filters[] = $type; } $join_filters = array_merge(static::$filters, $house_filters); $rules = static::workfilter($join_filters); if(!empty($type) && is_array($type)){ if( !empty($rules) ){ $rules += $type; }else{ $rules = $type; } } //We have to reset the static rules property. VERY IMPORTANT LINE static::$rules = FALSE; return ($message == '') ? Validator::make($data, $rules) : Validator::make($data, $rules, $message); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function runValidation();", "protected function _validate() {\n\t}", "public abstract function validation();", "public function validation();", "abstract public function validate();", "abstract public function validate();", "public function validate();", "public function validate();",...
[ "0.8365654", "0.82158935", "0.8021461", "0.8012373", "0.7952171", "0.7952171", "0.79162204", "0.79162204", "0.79162204", "0.79162204", "0.79162204", "0.79162204", "0.79162204", "0.79162204", "0.79162204", "0.79162204", "0.79162204", "0.79162204", "0.79064405", "0.7774558", "0...
0.0
-1
Array of validation filters from these()
private static function workfilter($break) { $rules = array(); foreach($break as $key){ $rules += static::common_filter_function(trim($key)); } return $rules; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filters()\n {\n $filters = [];\n $filters['name'] = ['trim', 'empty_string_to_null', 'capitalize'];\n $filters['email'] = ['trim', 'empty_string_to_null', 'lowercase'];\n return $filters;\n }", "public function filters()\n {\n return array(\n ...
[ "0.7110237", "0.7044571", "0.6867282", "0.6866568", "0.6751181", "0.6749878", "0.6742077", "0.6700555", "0.6688895", "0.6685439", "0.66606724", "0.6619742", "0.6615641", "0.6606403", "0.6602754", "0.6562738", "0.6517233", "0.6516824", "0.6516824", "0.65137947", "0.65105283", ...
0.0
-1
Get the default template components.
public function getDefaultTemplateComponents() : array { $components = []; /** @var \Drupal\Core\Entity\EntityFieldManagerInterface $field_manager */ $field_manager = \Drupal::service('entity_field.manager'); foreach ($field_manager->getFieldDefinitions('task', 'task') as $name => $definition) { if ( !$definition->isRequired() || $definition->isReadOnly() || $definition->isComputed() || ($name === 'job') ) { continue; } $components[$name] = [ 'id' => 'field.widget_input:task.' . $name, 'uuid' => $name, ]; } $components['start'] = [ 'id' => 'field.data_select:task.start', 'uuid' => 'start', 'selector' => 'current_date', ]; $components['due'] = [ 'id' => 'field.data_select:task.due', 'uuid' => 'due', 'selector' => 'current_date | date_add(1 day)', ]; if ($this->getJob() && ($definitions = $this->getJob()->getContextDefinitions())) { foreach ($definitions as $key => $definition) { $components["context:{$key}"] = [ 'id' => 'task_context.data_select', 'task_context' => $key, 'uuid' => "context:{$key}", ]; } } $trigger = $this->getTrigger(); \Drupal::moduleHandler()->alter( 'task_job_trigger_default_template_components', $components, $trigger, ); return $components; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDefaultComponents()\n {\n return [\n new THead,\n new TFoot\n ];\n }", "function defaultTemplate(){\n $this->addLocations(); // add addon files to pathfinder\n return array($this->template_file);\n }", "function defaultTemplate() ...
[ "0.747713", "0.6948634", "0.64774054", "0.64469826", "0.6415054", "0.63784856", "0.62615037", "0.6224359", "0.61802447", "0.61802447", "0.61802447", "0.61802447", "0.61802447", "0.61802447", "0.61299235", "0.604876", "0.6014143", "0.6000013", "0.5997274", "0.5994137", "0.5977...
0.68817365
2
Get the template builder manager.
protected function builderManager() { return \Drupal::service('plugin.manager.entity_template.builder'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBuilder() {\n if (!isset($this->builder)) {\n if (empty($this->configuration['builder'])) {\n $this->builder = $this->builderManager->createInstance('standard', []);\n }\n else {\n $this->builder = $this->builderManager->createInstance($this->configuration['builde...
[ "0.65663296", "0.6290267", "0.6290267", "0.6290267", "0.62729853", "0.6265055", "0.6221792", "0.60746664", "0.6015199", "0.59984595", "0.59514964", "0.594063", "0.5932067", "0.5932067", "0.5926895", "0.591976", "0.59180784", "0.59067625", "0.58905035", "0.58742106", "0.587034...
0.7953468
0
Parse the config for the given root and file
public static function parseConfig(string $root, string $environment) : array { $ymlFile = sprintf('%s/%s.yml', $root, $environment); $yamlFile = sprintf('%s/%s.yaml', $root, $environment); if (is_file($ymlFile)) { return Yaml::parseFile($ymlFile) ?? []; } if (is_file($yamlFile)) { return Yaml::parseFile($yamlFile) ?? []; } $cursor = (new Finder) ->files() ->in($root) ->name('*.yml') ->name('*.yaml') ; $envs = collect(iterator_to_array($cursor)) ->values() ->map(function(SplFileInfo $file) { return explode('.', $file->getRelativePathname())[0]; }) ; if ($envs->isEmpty()) { throw new \Exception('There are no environments set up!'); } throw new \Exception(sprintf( 'Unable to find environment file [%s]. Available Environments: [%s]', $environment, $envs->implode(',') )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseConfig() {\n\n\t\t// Make sure our config file exists\n\t\tif(!file_exists(CONFIGPATH . $this->_options['configFile'])) {\n\t\t\tdie('Unable to find <b>'. CONFIGPATH . $this->_options['configFile'] .'</b> file, please check your application configuration');\n\t\t}\n\n\t\t// Switch the file extension\...
[ "0.69769716", "0.6922469", "0.64037454", "0.61257", "0.60782206", "0.60533464", "0.604528", "0.5995563", "0.59748065", "0.5957334", "0.58515745", "0.5836796", "0.5814718", "0.580706", "0.5784067", "0.5779937", "0.5777985", "0.5769148", "0.57426184", "0.5710082", "0.5697156", ...
0.0
-1
Get an item from the config
public function get(string $key, $default = null) { return array_get($this->raw, $key, $default); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getItem ($name, $type) {\n\t\tif ($this->existsItemStrict ($name, $type)) {\n\t\t\t$fullName = $fullName = '/'.$type.$name;\n\t\t\tif (array_key_exists ($fullName, $this->allConfigItems)) {\n\t\t\t\treturn $this->allConfigItems[$fullName];\n\t\t\t} else {\n\t\t\t\treturn $this->allUserItems[$fullName];\n\...
[ "0.71268916", "0.6818368", "0.6688351", "0.6671121", "0.6539564", "0.6513986", "0.6458946", "0.6444225", "0.64397746", "0.643024", "0.6395134", "0.6385866", "0.6372807", "0.6294141", "0.6240842", "0.6235466", "0.6222869", "0.61674684", "0.6105866", "0.60581076", "0.60462224",...
0.0
-1
Get an item from the config, erroring if nothing is in there
public function getOrError(string $key) { $default = function() {}; // a function object for strict uniqueness $value = array_get($this->raw, $key, $default); if ($value === $default) { throw new \Error('Unable to find option ' . $key); } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getItem ($name, $type) {\n\t\tif ($this->existsItemStrict ($name, $type)) {\n\t\t\t$fullName = $fullName = '/'.$type.$name;\n\t\t\tif (array_key_exists ($fullName, $this->allConfigItems)) {\n\t\t\t\treturn $this->allConfigItems[$fullName];\n\t\t\t} else {\n\t\t\t\treturn $this->allUserItems[$fullName];\n\...
[ "0.71993977", "0.6967329", "0.6866654", "0.68031263", "0.6737038", "0.6654353", "0.66260296", "0.65019864", "0.6166941", "0.61620617", "0.60999274", "0.6069719", "0.5970457", "0.5953733", "0.59422123", "0.59132206", "0.5898154", "0.58424336", "0.582102", "0.5788359", "0.57608...
0.0
-1
Get the project environment
public function environment() : string { return $this->environment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "function getEnvironment() {\n return Environment::env();\n}", "public functi...
[ "0.83430827", "0.83430827", "0.83430827", "0.83430827", "0.83430827", "0.83430827", "0.82238406", "0.8157302", "0.8133287", "0.80208516", "0.8003106", "0.794177", "0.7915496", "0.7906926", "0.78929406", "0.78573525", "0.7840056", "0.78385305", "0.7832444", "0.78295106", "0.78...
0.7655883
31
================================ OUTPUT ================================ Get the project name in fortrabbit
public function projectName() : string { return (string) $this->getOrError('name'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_forge_project_name()\n\t{\n\t\treturn '';\n\t}", "public abstract function getProjectName();", "public function getProjectName() : string\n {\n return $this->projectName;\n }", "public function getProjectTitle();", "public function getProject()\r\n {\r\n return $this->_p...
[ "0.7883026", "0.78474265", "0.7644333", "0.727933", "0.7108012", "0.7103572", "0.70317435", "0.69737643", "0.69415855", "0.6874081", "0.6865497", "0.6860642", "0.6855624", "0.68054545", "0.6805123", "0.6805123", "0.67758447", "0.6752159", "0.67405194", "0.66817", "0.6669343",...
0.7125553
4
Get local branch to deploy from
public function targetBranch() : string { return (string) $this->getOrError('target_branch'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function branch()\n {\n $result = $this->git('symbolic-ref --short HEAD');\n if (empty($result)) {\n return 'master';\n }\n\n return $result;\n }", "public function remoteBranch() : string\n {\n return (string) $this->getOrError('remote_branch');\n ...
[ "0.6761025", "0.6580478", "0.65734947", "0.65082616", "0.6493382", "0.645897", "0.645897", "0.6356909", "0.63332474", "0.6311879", "0.6267298", "0.6199653", "0.61782026", "0.61521477", "0.6139389", "0.609849", "0.5967119", "0.59348583", "0.58420044", "0.58297014", "0.5766322"...
0.60168034
16
Get the remote fortrabbit branch to deploy to
public function remoteBranch() : string { return (string) $this->getOrError('remote_branch'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_remote_branches() {\n\t\t\t$branchArray = explode(\"\\n\", $this->run(\"branch -r\"));\n\t\t\tforeach ($branchArray as $i => &$branch) {\n\t\t\t\t$branch = trim($branch);\n\t\t\t\tif ($branch == \"\" || strpos($branch, 'HEAD -> ') !== false) {\n\t\t\t\t\tunset($branchArray[$i]);\n\t\t\t\t}\n\t...
[ "0.65224206", "0.6259599", "0.62317294", "0.6191133", "0.6075909", "0.60703236", "0.60518396", "0.60518396", "0.6004127", "0.59335285", "0.58949876", "0.57196635", "0.5704866", "0.5616115", "0.5611877", "0.56028503", "0.55625117", "0.55576104", "0.5553211", "0.5515577", "0.55...
0.7209364
0
Get the build commands to run
public function buildCommands() : Collection { return collect((array) $this->get('build_commands', [])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCommandsToRun()\n {\n // Get symfony\n $symfony = $this->findSymfony();\n\n // Commands\n $commands = [\n rtrim($symfony . ' new ' . $this->getProjectPath() . ' ' . $this->getVersion()),\n ];\n\n return implode(' && ', $commands);\n }", ...
[ "0.65266496", "0.6486425", "0.64486825", "0.63645273", "0.6264899", "0.6238406", "0.6073823", "0.6070439", "0.59602493", "0.5953021", "0.5891035", "0.5858855", "0.5854843", "0.58218366", "0.5789899", "0.57700354", "0.57596934", "0.5742897", "0.57065547", "0.570477", "0.569952...
0.67123824
0
Get the build files to deploy
public function buildOutputs() : Collection { return collect((array) $this->get('build_output', [])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBuiltFiles()\n {\n return $this->builtFiles;\n }", "public function collectBuildFile()\r\n {\r\n if( file_exists($this->site_root . \"/build\") )\r\n {\r\n $this->file_list[] = \"build\";\r\n }\r\n }", "public function getFiles()\n {\n ...
[ "0.75753874", "0.66500914", "0.62604445", "0.61545265", "0.609346", "0.6060776", "0.6045629", "0.600241", "0.5923928", "0.5920536", "0.5913206", "0.58929", "0.5866935", "0.58574426", "0.5834476", "0.5831741", "0.57415366", "0.5680746", "0.56795347", "0.5656349", "0.5648179", ...
0.0
-1
Get the git URL
public function gitUrl() : string { return sprintf( '%s@%s:%s.git', $this->projectName(), $this->getOrError('frb_zone'), $this->projectName() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_url(){\n\n\t\t\treturn $this->api_urls['giturl'];\n\n\t\t}", "public function getCommitUrl(): string\n {\n return $this->data->url;\n }", "public function get_github_url() {\n\t\treturn $this->get_meta( 'github_url' );\n\t}", "function getUrl() {\n\t\treturn $this->repoObj->...
[ "0.86241466", "0.7903098", "0.74523854", "0.73158497", "0.6870565", "0.67854977", "0.675056", "0.6714888", "0.6662214", "0.6629114", "0.6623352", "0.66135496", "0.65533596", "0.6542594", "0.65313685", "0.65038073", "0.6503157", "0.6480044", "0.6426344", "0.6394495", "0.638707...
0.7926891
1
Get the ssh URL
public function sshUrl() : string { return sprintf( '%s@%s', $this->projectName(), $this->getOrError('frb_zone') ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_ssh_url(): ?string;", "protected function getSshUrl()\n {\n if (!$this->environment) {\n throw new \\Exception(\"No environment selected\");\n }\n\n if (!isset($this->environment['_links']['ssh']['href'])) {\n $id = $this->environment['id'];\n ...
[ "0.8100977", "0.8047871", "0.7397919", "0.72392666", "0.6947042", "0.6751836", "0.6653497", "0.6477147", "0.6472667", "0.64135295", "0.6401171", "0.6389541", "0.63601196", "0.6350533", "0.63182867", "0.62878364", "0.62715006", "0.6246647", "0.6246022", "0.6243251", "0.624186"...
0.7429286
2
Get the fortrabbit remote name
public function fortrabbitRemoteName() : string { return 'frb-' . $this->environment(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getName(): string\n {\n return 'centreon_configuration_remote';\n }", "public function getRemoteAddress()\n {\n return stream_socket_get_name($this->socket, true);\n }", "public function getReceiverName()\n {\n return $this->get(self::_RECEIVER_NAME);\...
[ "0.63912964", "0.6318805", "0.62839437", "0.61415905", "0.60348165", "0.601217", "0.60069597", "0.5983146", "0.5963327", "0.5961428", "0.5937357", "0.5915767", "0.5899417", "0.5898476", "0.5893659", "0.5887986", "0.5887931", "0.5878322", "0.5876887", "0.5869484", "0.58655125"...
0.80864376
0
Get the remote web root path
public function remoteWebRootPath(string $path = null) : string { $root = sprintf('/srv/app/%s/htdocs', $this->projectName()); return $path ? "$root/$path" : $root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getWebRoot() {}", "protected function getWebRoot() {}", "public function getWebRoot() {\n return $GLOBALS['registry']->config[\"siteUrl\"];\n }", "private static function getWebRoot() {\n if (file_exists(realpath(__DIR__ . '/../../../../../public_html'))) {\n re...
[ "0.77411675", "0.7740465", "0.76115245", "0.7513576", "0.7496606", "0.74474025", "0.7446049", "0.7296086", "0.72723955", "0.7271457", "0.7233783", "0.7229771", "0.7198361", "0.7150619", "0.7141297", "0.7131257", "0.70751977", "0.70218146", "0.70200765", "0.7006111", "0.699041...
0.6789256
40
/ | | Relation to Article |
public function article() { return $this->belongsTo('Article'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function article()\n {\n \treturn $this->belongsTo(Article::class);\n }", "public function article(){\n return $this->belongsTo('Corp\\Models\\Article');\n }", "public function article() {\n\n return $this->belongsTo('App\\Article');\n }", "public function article()\n {...
[ "0.73938817", "0.73356605", "0.7227976", "0.7196151", "0.7119786", "0.71171755", "0.7104479", "0.7098551", "0.70911497", "0.70852643", "0.7074304", "0.6968747", "0.69103146", "0.6895701", "0.6858364", "0.681196", "0.67627966", "0.67627305", "0.6736352", "0.6689714", "0.666305...
0.73124534
2
/Add workout function form
public function addWorkout() { return view('admin.addworkout'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function work()\n {\n }", "function vcn_findwork() { // Callback fucntion\r\n\t//return drupal_get_form('vcn_findwork_form');\r\n\treturn theme('vcn_findwork_overview');\r\n}", "function raptor_glue_worklist_form_builder($form, &$form_state)\n{\n\n $oPI = new \\raptor\\WorklistPage();\n $form = arr...
[ "0.5877085", "0.57135993", "0.56200004", "0.55651164", "0.54190516", "0.5377406", "0.53698415", "0.53543234", "0.5306199", "0.52983457", "0.527685", "0.5251136", "0.52413756", "0.52306867", "0.5230611", "0.52254736", "0.51927763", "0.51724637", "0.51587814", "0.5121457", "0.5...
0.627421
0
/store workout function data form
public function storeWorkout(Request $request) { $this->validate($request,array( 'name' => 'required', 'details' => 'required', 'set1' => 'required', 'set3' => 'required', 'set2' => 'required', 'image' => 'required|mimes:jpg,jpeg,png' )); /* |/^[a-zA-Z ]+$/ |unique:users' */ $workout = new Workout; $workout->title = $request->name; $workout->description = $request->details; $workout->category = $request->category; $workout->set1 = $request->set1; $workout->set2 = $request->set2; $workout->set3 = $request->set3; //$workout->image = $request->project_title; if ($request->hasFile('image')) { $file = $request->file('image'); $filename = time().'.'.$file[0]->getClientOriginalName(); /*$location = public_path('file/'.$filename); Storage::put($filename,file_get_contents($file));*/ $location = public_path('file/'.$filename); Storage::disk('file')->put($filename, file_get_contents($file[0])); //Storage::disk('public')->put($filename, file_get_contents($file)); $workout->image = $filename; } //file add /* $filer = $request->file('image'); foreach ($filer as $key => $value) { $filename = time().'.'.$filer[$key]->getClientOriginalName(); $location = public_path('file/'.$filename); Storage::disk('file')->put($filename, file_get_contents($file[$key])); if($key == 1){ $workout->image2 = $filename; } if($key == 2){ $workout->image3 = $filename; } } */ $workout->save(); if($workout->save()){ return redirect()->back()->with('success','Workout saved successfully.'); } else{ return redirect()->back()->with('denger-success','Workout is not saved.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save_me($creation, $dwl_number, $dwl_last) {\n\n}", "public function saveData()\r\n {\r\n \r\n }", "function work()\n {\n }", "function store_data($data, $data_name)\n{\n /* @todo store the PUA data in its own table */\n update_option($data_name, serialize($data)...
[ "0.57572794", "0.5677746", "0.5620407", "0.5493032", "0.5484715", "0.54090065", "0.5356681", "0.53514814", "0.5326266", "0.53082156", "0.53082156", "0.53082156", "0.53037655", "0.5296332", "0.5296332", "0.5296332", "0.52831775", "0.5280849", "0.5280849", "0.5280849", "0.52808...
0.0
-1
/Add Videos function form
public function addVideo() { $getAllVideoCategory = VideoCategory::all(); return view('admin.addvideo')->with('videoCategory',$getAllVideoCategory); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function type_url_form_video()\n {\n }", "public function addVideo(){\n if (isset($_POST[\"add_video\"])) {\n $movie = $this->model('Movie');\n $system = $this->model('System');\n\n $video_name = $_POST[\"video_title\"];\n $video_url = $_POST[\"video_url...
[ "0.7222171", "0.7221824", "0.7197456", "0.7158118", "0.707608", "0.69955194", "0.6994782", "0.6960696", "0.68676054", "0.682706", "0.6780851", "0.6778015", "0.6708987", "0.6708768", "0.6694012", "0.66828114", "0.6677637", "0.66739845", "0.66585106", "0.6653615", "0.6645424", ...
0.6997794
5
/Store videos data function form
public function storeVideo(Request $request) { $this->validate($request,array( 'title' => 'required', 'video_category_id' => 'required', 'video' => 'required|mimes:mp4' )); $video = new Video; $video->title = $request->title; $video->video_category_id = $request->video_category_id; if ($request->hasFile('video')) { $file = $request->file('video'); $filename = time().'.'.$file->getClientOriginalName(); /*$location = public_path('file/'.$filename); Storage::put($filename,file_get_contents($file));*/ $location = public_path('file/'.$filename); Storage::disk('file')->put($filename, file_get_contents($file)); //Storage::disk('public')->put($filename, file_get_contents($file)); $video->video = $filename; } $video->save(); if($video->save()){ return redirect()->back()->with('success','Video saved successfully.'); } else{ return redirect()->back()->with('denger-success','Video is not saved.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store()\n {\n // Validate input\n $this->validate($this->request, [\n 'title' => 'required',\n 'description' => 'required',\n 'order_number' => 'required|integer|unique:videos',\n 'embed_code' => 'required',\n 'access_name' =...
[ "0.69222957", "0.6880366", "0.67624557", "0.6726896", "0.6717245", "0.65077674", "0.6483197", "0.648286", "0.64435446", "0.6418239", "0.6402158", "0.638988", "0.638033", "0.6371146", "0.6364014", "0.63444275", "0.6336959", "0.6326696", "0.6298246", "0.6284305", "0.6279199", ...
0.6366752
14
/Store program data form
public function storeProgram(Request $request) { $this->validate($request,array( 'name' => 'required', 'details' => 'required', 'set1' => 'required', 'set3' => 'required', 'set2' => 'required', 'image' => 'required|mimes:jpg,jpeg,png' )); $program = new Program; $program->title = $request->name; $program->description = $request->details; $program->category = $request->category; $program->set1 = $request->set1; $program->set2 = $request->set2; $program->set3 = $request->set3; //$program->image = $request->project_title; if ($request->hasFile('image')) { $file = $request->file('image'); $filename = time().'.'.$file->getClientOriginalName(); /*$location = public_path('file/'.$filename); Storage::put($filename,file_get_contents($file));*/ $location = public_path('file/'.$filename); Storage::disk('file')->put($filename, file_get_contents($file)); //Storage::disk('public')->put($filename, file_get_contents($file)); $program->image = $filename; } $program->save(); if($program->save()){ return redirect()->back()->with('success','Program saved successfully.'); } else{ return redirect()->back()->with('denger-success','Program is not saved.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AddProgram() {\n $data = $this->app[\"request\"];\n\n $isXML = false;\n\n $program = new Program($this->app[\"db\"]);\n\n if (0 === strpos($data->headers->get('Content-Type'), 'application/x-www-form-urlencoded')) {\n\n // posted from a html form\n\n ...
[ "0.6240998", "0.62035745", "0.61095464", "0.60383475", "0.58655787", "0.57584274", "0.5731271", "0.57262933", "0.5708512", "0.56396693", "0.5638476", "0.56063026", "0.55784184", "0.55771947", "0.55108297", "0.54851323", "0.5447166", "0.5419189", "0.5404201", "0.5384884", "0.5...
0.0
-1
/Add nutrition Category form
public function addNutrationCategory() { return view('admin.addnutratoncategory'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add()\n {\n $category = new stdClass();\n $category->category_id = null;\n $category->name = null;\n $data = [\n 'page' => 'add',\n 'row' => $category\n ];\n $this->template->load('template', 'product/category/category_add', $data);...
[ "0.69676876", "0.69144493", "0.69017804", "0.68650234", "0.68249476", "0.67566377", "0.6712905", "0.668728", "0.6656021", "0.6614073", "0.6611625", "0.6608978", "0.6608551", "0.65376264", "0.65324306", "0.6525535", "0.65221816", "0.6514171", "0.6511999", "0.6508002", "0.64992...
0.7627313
0
/Store nutrition category data form
public function storeNutrationCategory(Request $request) { $this->validate($request,array( 'nutrationCategoryName' => 'required', //'tips' => 'required', )); $nutrationCategory = new NutrationCategory; $nutrationCategory->nutration_category_name = $request->nutrationCategoryName; //$nutrationCategory->tips = $request->tips; $nutrationCategory->save(); if($nutrationCategory->save()){ return redirect()->back()->with('success','Nutration category Saved successfully.'); } else{ return redirect()->back()->with('denger-success','Nutration category is not saved.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function storeCategory(array $data): void\n {\n }", "private function getCategoryPostData()\n {\n // Get data from form fields\n $this->data['category_title'] = $this->input->post('category_title');\n }", "function lm_save_category() {\n\t@copy(LM_CDATA, LM_CBACKUP);\n\t$id = i...
[ "0.638003", "0.6293937", "0.62295073", "0.6156473", "0.6106529", "0.6040855", "0.60370666", "0.602494", "0.6020303", "0.59738475", "0.5970187", "0.59676784", "0.5944608", "0.59403944", "0.59081626", "0.5884613", "0.5880202", "0.58768755", "0.58323884", "0.5800276", "0.5799089...
0.6651365
0
/Add program Category form
public function addProgramCategory() { return view('admin.addprogramcategory'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n if (!isset(request()->program)) {\n $category = Programs::all();\n } else {\n $category = Programs::where(\"id\", request()->program)->first();\n }\n return view(\"admin/action/create\", compact(\"category\"));\n }", "public f...
[ "0.6791251", "0.67398465", "0.6735368", "0.67165315", "0.67116857", "0.6615872", "0.6611898", "0.6589547", "0.65745264", "0.6573505", "0.6542764", "0.6485271", "0.64450854", "0.644032", "0.6434564", "0.64265096", "0.64235735", "0.6346596", "0.63265896", "0.62802815", "0.62374...
0.7373798
0
/Store program category data form
public function storeProgramCategory(Request $request) { $this->validate($request,array( 'categoryName' => 'required', 'tips' => 'required', )); $programCategory = new ProgramCategory; $programCategory->program_category_name = $request->categoryName; $programCategory->tips = $request->tips; $programCategory->save(); if($programCategory->save()){ return redirect()->back()->with('success','Program category Saved successfully.'); } else{ return redirect()->back()->with('denger-success','Program category is not saved.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lm_save_category() {\n\t@copy(LM_CDATA, LM_CBACKUP);\n\t$id = isset($_POST['category-id']) ? intval($_POST['category-id']) : null;\n\t$cid = isset($_POST['category-cid']) ? intval($_POST['category-cid']) : time();\n\t$arr = array('cid'=>$cid, 'name'=>safe_slash_html($_POST['category-name']));\n\tif (funct...
[ "0.6249412", "0.6124111", "0.5888456", "0.57923037", "0.5727026", "0.57267463", "0.5641175", "0.56360894", "0.5622185", "0.5558223", "0.5539674", "0.55263704", "0.55060816", "0.550298", "0.5502602", "0.5431195", "0.5417658", "0.5393107", "0.5385183", "0.53831905", "0.5369164"...
0.6413852
0
/Add Workout category form
public function addWorkoutCategory() { return view('admin.addworkoutcategory'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function storeWorkoutCategory(Request $request)\n {\n $this->validate($request,array(\n 'categoryName' => 'required',\n ));\n\n $workoutCategory = new Category;\n\n $workoutCategory->category = $request->categoryName;\n\n $workoutCategory->save();\n\n ...
[ "0.67460954", "0.62550235", "0.6202757", "0.59804004", "0.5974859", "0.5883679", "0.5875688", "0.58718485", "0.58620435", "0.5860522", "0.58561087", "0.5849379", "0.58476734", "0.584638", "0.5837361", "0.5828801", "0.5822643", "0.58087504", "0.5780437", "0.5755626", "0.573068...
0.7685577
0
/Store Workout category data form
public function storeWorkoutCategory(Request $request) { $this->validate($request,array( 'categoryName' => 'required', )); $workoutCategory = new Category; $workoutCategory->category = $request->categoryName; $workoutCategory->save(); if($workoutCategory->save()){ return redirect()->back()->with('success','Workout category Saved successfully.'); } else{ return redirect()->back()->with('denger-success','Workout category is not saved.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addWorkoutCategory()\n {\n return view('admin.addworkoutcategory');\n }", "public function save() {\n\t\tglobal $wpdb;\n\t\t//Build Query\n\t\t$types = array(\"%s\",\"%s\");\n\t\tif(empty($this->category_id)) { //New Category\n\t\t\t$wpdb->insert(FAQBUILDDBCATEGORY,$this->toArray(tru...
[ "0.61515504", "0.60063905", "0.58394295", "0.58378613", "0.5620386", "0.5580089", "0.555611", "0.55307066", "0.55281335", "0.5486131", "0.5485075", "0.54284894", "0.5389126", "0.5386289", "0.5377289", "0.5354097", "0.5353045", "0.5351274", "0.53213197", "0.5312135", "0.530880...
0.680613
0
/Add video category form
public function addVideocategory() { return view('admin.addvideocategory'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n $categories = Category::all()->pluck('name','id');\n \n return view('admin.video.create', compact('categories'));\n }", "public function addVideo()\n {\n $getAllVideoCategory = VideoCategory::all();\n return view('admin.addvideo')->with(...
[ "0.69920427", "0.69584477", "0.6941191", "0.6830765", "0.68297964", "0.6758075", "0.67541033", "0.66597044", "0.66583365", "0.6615286", "0.6614905", "0.65550804", "0.64604056", "0.64333004", "0.64281654", "0.63976806", "0.63896465", "0.6372445", "0.63030934", "0.62761736", "0...
0.6706827
7
/Store video category data form
public function storeVideocategory(Request $request) { $this->validate($request,array( 'categoryName' => 'required', )); $videoCategory = new VideoCategory; $videoCategory->video_category_name = $request->categoryName; $videoCategory->save(); if($videoCategory->save()){ return redirect()->back()->with('success','Video category Saved successfully.'); } else{ return redirect()->back()->with('denger-success','Video category is not saved.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(AddVideoRequest $request)\n {\n try{\n $videoFile = $request->file('video');\n $thumbnailFile = $request->file('thumbnail');\n $videoName = 'video_'.str_slug($request->input('title')).\".\".$videoFile->getClientOriginalExtension();\n ...
[ "0.6457996", "0.6418421", "0.6280149", "0.6258419", "0.62341547", "0.62338513", "0.6215257", "0.6186579", "0.6134619", "0.61315817", "0.61244404", "0.6043199", "0.60421747", "0.6031893", "0.60311496", "0.60204273", "0.6015956", "0.6015519", "0.5985891", "0.59772885", "0.59747...
0.663629
0
/edit message Function for delete
public function deleteMessage(Request $request) { $messageId = $request->messageId; $getMessgeById = Contacts::find($messageId); if($getMessgeById->delete()){ Session::flash('danger','Message deleted successfully'); return redirect()->back(); } else{ Session::flash('danger','sorry ! message could not be deleted.'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function messageDelete(Message $message);", "public function action_delete() {\n\t\t$id = $this->request->param('id');\n\t\tif($id) {\n\t\t\t$message = ORM::factory('Message', $id);\n\t\t\tif($message->loaded()) {\n\t\t\t\ttry {\n\t\t\t\t\t$message->delete();\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t$this->_...
[ "0.7668003", "0.72323567", "0.7138693", "0.70651025", "0.70332915", "0.6942195", "0.69413954", "0.6839052", "0.6822671", "0.6808378", "0.6808378", "0.6808378", "0.6808378", "0.6808378", "0.6808378", "0.6808378", "0.6808378", "0.6808378", "0.6808378", "0.6808378", "0.6808378",...
0.6757206
22
/edit workout Function for view form
public function editworkout($id) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $workout = Workout::find($id); return view('admin.editworkout')->with('workout',$workout); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Workout $workout)\n {\n //\n }", "public function edit(Workout $workout)\n {\n $logged_user = Auth::user();\n $users = User::all();\n return view('Admin.Workouts.edit',compact('workout','users','logged_user'));\n }", "public function editAction()\n {\n\...
[ "0.80508626", "0.73693895", "0.73143905", "0.6848007", "0.6839009", "0.676065", "0.6614971", "0.65978134", "0.65829295", "0.6567484", "0.6566879", "0.6536641", "0.6518289", "0.65043056", "0.6472796", "0.64682436", "0.64351326", "0.6429146", "0.64191914", "0.64113206", "0.6406...
0.7222739
3
/edit workout Function for update data form
public function updateworkout(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'name' => 'required', 'details' => 'required', 'set1' => 'required', 'set3' => 'required', 'set2' => 'required' )); $id = $request->id; $workout = Workout::find($id); $workout->title = $request->name; $workout->description = $request->details; $workout->category = $request->category; $workout->set1 = $request->set1; $workout->set2 = $request->set2; $workout->set3 = $request->set3; if ($request->hasFile('image')) { $file = $request->file('image'); $filename = time().'.'.$file->getClientOriginalName(); /*$location = public_path('file/'.$filename); Storage::put($filename,file_get_contents($file));*/ $location = public_path('file/'.$filename); Storage::disk('file')->put($filename, file_get_contents($file)); //Storage::disk('public')->put($filename, file_get_contents($file)); $workout->image = $filename; } $workout->save(); Session::flash('success','Workout Updated succcessfully.'); return redirect()->back()->with('workout',$workout); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Workout $workout)\n {\n //\n }", "public function update(Request $request, Workout $workout)\n {\n //\n }", "public function editAction()\n {\n\n $request = $this->getRequest();\n\n $routeMatch = $this->getEvent()->getRouteMatch();\n $id ...
[ "0.7855642", "0.71702427", "0.68421155", "0.67637235", "0.6645977", "0.66050977", "0.6550126", "0.6468668", "0.64681077", "0.6451119", "0.6420449", "0.63583255", "0.6338572", "0.6337156", "0.63365304", "0.6304288", "0.62667406", "0.6264342", "0.6256334", "0.62559503", "0.6253...
0.62677014
16
/edit workout Function for delete
public function deleteWorkout(Request $request) { $id = $request->workoutid; $getWorkout = Workout::find($id); if($getWorkout->delete()){ return redirect()->back()->with('danger','Workout Deleted successfully'); } else{ return redirect()->back()->with('danger','Sorry! Workout is not deleted'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteWorklog(){\n\n }", "function delete_entry($entryID) {\r\n $this->db->where('id', $entryID);\r\n $this->db->delete('workHours');\r\n }", "function delete_workman($id)\n {\n return $this->db->delete('workman',array('id'=>$id));\n }", "public function edit(...
[ "0.67456985", "0.63389087", "0.6332227", "0.6252248", "0.6217238", "0.6122122", "0.6102628", "0.605384", "0.59912604", "0.59836406", "0.59804535", "0.5974781", "0.5966493", "0.5956046", "0.59432197", "0.59420574", "0.5908118", "0.5903832", "0.5903832", "0.5902733", "0.5902004...
0.6510778
1
/edit program Function for view form
public function editProgram($id) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $workout = Program::find($id); $categories = ProgramCategory::all(); //dd($workout); return view('admin.editprogram')->with('workout',$workout)->with('programCategories',$categories); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit() {\n\t\t\t\n\t\t}", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit( )\r\n {\r\n //\r\n }", "public function edit()\n\t{\n\t\t\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $...
[ "0.77361465", "0.7735269", "0.7657936", "0.76560456", "0.7548568", "0.7519377", "0.7501396", "0.738717", "0.7372835", "0.7372835", "0.7341182", "0.7268468", "0.7268117", "0.72655356", "0.72494566", "0.72494566", "0.72494566", "0.72395515", "0.72395515", "0.72395515", "0.71844...
0.0
-1
/edit program Function for update data form
public function updateProgram(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'name' => 'required', 'details' => 'required', 'set1' => 'required', 'set3' => 'required', 'set2' => 'required', )); $id = $request->id; $program = Program::find($id); $program->title = $request->name; $program->description = $request->details; $program->category = $request->category; $program->set1 = $request->set1; $program->set2 = $request->set2; $program->set3 = $request->set3; if ($request->hasFile('image')) { $file = $request->file('image'); $filename = time().'.'.$file->getClientOriginalName(); /*$location = public_path('file/'.$filename); Storage::put($filename,file_get_contents($file));*/ $location = public_path('file/'.$filename); Storage::disk('file')->put($filename, file_get_contents($file)); //Storage::disk('public')->put($filename, file_get_contents($file)); $program->image = $filename; } $program->save(); Session::flash('success','Program Updated succcessfully.'); return redirect()->back()->with('workout',$program); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit()\n\t{\n\t\t//\n\t}", "public function edit() {\n\t\t\t\n\t\t}", "public function edit()\n\t{\n\t\t\n\t}", "public function edit( )\r\n {\r\n //\r\n }", "function doEdit()\n {\n global $_POST;\n$regs=explode(\":::\",$_POST[\"DROWS\"]);\n$id= $regs[0];\n if (strlen($id...
[ "0.72682345", "0.72679824", "0.7206149", "0.72013015", "0.7164414", "0.71429735", "0.70624596", "0.70470595", "0.7032516", "0.69918853", "0.6963347", "0.6961319", "0.6931565", "0.69216913", "0.68896455", "0.68853915", "0.68544734", "0.68432236", "0.6827983", "0.68006665", "0....
0.0
-1
/edit program Function for delete form
public function deleteProgram(Request $request) { $id = $request->workoutid; $getWorkout = Program::find($id); if($getWorkout->delete()){ return redirect()->back()->with('danger','Program Deleted successfully'); } else{ return redirect()->back()->with('danger','Sorry! Program is not deleted'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function student_form_delete() {\n $id = arg(1);\n $num_deleted = db_delete('student')\n ->condition('st_id', $id)\n ->execute();\n if ($num_deleted) {\n drupal_set_message(t('entry has been deleted.'));\n drupal_goto(\"formlist\");\n }\n else {\n drupal_set_message(t('error in query'));\n }\n...
[ "0.7396423", "0.7295664", "0.7004687", "0.7004598", "0.69948024", "0.6977662", "0.69732225", "0.6943188", "0.6940848", "0.6896358", "0.6840411", "0.6798465", "0.67909914", "0.6738867", "0.67353976", "0.67347413", "0.6725119", "0.6712503", "0.6712503", "0.6705137", "0.668117",...
0.0
-1
/edit video Function for view form
public function editVideo($id) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $workout = Video::find($id); $categories = VideoCategory::all(); //dd($categories); return view('admin.editvideo')->with('workout',$workout)->with('videoCategories',$categories); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Video $video)\n {\n //\n }", "public function edit(Video $video)\n {\n //\n }", "public function editAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid()) {\n return;\n }\n\n //GET LISTING ID\n $listing_id = $t...
[ "0.82094455", "0.82094455", "0.7998506", "0.7776602", "0.77720237", "0.76061344", "0.76054996", "0.7556612", "0.7543911", "0.7481285", "0.7459408", "0.7444025", "0.74257445", "0.74120045", "0.74111384", "0.73897797", "0.7382478", "0.7370786", "0.7340393", "0.7335668", "0.7330...
0.7173445
32
/edit video Function for Update data
public function updateVideo(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'title' => 'required', 'category' => 'required', 'video' => 'mimes:mp4' )); $id = $request->id; $video = Video::find($id); $video->title = $request->title; $video->video_category_id = $request->category; if ($request->hasFile('video')) { $file = $request->file('video'); $filename = time().'.'.$file->getClientOriginalName(); /*$location = public_path('file/'.$filename); Storage::put($filename,file_get_contents($file));*/ $location = public_path('file/'.$filename); Storage::disk('file')->put($filename, file_get_contents($file)); //Storage::disk('public')->put($filename, file_get_contents($file)); $video->video = $filename; } $video->save(); Session::flash('success','Video Updated succcessfully.'); return redirect()->back()->with('workout',$video); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Video $video)\n {\n //\n }", "public function edit(Video $video)\n {\n //\n }", "public function editVideo(Request $request)\n {\n\n $editVideo = UploadVideo::where(\"id\", $request->id)->first();\n $editVideo->content_title = ucfirst($request->ti...
[ "0.75878435", "0.75878435", "0.75445503", "0.7264923", "0.7123643", "0.70566493", "0.69860923", "0.69637764", "0.6932711", "0.68725497", "0.6852951", "0.6852951", "0.6799745", "0.6792167", "0.6781767", "0.67788374", "0.6732424", "0.67019075", "0.66847676", "0.6680973", "0.666...
0.68594325
10
/edit video Function for delete
public function deleteVideo(Request $request) { $id = $request->workoutid; $getWorkout = Video::find($id); if($getWorkout->delete()){ return redirect()->back()->with('danger','Video Deleted successfully'); } else{ return redirect()->back()->with('danger','Sorry! Video is not deleted'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function del()\n {\n $id = $this->uri->rsegment(3);\n $this->_del($id);\n \n $this->session->set_flashdata('message', 'Xóa thành công');\n redirect(admin_url('video'));\n }", "private function deleteVideo()\n {\n try \n {\n global $cbvid;\n ...
[ "0.7388208", "0.73701775", "0.73647755", "0.73647755", "0.71583915", "0.7045595", "0.69015956", "0.67832226", "0.67685986", "0.6701937", "0.6693719", "0.6625152", "0.6597354", "0.65410125", "0.65278876", "0.65186405", "0.64987296", "0.64841425", "0.64774865", "0.6437365", "0....
0.64933693
17
/edit nutrition Function for view form
public function editnutration($id) { $dietPlan = false; if((Auth::check()) && (Auth::user()->is_admin == 1)){ $nutration = Nutration::find($id); $categories = NutrationCategory::all(); if(($nutration->nutration_categorys_id) && ($nutration->is_seven == 1)){ $nutration = SevenDayPlan::where('nutration_id',$id)->first(); $dietPlan = true; return view('admin.editsevenddays')->with('nutration',$nutration)->with('NutrationCategory',$categories)->with('dietplan',$dietPlan)->with('id',$id); } /*$isFoodplan = $workout->nutration_categorys_id; if($isFoodplan){ $workout = SevenDayPlan::where('nutration_id',$id)->first(); }*/ return view('admin.editnutration')->with('nutration',$nutration)->with('NutrationCategory',$categories)->with('dietplan',$dietPlan)->with('id',$id); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit($id)\n {\n $entry = Nutrition::find($id);\n return view('modify', ['entry'=>$entry]);\n }", "public function edit(gestionnaire $gestionnaire)\n {\n //\n }", "function get_form_edit(){\n\t\t\tif($this->check_session->user_session() && $this->check_session->g...
[ "0.7154243", "0.6891006", "0.68758917", "0.679723", "0.6782807", "0.6697209", "0.6695456", "0.6683639", "0.66821104", "0.6679249", "0.667714", "0.66561234", "0.6627897", "0.6614566", "0.6607163", "0.6603681", "0.6599527", "0.6594065", "0.6594065", "0.6593316", "0.65847224", ...
0.68616873
3
/edit nutrition Function for update data
public function updatenutration(Request $request) { //dd($request); $id = $request->id; //if diet plan for seven days if($request->foodplanDays == '7'){ $this->validate($request,array( 'title' => 'required', 'nutration_description1' => 'required', 'nutration_description2' => 'required', 'nutration_description3' => 'required', 'nutration_description4' => 'required', 'nutration_description5' => 'required', 'nutration_description6' => 'required', 'nutration_description7' => 'required' )); $nutration = Nutration::find($id); $nutration->title = $request->title; $nutration->nutration_description = $request->nutration_description1; $nutration->is_seven = 1; $nutration->nutration_categorys_id = 2; if ($request->hasFile('proteinimage')) { $file = $request->file('proteinimage'); $filename = time().'.'.$file->getClientOriginalName(); /*$location = public_path('file/'.$filename); Storage::put($filename,file_get_contents($file));*/ $location = public_path('file/'.$filename); Storage::disk('file')->put($filename, file_get_contents($file)); //Storage::disk('public')->put($filename, file_get_contents($file)); $nutration->nutration_image = $filename; } $nutration->save(); $nutrationId = $nutration->id; $sevenDaysData = SevenDayPlan::where('nutration_id',$id)->first(); if(!empty($sevenDaysData)){ $sevenDaysData->nutration_id = $nutrationId; $sevenDaysData->title = $request->title; $sevenDaysData->first = $request->nutration_description1; $sevenDaysData->second = $request->nutration_description2; $sevenDaysData->third = $request->nutration_description3; $sevenDaysData->fourth = $request->nutration_description4; $sevenDaysData->fifth = $request->nutration_description5; $sevenDaysData->sixth = $request->nutration_description6; $sevenDaysData->seventh = $request->nutration_description7; } else{ $sevenDaysData = new SevenDayPlan; $sevenDaysData->nutration_id = $nutrationId; $sevenDaysData->title = $request->title; $sevenDaysData->first = $request->nutration_description1; $sevenDaysData->second = $request->nutration_description2; $sevenDaysData->third = $request->nutration_description3; $sevenDaysData->fourth = $request->nutration_description4; $sevenDaysData->fifth = $request->nutration_description5; $sevenDaysData->sixth = $request->nutration_description6; $sevenDaysData->seventh = $request->nutration_description7; } if ($request->hasFile('proteinimage')) { $file = $request->file('proteinimage'); $filename = time().'.'.$file->getClientOriginalName(); /*$location = public_path('file/'.$filename); Storage::put($filename,file_get_contents($file));*/ $location = public_path('file/'.$filename); Storage::disk('file')->put($filename, file_get_contents($file)); //Storage::disk('public')->put($filename, file_get_contents($file)); $sevenDaysData->image = $filename; } if($sevenDaysData->save()){ return redirect()->back()->with('success','Nutration updated successfully.'); } else{ return redirect()->back()->with('danger','Nutration is not updated.'); } } else{ $this->validate($request,array( 'title' => 'required', 'nuCategory' => 'required', 'nutration_description' => 'required', )); $nutration = Nutration::find($id); $nutration->title = $request->title; $nutration->nutration_description = $request->nutration_description; $nutration->nutration_categorys_id = $request->nuCategory; $nutration->is_seven = 0; if ($request->hasFile('proteinimage')) { $file = $request->file('proteinimage'); $filename = time().'.'.$file->getClientOriginalName(); /*$location = public_path('file/'.$filename); Storage::put($filename,file_get_contents($file));*/ $location = public_path('file/'.$filename); Storage::disk('file')->put($filename, file_get_contents($file)); //Storage::disk('public')->put($filename, file_get_contents($file)); $nutration->nutration_image = $filename; } if($nutration->save()){ return redirect()->back()->with('success','Nutration updated successfully.'); } else{ return redirect()->back()->with('denger-success','Nutration is not updated.'); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateSuperfund()\n {\n }", "public function addNutritionalBenefit(){\n \t$id = $this->formValueForKey(\"nutritionalBenefitSelection\");\n \n \t$foundNutritionalBenefit = BLGenericRecord::recordMatchingKeyAndValue(\"NutritionalBenefit\", \"id\", $id);\n \t$t...
[ "0.6205825", "0.6188661", "0.615069", "0.60900736", "0.60419804", "0.5922151", "0.5914309", "0.5894883", "0.5840756", "0.58298254", "0.5815297", "0.58077335", "0.5802055", "0.57874167", "0.5781095", "0.5777252", "0.57587916", "0.5733289", "0.57305455", "0.5715105", "0.5709321...
0.0
-1
/Edit nutririon Function for delete
public function deletenutration(Request $request) { $id = $request->workoutid; $getWorkout = Nutration::find($id); if($getWorkout->delete()){ return redirect()->back()->with('danger','Nutration Deleted successfully'); } else{ return redirect()->back()->with('danger','Sorry! Nutration is not deleted'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete()\n {\n }", "public function deleting()\n {\n # code...\n }", "function delete()\r\n {\r\n\r\n }", "public function Do_delete_Example1(){\n\n\t}", "function delete() \n {\n \n }", "public function actionDelete() {}", "public function actionDe...
[ "0.75826776", "0.7582287", "0.75806457", "0.7529898", "0.7512215", "0.7502402", "0.7502402", "0.74460536", "0.74243456", "0.74122477", "0.73959243", "0.7381666", "0.7347854", "0.7342801", "0.7342801", "0.73366445", "0.73326606", "0.73280436", "0.7326541", "0.7326388", "0.7321...
0.0
-1
/View workout category Function
public function allworkoutcategory() { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $allWorkout = DB::table('categories') ->orderBy('id','DESC') ->paginate(10); //$allWorkout = DB::table('workouts')->orderBy('id','DESC')->get(); return view('admin.allworkoutcategory')->with('allworkout',$allWorkout); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addWorkoutCategory()\n {\n return view('admin.addworkoutcategory');\n }", "function wc_marketplace_category() {\n global $wmp;\n $wmp->output_report_category();\n }", "public function getViewedCategory();", "function showCategory()\r\n {\r\n }", "public f...
[ "0.70076585", "0.6643182", "0.6540571", "0.6184498", "0.61589843", "0.60917133", "0.60839635", "0.60839635", "0.60839635", "0.6025001", "0.596794", "0.59064233", "0.5904465", "0.5903311", "0.5895543", "0.5882564", "0.5882564", "0.58481395", "0.58303297", "0.58261317", "0.5826...
0.65132195
3
/edit workout category Function for view form
public function editworkoutcategory($id) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $workout = Category::find($id); return view('admin.editworkoutcategory')->with('workout',$workout); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateworkoutcategory(Request $request)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n\n $this->validate($request,array(\n 'name' => 'required',\n ));\n $id = $request->id;\n $workoutCategory = Category::find($id);\n ...
[ "0.69934815", "0.6759673", "0.6755315", "0.67062914", "0.67001015", "0.66443294", "0.6574874", "0.6564783", "0.65390974", "0.6490522", "0.64873505", "0.647618", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072"...
0.7222749
0
/edit workout category Function for update form
public function updateworkoutcategory(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'name' => 'required', )); $id = $request->id; $workoutCategory = Category::find($id); $workoutCategory->Category = $request->name; $workoutCategory->save(); Session::flash('success','Workout Category Updated succcessfully.'); return redirect()->back()->with('workout',$workoutCategory); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Workout $workout)\n {\n //\n }", "function product_category_edit(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u, $fs;\n\t\t\n\t\t$data = $_r['data'];\n\t\t$data['id'] = $_r['id'];\n\t\t\n\t\tif($data['save'] || $data['apply']){\n\t\t\tif(!$data['title']) $error['title'] = tr...
[ "0.6806339", "0.67915225", "0.6783352", "0.6751382", "0.67282903", "0.67065406", "0.6692574", "0.65847135", "0.6567059", "0.65591395", "0.6540297", "0.6506003", "0.65053743", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967...
0.7347392
0
/Edit workout category Function for delete
public function deleteworkoutcategory(Request $request) { $id = $request->workoutid; $getWorkout = Category::find($id); if($getWorkout->delete()){ return redirect()->back()->with('danger','Workout Category Deleted successfully'); } else{ return redirect()->back()->with('danger','Sorry! Workout Category is not deleted'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteNutrationCategory(Request $request)\n {\n $id = $request->workoutid;\n $getWorkout = NutrationCategory::find($id);\n if($getWorkout->delete()){\n return redirect()->back()->with('danger','Nutration Category Deleted successfully');\n }\n else{\n...
[ "0.66179216", "0.62175333", "0.606527", "0.6050479", "0.6025807", "0.5908983", "0.58987623", "0.58845043", "0.58626807", "0.5849458", "0.58235", "0.5812783", "0.57931215", "0.57875305", "0.5775079", "0.5774425", "0.57559234", "0.57472736", "0.5708211", "0.5707082", "0.5699718...
0.67777485
0
/View program category Function
public function allProgramCategory() { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $allWorkout = DB::table('program_category') ->orderBy('id','DESC') ->paginate(10); //$allWorkout = DB::table('workouts')->orderBy('id','DESC')->get(); return view('admin.allprogramcategory')->with('allworkout',$allWorkout); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showCategory()\r\n {\r\n }", "public function category() {\n\t\treturn static::get_thrive_basic_label();\n\t}", "public function get_category()\n {\n return 'Fun and Games';\n }", "public function get_category()\n {\n return 'Fun and Games';\n }", "public function g...
[ "0.68127215", "0.67239016", "0.670923", "0.670923", "0.670923", "0.666228", "0.6455622", "0.64367336", "0.63847077", "0.6349411", "0.62409276", "0.62309605", "0.6222077", "0.6222077", "0.61962056", "0.6190804", "0.6189849", "0.6159506", "0.60971355", "0.60432327", "0.60432327...
0.0
-1
/Edit program category Function for view Form
public function editProgramCategory($id) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $workout = ProgramCategory::find($id); return view('admin.editprogramcategory')->with('workout',$workout); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function formModify() {\n $categories=$this->model->listCategories();\n $this->view->display(\"view/form/ProductFormModify.php\", NULL, $categories); \n }", "public function addProgramCategory()\n {\n return view('admin.addprogramcategory');\n }", "public function update...
[ "0.69252604", "0.6846754", "0.6837912", "0.6709462", "0.6661503", "0.664688", "0.66090596", "0.64908993", "0.6467321", "0.64135224", "0.6387015", "0.63678974", "0.63644814", "0.63365185", "0.6296625", "0.62937313", "0.625918", "0.6256656", "0.6225534", "0.6225534", "0.6225534...
0.63124186
14
/Edit program category Function for update Form
public function updateProgramCategory(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'name' => 'required', )); $id = $request->id; $programCategory = ProgramCategory::find($id); $programCategory->program_category_name = $request->name; $programCategory->tips = $request->tips; $programCategory->save(); Session::flash('success','Program Category Updated succcessfully.'); return redirect()->back()->with('workout',$programCategory); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function product_category_edit(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u, $fs;\n\t\t\n\t\t$data = $_r['data'];\n\t\t$data['id'] = $_r['id'];\n\t\t\n\t\tif($data['save'] || $data['apply']){\n\t\t\tif(!$data['title']) $error['title'] = true;\n\t\t\tif(count($error)==0){\n\t\t\t\t$set = array();\n\t\t\t\t$se...
[ "0.7168806", "0.68563706", "0.68045294", "0.67021406", "0.66843504", "0.6539066", "0.65129566", "0.6509204", "0.65071285", "0.6467194", "0.6461227", "0.6446446", "0.64327765", "0.63985825", "0.6393049", "0.6384055", "0.63766485", "0.6357264", "0.63523203", "0.6347449", "0.634...
0.6705095
3
/Edit program category Function for delete video
public function deleteProgramCategory(Request $request) { $id = $request->workoutid; $getWorkout = ProgramCategory::find($id); if($getWorkout->delete()){ return redirect()->back()->with('danger','Program Category Deleted successfully'); } else{ return redirect()->back()->with('danger','Sorry! Program Category is not deleted'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cat_delete_link()\n{\n return Parrot::getInstance()->getUrl(\"admin/category/\" . discussion::encode_title(cat_title()) . \"/delete\");\n}", "private function deleteVideo()\n {\n try \n {\n global $cbvid;\n \n $request = $_REQUEST;\n #pex($r...
[ "0.63882744", "0.63852364", "0.6378514", "0.6290865", "0.6265053", "0.6234889", "0.6171267", "0.61005694", "0.605339", "0.6045303", "0.60394335", "0.6023272", "0.5996328", "0.59894025", "0.59632385", "0.59167844", "0.5886778", "0.5874059", "0.5808132", "0.5797629", "0.5759625...
0.0
-1
/view video category Function
public function allVideoCategory() { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $allWorkout = DB::table('video_category') ->orderBy('id','DESC') ->paginate(10); //$allWorkout = DB::table('workouts')->orderBy('id','DESC')->get(); return view('admin.allvideocategory')->with('allworkout',$allWorkout); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $module = $this->params('module');\n $slug = $this->params('slug');\n\n // Get config\n $config = Pi::service('registry')->config->read($module);\n\n // Get category information from model\n $category = $this->getModel('category')->...
[ "0.71129334", "0.7088098", "0.68356526", "0.67956144", "0.6774687", "0.67714834", "0.6703376", "0.66435254", "0.66068417", "0.6592017", "0.65885174", "0.65164816", "0.6491253", "0.649111", "0.64447176", "0.6427883", "0.6427751", "0.638876", "0.6347911", "0.631395", "0.6300028...
0.5880714
72
/Edit video category Function for view Form
public function editVideoCategory($id) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $workout = VideoCategory::find($id); return view('admin.editvideocategory')->with('workout',$workout); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addEdit(){\n\t\tif (isset($this->session->userdata['logged_in'])){\n\t\t\t$video_id = $this->uri->segment(4);// get id form url\n\t\t\tif($video_id==''){\n\t\t\t\t$data['title'] = \"Add Video\";\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$data['title'] = \"Edit Video\";\n\t\t\t}\n\t\t\t$data['content'] = 'ad...
[ "0.74266785", "0.7275998", "0.726344", "0.68650925", "0.6863897", "0.6794455", "0.6754705", "0.6735835", "0.67225397", "0.67225397", "0.6645616", "0.66434765", "0.6589407", "0.65821415", "0.6552618", "0.6528862", "0.64521164", "0.6444938", "0.6425412", "0.64169085", "0.639368...
0.7021443
3
/Edit video category Function for update
public function updateVideoCategory(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'name' => 'required', )); $id = $request->id; $videoCategory = VideoCategory::find($id); $videoCategory->video_category_name = $request->name; $videoCategory->save(); Session::flash('success','Video Category Updated succcessfully.'); return redirect()->back()->with('workout',$videoCategory); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifyCategory()\n{\n global $connection;\n if (isset($_POST['modifyBtn'])) {\n $categoria_id = $_POST['categoria_id'];\n\n $categoria_nome = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['categoria_nome']);\n\n $query_update = \"UPDATE video_c...
[ "0.70255893", "0.68039304", "0.67580926", "0.67113507", "0.67026937", "0.6621358", "0.65880543", "0.6528769", "0.6527254", "0.6502974", "0.6494821", "0.64577454", "0.6449746", "0.6443463", "0.64407146", "0.64304763", "0.6426913", "0.63906366", "0.63733435", "0.63481635", "0.6...
0.7049841
0
/Edit video category Function for delete video category
public function deleteVideoCategory(Request $request) { $id = $request->workoutid; $getWorkout = VideoCategory::find($id); if($getWorkout->delete()){ return redirect()->back()->with('danger','Video Category Deleted successfully'); } else{ return redirect()->back()->with('danger','Sorry! Video Category is not deleted'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cat_delete_link()\n{\n return Parrot::getInstance()->getUrl(\"admin/category/\" . discussion::encode_title(cat_title()) . \"/delete\");\n}", "public function delete(){\n\n\t\t$sql = new Sql();\n\n\t\t$sql->query(\"DELETE FROM tb_categories WHERE idcategory=:idcategory\",array(\n\t\t\t\":idcategory\"=...
[ "0.6836293", "0.6664944", "0.663955", "0.66256726", "0.65463334", "0.643667", "0.64297694", "0.6421151", "0.64116925", "0.6404533", "0.63948876", "0.6360626", "0.63225144", "0.6319296", "0.62775624", "0.62721723", "0.62640065", "0.62535095", "0.6248276", "0.6229323", "0.61948...
0.67401767
1
/Edit Nutration Category for view form
public function editNutrationCategory($id) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $workout = NutrationCategory::find($id); return view('admin.editnutrationcategory')->with('workout',$workout); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Category $Category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Catego...
[ "0.70665777", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986", "0.70652986"...
0.7055109
24
/Edit Nutration Category Function for update
public function updateNutrationCategory(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'name' => 'required', 'tips' => 'required', )); $id = $request->id; $nutrationCategory = NutrationCategory::find($id); $nutrationCategory->nutration_category_name = $request->name; $nutrationCategory->tips = $request->tips; $nutrationCategory->save(); Session::flash('success','Nutration Category Updated succcessfully.'); return redirect()->back()->with('workout',$nutrationCategory); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateItemSubCategory()\n {\n }", "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\...
[ "0.71557504", "0.71024853", "0.70967233", "0.6873377", "0.6844343", "0.68225706", "0.6781376", "0.67681557", "0.6741728", "0.66843164", "0.66287494", "0.6611749", "0.6610787", "0.65974736", "0.65905493", "0.6587013", "0.65291274", "0.6514518", "0.6501304", "0.6478147", "0.646...
0.7165534
0
/Delete Nutrition Category Function
public function deleteNutrationCategory(Request $request) { $id = $request->workoutid; $getWorkout = NutrationCategory::find($id); if($getWorkout->delete()){ return redirect()->back()->with('danger','Nutration Category Deleted successfully'); } else{ return redirect()->back()->with('danger','Sorry! Nutration Category is not deleted'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_category() {\n $category_id = $_GET['category_id'];\n\n $data['delete_category'] = $this->Category_crud->get_category_by_id($category_id);\n $this->load->view('restaurant/category/delete_category_model', $data);\n\n if (isset($_POST['delete_category_yes'])) {\n ...
[ "0.69728845", "0.69309986", "0.68059367", "0.65877753", "0.6557906", "0.6525597", "0.6450585", "0.64371765", "0.6426727", "0.64032364", "0.6383666", "0.633878", "0.6333474", "0.6313338", "0.6311642", "0.6310584", "0.63052934", "0.6280416", "0.62617826", "0.6255811", "0.621699...
0.70054156
0
List all the projects.
public function findAll(GoogleAccount $account);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function all_projects(){\n /**\n * @var \\AWorDS\\App\\Models\\Project $project\n */\n $project = $this->set_model();\n $logged_in = $project->login_check();\n if($logged_in){\n $this->set('logged_in', $logged_in);\n $this->set('active_tab', 'projec...
[ "0.8293205", "0.8117821", "0.8059335", "0.802318", "0.7975119", "0.7975119", "0.7949665", "0.78485227", "0.78437656", "0.77988726", "0.7795526", "0.7727843", "0.7670076", "0.76566744", "0.76439637", "0.76098233", "0.7597514", "0.7591218", "0.7580886", "0.7527415", "0.75109035...
0.0
-1
Run the database seeds.
public function run() { $this->name = 'Liberia'; $this->official_name = 'Republic of Liberia'; $this->iso_alpha_2 = 'LR'; $this->iso_alpha_3 = 'LBR'; $this->iso_numeric = '430'; $this->international_phone = '231'; $this->languages = ['en']; $this->tld = ['.lr']; $this->wmo = 'LI'; $this->geoname_id = '2275384'; $this->emoji = [ 'img' => '🇱🇷', 'uCode' => 'U+1F1F1 U+1F1F7', ]; $this->color = [ 'hex' => [ '#ff0000', '#ffffff', '#00008b', ], 'rgb' => [ '255,0,0', '255,255,255', '0,0,139', ], ]; $this->coordinates = [ 'latitude' => [ 'classic' => '6 30 N', 'desc' => '6.411512851715088', ], 'longitude' => [ 'classic' => '9 30 W', 'desc' => '-9.323492050170898', ], ]; $this->coordinates_limit = [ 'latitude' => [ 'max' => '9.5', 'min' => '4.328333', ], 'longitude' => [ 'max' => '-4', 'min' => '-11.472222', ], ]; $this->geographical = json_decode($this->geographical(), true); Builder::country($this); }
{ "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.80140394", "0.7980541", "0.79775697", "0.79547316", "0.79514134", "0.79500794", "0.79444957", "0.794259", "0.79382807", "0.7937482", "0.7934376", "0.7892533", "0.7881253", "0.78794724", "0.7879101", "0.7875628", "0.787215", "0.7870168", "0.78515327", "0.7850979", "0.784195...
0.0
-1
Dump and die function
function viewdump($data) { if (PLATFORM === 'development') { echo '<pre>'; echo var_dump($data); echo '</pre>'; exit(); } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dump($die = false);", "abstract function doDump();", "function dump_die ($data){\n echo \"<pre>\";\n var_dump($data);\n echo \"</pre>\";\n die();\n}", "function dumpAndDie ($value): void {\n\tvar_dump($value);\n\tdie();\n}", "public function dump() {}", "public function dump()...
[ "0.79750234", "0.7531294", "0.75060105", "0.73076326", "0.69344354", "0.6788386", "0.6788386", "0.6749551", "0.6651697", "0.6525088", "0.64781", "0.6474842", "0.6422564", "0.6396751", "0.6370888", "0.6286499", "0.6253153", "0.6247015", "0.6235126", "0.622372", "0.6188854", ...
0.0
-1
Get a customer payment plan from the Checkout.com server. How to use this: $customer_payment_plan = new CustomerPaymentPlan; $customer_payment_plan>id = 'rp_000000000000000'; $customer_payment_plan>get(); $customer_payment_plan = new CustomerPaymentPlan; $customer_payment_plan>customerId = 'cust_000000000000000'; $customer_payment_plan>planId = 'rp_000000000000000'; $customer_payment_plan>get();
public function get() { if ($this->db_get() || $this->api_query()) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaymentPlan()\n {\n return $this->payment_plan;\n }", "public function getPlan();", "private function get_plan()\n\t{\n\t\treturn $this->m_plan;\n\t}", "public function getBillingPlan(User $user, $id);", "public function getSubscriptionPlan() {\n $categoryId = Config:...
[ "0.6677754", "0.6611684", "0.64265364", "0.6259155", "0.6233449", "0.61645", "0.61427605", "0.6124666", "0.61142963", "0.61086214", "0.6094174", "0.6077126", "0.60749197", "0.5969812", "0.5885546", "0.5881825", "0.5859189", "0.58482456", "0.5809344", "0.57992136", "0.577942",...
0.0
-1
Queries for a customer paymentplan from the Checkout.com API. Minimal usage: $this>customerId = 'cust_000000000000000'; $this>planId = 'rp_000000000000000'; $this>api_query();
private function api_query() { if ($this->trackId == null) { return false; } $class[] = 'includes/checkout-php-library/autoload'; $class[] = 'includes/checkout-php-library/com/checkout/Apiclient'; $class[] = 'includes/checkout-php-library/com/checkout/Apiservices/Reporting/Reportingservice'; $class[] = 'includes/checkout-php-library/com/checkout/Apiservices/Reporting/Requestmodels/Transactionfilter'; foreach ($class as $path) { module_load_include('php', 'uc_checkoutpayment', $path); } $apiClient = new com\checkout\Apiclient(variable_get('cko_private_key'),variable_get('cko_mode')); $service = $apiClient->Reportingservice(); $request = new com\checkout\Apiservices\Reporting\Requestmodels\Transactionfilter(); $request->setPageSize('100'); $request->setSortColumn('date'); $request->setFilters( array( "action" => "include", "field" => "TrackID", "operator" => "EQUALS", "value" => $this->trackId, ) ); $response = $service->queryTransaction($request); if (!empty($response)) { foreach ($response as $value) { $this->id = $value->id; $this->created = $value->created; $this->trackId = $value->track_id; $this->currency = $value->currency; $this->responseMessage = $value->responseMessage; $this->responseCode = $value->responseCode; $this->status = $value->status; $this->value = $data->value; $this->email = $data->email; $this->db_add(); } return $this->db_get(); } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBillingPlan(User $user, $id);", "public function billingPlan($id)\n {\n $this->shellshock(request(), [\n 'number' => 'required|numeric',\n 'exp_month' => 'required|numeric',\n 'exp_year' => 'required|numeric',\n 'cvc' => 'required|numeric',...
[ "0.59946686", "0.5803131", "0.577185", "0.574437", "0.56849277", "0.5673585", "0.5654416", "0.5637344", "0.5628221", "0.56029874", "0.5549823", "0.5522442", "0.5508262", "0.5487575", "0.54442525", "0.543383", "0.5418427", "0.54067606", "0.5406201", "0.5376684", "0.5349627", ...
0.0
-1
Gets this customer payment plan from the local database. Minimal usage: $this>id = 'cp_000000000000000'; $this>db_get(); $this>customerId = 'cust_000000000000000'; $this>planId = 'rp_000000000000000'; $this>db_get();
private function db_get() { if ($this->trackId == null) { return FALSE; } $sqlRepsonse = db_select('uc_checkoutpayment_hub_communication', 'c') ->fields('c') ->condition('track_id', $this->trackId, '=') ->orderBy('created', 'DESC') ->execute() ->fetchAll(); if (!empty($sqlRepsonse)) { $data = reset($sqlRepsonse); $default = end($sqlRepsonse); $this->email = $default->email; foreach ($sqlRepsonse as $charge) { if ($charge->status == $data->status) { $this->value += $charge->value; } if ($charge->responseCode == '10100') { $data->responseMessage = $charge->responseMessage; } } $this->id = $data->id; $this->created = $data->created; $this->trackId = $data->track_id; $this->currency = $data->currency; $this->responseMessage = $data->responseMessage; $this->responseCode = $data->responseCode; $this->status = $data->status; return TRUE; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_plan()\n\t{\n\t\treturn $this->m_plan;\n\t}", "function TestPlan_get($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getPlan();", "public func...
[ "0.6144168", "0.6015181", "0.59715974", "0.5874402", "0.586615", "0.58638555", "0.58001757", "0.5774641", "0.5713231", "0.5711915", "0.56871223", "0.56824815", "0.56503165", "0.5622329", "0.5617317", "0.559445", "0.555296", "0.5528892", "0.5429408", "0.54237854", "0.54033685"...
0.0
-1
Adds this customer payment plan to the local database. Minimal usage: $this>id = 'cp_000000000000000'; $this>planId = 'rp_000000000000000'; $this>customerId = 'cust_000000000000000'; $this>db_add();
private function db_add() { try { db_insert('uc_checkoutpayment_hub_communication') ->fields(array( 'id' => $this->id, 'created' => $this->created, 'email' => $this->email, 'track_id' => $this->trackId, 'value' => $this->value, 'currency' => $this->currency, 'responseMessage' => $this->responseMessage, 'responseCode' => $this->responseCode, 'status' => $this->status, )) ->execute(); } catch (Exception $e) { watchdog( 'Checkout.com', 'Notice: The charge wasn\'t added to the the local database. (:errorMessage)', array( ':errorMessage' => $e->getMessage(), ), WATCHDOG_NOTICE ); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show_plan_add() {\n //must check that the user has the required capability \n if (!current_user_can('manage_options')) {\n csm_error('You do not have sufficient permissions to access this page', true);\n }\n \n $CsmWorkplace = new CsmWorkplace();\n $workplaces = $CsmWorkplace->all...
[ "0.65479475", "0.6377597", "0.62411183", "0.6048483", "0.6036802", "0.6023666", "0.6006261", "0.57970154", "0.5762466", "0.5743073", "0.57256174", "0.570475", "0.56551737", "0.5650669", "0.56371844", "0.5574069", "0.5561849", "0.55351794", "0.55299133", "0.5515849", "0.550449...
0.55928415
15
Get candidates that have this label
public function users() { return $this->belongsToMany('App/User', 'users_labels'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCandidates()\n {\n foreach ($this->cand_ids as $id) {\n // Use a generator to save on memory/resources\n // load accounts from DB one at a time only when required\n yield (new CandidateModel())->load($id);\n }\n }", "public function getCandi...
[ "0.578034", "0.5647531", "0.5560754", "0.54641813", "0.5454056", "0.5454056", "0.5454056", "0.5453678", "0.5319106", "0.53170294", "0.52748007", "0.5224645", "0.51084334", "0.50491625", "0.50306606", "0.5023338", "0.49820012", "0.49566698", "0.4931831", "0.4877894", "0.484498...
0.0
-1
Get jobs that have this label
public function jobs() { return $this->belongsToMany('App/Job', 'jobs_labels'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_job_list() {\n return $this->find_all_jobs();\n }", "public function getJobs();", "public function getJobs();", "public function getJobNames();", "public function getJobs()\n {\n return $this->jobs;\n }", "public function getJobs()\n {\n return $this->...
[ "0.61493784", "0.60545725", "0.60545725", "0.60209215", "0.58782834", "0.58782834", "0.58547014", "0.5765212", "0.5752247", "0.57405794", "0.5590233", "0.5589747", "0.5586155", "0.55186546", "0.54829043", "0.5466492", "0.54618704", "0.5457525", "0.53978217", "0.5392978", "0.5...
0.58452094
7
Converts a string to UTF8 encoding.
public static function convertToUtf8($string) { if (!self::isUtf8($string)) { $string = self::convertEncoding($string, 'gbk', 'utf-8'); } return $string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function str_to_utf8( $string ) {\n\n // Check if mbstring is installed, if not, run old way\n if ( !function_exists( 'mb_convert_encoding' ) )\n return ( ( preg_match( '!!u', $string ) ) ? $string : utf8_encode( $string ) );\n\n // Convert encoding from XXX to UTF-8\n $strin...
[ "0.8146631", "0.80081826", "0.79574114", "0.79016495", "0.7899158", "0.780542", "0.7780386", "0.753577", "0.7434597", "0.7398449", "0.73904634", "0.73522455", "0.7295353", "0.7293232", "0.71783525", "0.7096265", "0.70929974", "0.70885664", "0.7074014", "0.70462614", "0.703144...
0.7721233
7
Testing Can CRUD //
public function test_canCreate_Returns_True_If_Personnel_Have_Access() { $check_returns_true = $this->authorization_service3->canCreate(1,1); $this->assertTrue($check_returns_true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAccess()\n {\n Backend::set($this->k_business);\n $o_edit_controller = new EditController();\n $o_edit_controller->checkGet();\n }", "public function testEditUser()\n {\n }", "public function testEditUser()\n {\n\n }", "public function test_todo()\n {\n $l...
[ "0.7137868", "0.71212", "0.7117349", "0.7077714", "0.690422", "0.68343675", "0.67957246", "0.6795696", "0.67854947", "0.6781867", "0.6751219", "0.6751219", "0.6726462", "0.6702086", "0.66825217", "0.66612995", "0.6660682", "0.66189855", "0.6607188", "0.660254", "0.66005147", ...
0.0
-1
Testing Cannot CRUD //
public function test_canCreate_Returns_True_If_Personnel_Have_No_Access() { $check_returns_false = $this->authorization_service4->canCreate(2,2); $this->assertFalse($check_returns_false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testEditUser()\n {\n }", "public function testQuarantineFindById()\n {\n\n }", "public function testEditUser()\n {\n\n }", "function testNotFound()\n {\n \n /** Select **/\n $expected = [];\n $res = self::$objMysqlRepository->select(self::$tabl...
[ "0.7095423", "0.70584065", "0.7051599", "0.69919", "0.69517154", "0.6895294", "0.68868", "0.68813246", "0.68752396", "0.6868414", "0.6769111", "0.67213875", "0.6693624", "0.6679708", "0.66734946", "0.66208005", "0.66160166", "0.6586901", "0.65852183", "0.6580851", "0.658025",...
0.0
-1
Testing Existing Personnel //
public function testCanViewThrowsExceptionIfCannotFindRoleId() { $this->expectException(RoleNotFoundException::class); $check_can_view = $this->authorization_service2->canView(1, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetSiteMembershipForPerson()\n {\n }", "public function testListSiteMembershipsForPerson()\n {\n }", "public function testGetSiteMembershipRequestForPerson()\n {\n }", "public function testListSiteMembershipRequestsForPerson()\n {\n }", "public function testCreat...
[ "0.6768919", "0.6751776", "0.6695058", "0.6479803", "0.64630854", "0.64140356", "0.6150615", "0.60229486", "0.60082996", "0.6003067", "0.59998333", "0.5930241", "0.5923818", "0.5673526", "0.56708753", "0.5657327", "0.5637778", "0.5610929", "0.56055284", "0.5581423", "0.557421...
0.0
-1
TODO: Implement getStatus() method.
public function getLastStatus() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getStatus();", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getS...
[ "0.8379284", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.8238092", "0.82377774", "0.82377774", "0.82377774", ...
0.72410893
61
TODO: Implement getMsgStatusByMSGID() method.
public function getMsgStatusByMSGID($msgid) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatus($message_id);", "public function status(string $msgId)\n {\n $options = [\n 'msg_id' => $msgId,\n ];\n var_dump($options);\n var_dump(\"2222\");\n return $this->httpPostJson('cgi-bin/message/mass/get', $options);\n }", "public functi...
[ "0.7625756", "0.70659006", "0.6991421", "0.681895", "0.673134", "0.639874", "0.6263489", "0.62102044", "0.607951", "0.6073092", "0.6046357", "0.6016508", "0.6011807", "0.60105884", "0.6003367", "0.59765834", "0.59706825", "0.5963977", "0.5945867", "0.59445965", "0.59393036", ...
0.8129333
0
Finds the Kaohao model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (($model = Kaohao::findOne($id)) !== null) { return $model; } throw new NotFoundHttpException('The requested page does not exist.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function find($primary_key, $model);", "private function findModel($key)\n {\n if (null === $key) {\n throw new BadRequestHttpException('Key parameter is not defined in findModel method.');\n }\n\n $modelObject = $this->getNewModel();\n\n if (!method_exis...
[ "0.76797307", "0.7318244", "0.6913207", "0.6856757", "0.6825714", "0.6704856", "0.66969955", "0.66491276", "0.66455096", "0.66373557", "0.6635491", "0.6633922", "0.66005933", "0.6583299", "0.6582251", "0.65821195", "0.65627253", "0.65517807", "0.65364426", "0.651544", "0.6497...
0.67788404
5
public methods Creates new entity.
public function create() { $entityClassName = $this->getEntityClassName(); return $entityClassName::create($this, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createEntity();", "public function create(Entity $entity);", "function create($entity);", "public function create($entity);", "abstract protected function createEntityInstance();", "private function createEntity()\n {\n $this->entity = $this->container->make($this->entity());\n ...
[ "0.8894088", "0.82188594", "0.81235164", "0.80868316", "0.7920729", "0.7805106", "0.77431285", "0.75380355", "0.748992", "0.7476557", "0.7321029", "0.72979015", "0.71060014", "0.71041805", "0.7089774", "0.70742494", "0.70637393", "0.7059642", "0.7044398", "0.7036717", "0.7036...
0.7280097
12
Creates collection for entire repository.
public function listAll() { $collectionClassName = $this->getInstanceCollectionClassName(); return $collectionClassName::create($this, $this->getTable()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createCollection()\n {\n return $this->_setUpNewNode(\n new Collection()\n );\n }", "protected function createCollection()\n {\n $model = $this->getModel();\n return $model->asCollection();\n }", "public function createCollection($name) {}",...
[ "0.71131474", "0.70522183", "0.6830116", "0.66548276", "0.65879786", "0.6352937", "0.6263505", "0.623647", "0.6150254", "0.6047592", "0.60369515", "0.59982055", "0.59933424", "0.5991414", "0.5984081", "0.5969143", "0.5950309", "0.5940698", "0.59229934", "0.5901497", "0.587092...
0.0
-1
Loads entity from storage.
public function get($key) { if ($key == null) { return null; } $row = $this->getTable()->get($key); if ($row == null) { return null; } $entityClassName = $this->getEntityClassName(); return $entityClassName::create($this, $row); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getEntityFromStorage() {\n $entity_type = $this->store->get('entity_type');\n $entity_id = $this->store->get('entity_id');\n\n /** @var \\Drupal\\Core\\Entity\\EntityInterface $entity */\n $entity = $this->entityTypeManager()->getStorage($entity_type)\n ->load($entity_id);\n\n ...
[ "0.7410929", "0.7058673", "0.68563324", "0.64644235", "0.6369238", "0.63207024", "0.62677115", "0.62655187", "0.62655187", "0.6196828", "0.6196828", "0.6196828", "0.6196828", "0.6196828", "0.6196828", "0.6196828", "0.6196828", "0.6196828", "0.6196828", "0.6196828", "0.6196828...
0.0
-1
Loads entity matching $condition.
public function findOne(array $condition) { $row = $this->getTable()->where($condition)->fetch(); if ($row == null) { return null; } $entityClassName = $this->getEntityClassName(); return $entityClassName::create($this, $row); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load (mixed $tableOrClass, mixed $condition) : mixed {\n\n }", "public function find($condition)\n {\n if(!is_array($condition))\n {\n $condition = array($this->getKeyField() => $condition);\n }\n $model = $this->getStorage()->fetchRow($conditi...
[ "0.6330537", "0.61860967", "0.6008003", "0.5955637", "0.5862287", "0.58115077", "0.5687883", "0.56541544", "0.5620009", "0.5501468", "0.5501468", "0.54287124", "0.53933203", "0.53331125", "0.5320602", "0.531984", "0.5284055", "0.52788043", "0.52201957", "0.51958525", "0.51707...
0.5759243
6
Loads collection from database matching $condition.
public function findMany(array $condition) { $selection = $this->getTable()->where($condition); $collectionClassName = $this->getInstanceCollectionClassName(); return $collectionClassName::create($this, $selection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find($condition)\n {\n if(!is_array($condition))\n {\n $condition = array($this->getKeyField() => $condition);\n }\n $model = $this->getStorage()->fetchRow($condition);\n if(!$model->isLoaded())\n {\n return null;\n }\n ...
[ "0.57210517", "0.56922704", "0.5691084", "0.56790066", "0.55747086", "0.55327123", "0.5511437", "0.5477265", "0.5448327", "0.54200876", "0.5348354", "0.5317316", "0.53077555", "0.52874106", "0.5286501", "0.528025", "0.5269855", "0.5205735", "0.5188458", "0.51633877", "0.51414...
0.5729831
0
Deletes row by its primary value.
public function delete($key) { $this->getTable()->wherePrimary($key)->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteRowByPrimaryKey()\n {\n if (!$this->getId())\n throw new Exception('Primary Key does not contain a value');\n return $this->getMapper()->getDbTable()->delete('id = '.$this->getId());\n }", "public function deleteRowByPrimaryKey()\n {\n if (!$this->ge...
[ "0.78132737", "0.78132737", "0.7692293", "0.7674818", "0.76267326", "0.7626553", "0.7626553", "0.74181277", "0.7290904", "0.7238237", "0.70737433", "0.7067845", "0.70655566", "0.70165706", "0.6999292", "0.6982408", "0.6867629", "0.68368226", "0.68040717", "0.67106265", "0.667...
0.6587256
26
Verifies that the specified condition is not null. The assertion fails if the condition is null.
public function assertIsNull($value, $message='Unexpected null value: %s', $exception='Asserts') { if (is_null($value)) { $value = 'NULL'; $this->throwException($exception, $message, $value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function unittest_nestedConditions () {\n PhlintTest::assertNoIssues('\n $foo = null;\n if (is_null($foo))\n if (true === true)\n if ($foo) {}\n ');\n }", "protected function assertConditionsMet(): void\n {\n $this->assertThat(null, new ExpectationsMet());\n }...
[ "0.6321695", "0.61957353", "0.61014396", "0.5891267", "0.5870567", "0.58580095", "0.5771239", "0.57516587", "0.56984204", "0.56826603", "0.56670177", "0.56427836", "0.56427836", "0.5578369", "0.5575976", "0.5552035", "0.542101", "0.542101", "0.54190695", "0.54190695", "0.5396...
0.49239025
66
Make this functionality better.
public function giveRole($title) { $role = Role::where('title', $title)->first(); if(!$role) { return false; } $userRoles = $this->userRoles(); if($userRoles->where('role_id', $role->id)->first()) { return true; } return $this->userRoles()->create([ 'role_id' => $role->id, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function helper()\n\t{\n\t\n\t}", "protected function __init__() { }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}...
[ "0.60854626", "0.601819", "0.5985376", "0.5985376", "0.5985376", "0.5985376", "0.5985182", "0.5985182", "0.5985182", "0.5985182", "0.5985182", "0.5985182", "0.59845227", "0.59845227", "0.5890195", "0.5890195", "0.5890195", "0.5890195", "0.58668905", "0.5862108", "0.58431154",...
0.0
-1
Make this functionality better.
public function removeRole($title) { $role = Role::where('title', $title)->first(); if(!$role) { return false; } $userRole = $this->userRoles()->where('role_id', $role->id)->first(); if($userRole) { return $userRole->delete(); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function helper()\n\t{\n\t\n\t}", "protected function __init__() { }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}...
[ "0.60854626", "0.601819", "0.5985376", "0.5985376", "0.5985376", "0.5985376", "0.5985182", "0.5985182", "0.5985182", "0.5985182", "0.5985182", "0.5985182", "0.59845227", "0.59845227", "0.5890195", "0.5890195", "0.5890195", "0.5890195", "0.58668905", "0.5862108", "0.58431154",...
0.0
-1
Builds a unique userId that can be used to identify users for security tracking.
public function id(\Psr\Http\Message\ServerRequestInterface $request): string { $headersToHash = [ 'accept' => '', 'accept-encoding' => '', 'accept-language' => '', 'user-agent' => '', 'x-forwarded-for' => '' ]; // pull each header value out (if it exists) foreach ($headersToHash as $header => $value) { $headersToHash[$header] = $request->hasHeader($header) ? $request->getHeader($header)[0] : $header; } $this->logger->debug( 'Identity of incoming request built', ['prehash_id' => implode('', $headersToHash)] ); return hash('sha256', implode('', $headersToHash)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function UserID()\n\t\t{\n\t\treturn sprintf\n\t\t\t(\n\t\t\t'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\t\t\tmt_rand(0, 0xffff),\n\t\t\tmt_rand(0, 0xffff),\n\t\t\tmt_rand(0, 0xffff),\n\t\t\tmt_rand(0, 0x0fff) | 0x4000,\n\t\t\tmt_rand(0, 0x3fff) | 0x8000,\n\t\t\tmt_rand(0, 0xffff),\n\t\t\tmt_rand(0, 0x...
[ "0.74894655", "0.7283555", "0.7030845", "0.6988689", "0.6946525", "0.69347286", "0.6848702", "0.6822486", "0.6822164", "0.6767921", "0.6670018", "0.66589653", "0.66290283", "0.6593945", "0.65781456", "0.65668744", "0.65627027", "0.6561592", "0.6561026", "0.6561026", "0.656102...
0.0
-1
Specify Model class name
public function model() { return 'App\Models\ChartKeywords'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getModelName()\n {\n if (isset($this->options[\"type\"])) {\n $type = ucfirst($this->options[\"type\"]);\n $class = \"\\\\app\\\\models\\\\feeds\\\\\" . $type;\n if (class_exists($class)) {\n return $class;\n }\n }\n ...
[ "0.768929", "0.76618075", "0.7585344", "0.7583571", "0.7583571", "0.7542252", "0.75075734", "0.74778146", "0.74702877", "0.74578375", "0.74578375", "0.7453601", "0.7453601", "0.7447208", "0.7444998", "0.7435527", "0.74304074", "0.7416409", "0.74128395", "0.74125767", "0.74125...
0.0
-1
Show the form for creating a new resource.
public function create(Request $request) { }
{ "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.75936973", "0.75936973", "0.7585464", "0.7576766", "0.7571166", "0.7498768", "0.7434969", "0.7432511", "0.7387868", "0.7351811", "0.7336364", "0.73113805", "0.7293885", "0.72812635", "0.7273037", "0.72410345", "0.7228987", "0.7225174", "0.718589", "0.71786976", "0.7172516"...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $management = management::find($id); return response()->json($management); }
{ "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.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", ...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $mem_id) { // }
{ "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