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
Display the specified resource.
public function show($id) { $locations_data = []; $event = Event::where('id', $id)->with('eventLocations')->first(); $event->event_date = Carbon::parse($event->datetime)->format('d/M/Y'); $event->event_hour = Carbon::parse($event->datetime)->format('h:i a'); foreach ($event...
{ "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) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $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
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Return a value for the field.
public function resolve($rootValue, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) { $batch_id = $args['batch_id']; $mentor_ids = $args['mentor_ids']; $batch = new BatchController; $request_dummy = new Request; $response = $batch->assignMentors($request_dummy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFieldValue()\n {\n return $this->value;\n }", "public function getValue(): mixed\n {\n return $this->field?->getValue();\n }", "function getFieldValue($field);", "public function getValue()\n {\n return $this->_fields['Value']['FieldValue'];\n }", "...
[ "0.8479756", "0.8379301", "0.8064348", "0.79448414", "0.77689815", "0.77620524", "0.7700596", "0.7662676", "0.7641532", "0.76380265", "0.76324326", "0.7620745", "0.7607805", "0.7595676", "0.7595676", "0.7595676", "0.7579862", "0.7579862", "0.75784016", "0.75784016", "0.757497...
0.0
-1
Form validation handler for mongo_node_type_create_form().
function mongo_node_type_create_form_validate($form, $form_state) { $set = mongo_node_settings(); $machine_name = $form_state['values']['name']; if (isset($set[$machine_name])) { form_set_error('name', t('Machine name @machine_name already exists', array('@machine_name' => $machine_name))); return FALSE;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_form_validate(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = $form_state[$entity_type];\n field_attach_form_validate($entity_type, $entity, $form, $form_state);\n}", "function mongo_node_form($form, &$form_state, $entity, $entity_type) {\n $form = array()...
[ "0.77895594", "0.678418", "0.66281605", "0.6349097", "0.6168554", "0.610568", "0.60453206", "0.60402095", "0.6012209", "0.59940475", "0.5758476", "0.57140166", "0.56463796", "0.5642471", "0.5613593", "0.5533103", "0.54347605", "0.5433027", "0.5426902", "0.5426902", "0.5405251...
0.6903851
1
Form submission handler for mongo_node_type_create_form().
function mongo_node_type_create_form_submit($form, $form_state) { $label = $form_state['values']['label']; $machine_name = $form_state['values']['name']; $set = mongo_node_settings(); $set += mongo_node_type_default_settings($label, $machine_name); // @todo - redirect to entity type page mongo_node_settin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_form($form, &$form_state, $entity, $entity_type) {\n $form = array();\n\n $form_state['entity_type'] = $entity_type;\n if (!isset($form_state[$entity_type])) {\n $form_state[$entity_type] = $entity;\n }\n else {\n $entity = $form_state[$entity_type];\n }\n\n // Get title label name...
[ "0.75537634", "0.7259901", "0.681234", "0.6734988", "0.66604066", "0.66321564", "0.66177344", "0.65728587", "0.64692134", "0.64574426", "0.6294301", "0.62569225", "0.61547625", "0.6117619", "0.6045405", "0.60168475", "0.6002687", "0.5941034", "0.59276116", "0.5846542", "0.582...
0.75139195
1
Form constructor for editing entity types.
function mongo_node_type_edit_form($form, $form_state, $entity_type) { $set = mongo_node_settings(); $form = array(); $form['label'] = array( '#type' => 'textfield', '#title' => t('Entity type'), '#default_value' => $set[$entity_type]['label'], '#description' => t('The human readable name of the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function travel_type_form($form, &$form_state, $entity_type, $op = 'edit') {\n // Handle the case when cloning is performed.\n if ($op == 'clone') {\n $entity_type->label .= ' (cloned)';\n $entity_type->type = '';\n }\n\n // Describe all properties of the entity which shall be shown on the form.\n $form...
[ "0.687346", "0.6510986", "0.6469823", "0.6450052", "0.63589495", "0.6339538", "0.6334518", "0.63295275", "0.62948775", "0.6289656", "0.6288563", "0.62831736", "0.62712705", "0.62712705", "0.62712705", "0.6207555", "0.620274", "0.61831987", "0.61577857", "0.6130354", "0.612325...
0.6971317
0
Form submission handler for mongo_node_type_edit_form().
function mongo_node_type_edit_form_submit($form, $form_state) { $label = $form_state['values']['label']; $machine_name = $form_state['values']['name']; $old_entity_type = $form_state['values']['entity_type']; $set = mongo_node_settings(); if ($machine_name != $old_entity_type) { $set += mongo_node_type_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_type_edit_form($form, $form_state, $entity_type) {\n $set = mongo_node_settings();\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['label'],\n '#description' => t('The human readable...
[ "0.75606555", "0.72743845", "0.71291107", "0.6928399", "0.68131834", "0.668602", "0.662143", "0.65089715", "0.6425825", "0.6371721", "0.63688594", "0.6361926", "0.6356016", "0.62655133", "0.6153967", "0.6112404", "0.5997931", "0.59577876", "0.5949831", "0.59267294", "0.589600...
0.72839963
1
Form constructor for deleting entity types.
function mongo_node_type_delete_form($form, $form_state, $entity_type) { $form = array(); // Send entity type. $form['entity_type'] = array( '#type' => 'value', '#value' => $entity_type, ); $path = '/admin/structure/mongo-node'; $extist_entity_content = ''; $collection = mongodb_collection('field...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_type_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n // Remove entity type.\n $entity_type = $form_state['values']['entity_type'];\n unset($set[$entity_type]);\n\n // Drop collection that stores entities for entity type.\n $collection = mongodb_collection('fie...
[ "0.6472056", "0.6468265", "0.6308098", "0.6305742", "0.6122077", "0.60757643", "0.5991428", "0.58580947", "0.58278126", "0.582059", "0.5791579", "0.57691324", "0.57279426", "0.57035005", "0.5696368", "0.5626221", "0.56165195", "0.561625", "0.5605363", "0.5584769", "0.5582737"...
0.66571033
0
Form submission handler for mongo_node_type_delete_form().
function mongo_node_type_delete_form_submit($form, $form_state) { $set = mongo_node_settings(); // Remove entity type. $entity_type = $form_state['values']['entity_type']; unset($set[$entity_type]); // Drop collection that stores entities for entity type. $collection = mongodb_collection('fields_current',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_type_delete_form($form, $form_state, $entity_type) {\n $form = array();\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $path = '/admin/structure/mongo-node';\n\n $extist_entity_content = '';\n $collection = mongodb_co...
[ "0.78526545", "0.7351332", "0.7347114", "0.7220521", "0.71068573", "0.7055229", "0.6662198", "0.6615363", "0.657397", "0.6415916", "0.63025516", "0.6188454", "0.6143792", "0.6140851", "0.6084777", "0.6066255", "0.6050293", "0.6005385", "0.59997916", "0.5976242", "0.59560156",...
0.78017473
1
Entity type existance check Helper function.
function _mongo_node_type_exists($entity_type) { $set = mongo_node_settings(); if (isset($set[$entity_type])) { return TRUE; } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasEntityType() {\n return $this->_has(6);\n }", "public function hasEntityType() {\n return $this->_has(5);\n }", "public function getEntityTypeId(){\n $entityType = Mage::getModel('eav/entity_type')->loadByCode($this->_entityType);\n if (!$entityType->getId()){\n...
[ "0.68108726", "0.6652305", "0.65877634", "0.65792507", "0.6565098", "0.65342337", "0.6360991", "0.6326077", "0.6321625", "0.6262326", "0.61903954", "0.6188985", "0.6178305", "0.6155019", "0.6114054", "0.6097126", "0.6044834", "0.60335714", "0.60335714", "0.60335714", "0.60320...
0.69549507
0
Form constructor for the entity bundle creation.
function mongo_node_bundle_create_form($form, $form_state, $entity_type) { $form = array(); $form['label'] = array( '#type' => 'textfield', '#title' => t('Entity type'), '#description' => t('The human readable name of the entity.'), ); $form['name'] = array( '#type' => 'machine_name', '#re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(\\Library\\Entity $entity){\n\t\t$this->setForm(new Form\\Form($entity));\n\t}", "public function __construct($form)\n\t{\n\t\t$formPackage = $form->getMergePackage();\n\t\t$this->name = $form->getName();\n\t\t$this->form = $form;\n\t\t$this->inputs = $formPackage['inputs'];\n\t\t$thi...
[ "0.7282269", "0.6783061", "0.6717208", "0.66257316", "0.65306914", "0.6512528", "0.6465536", "0.64655024", "0.64308816", "0.6401182", "0.63922143", "0.63817096", "0.63817096", "0.63507676", "0.6347384", "0.6347384", "0.6320024", "0.6294007", "0.6288342", "0.6288342", "0.62788...
0.71189916
1
Form validation handler for mongo_node_bundle_create_form().
function mongo_node_bundle_create_form_validate($form, $form_state) { if (empty($form_state['values']['name'])) { form_set_error('name', t('Machine name @machine_name already exists', array('@machine_name' => $machine_name))); return FALSE; } $machine_name = $form_state['values']['name']; $entity_type ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_form_validate(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = $form_state[$entity_type];\n field_attach_form_validate($entity_type, $entity, $form, $form_state);\n}", "function mongo_node_type_create_form_validate($form, $form_state) {\n $set = mongo_node_...
[ "0.74918324", "0.67976105", "0.6633064", "0.6482915", "0.6348119", "0.6339121", "0.6242151", "0.60979575", "0.5983234", "0.5968238", "0.5949089", "0.594119", "0.58625954", "0.5776641", "0.5776641", "0.5740215", "0.572987", "0.57215273", "0.56918436", "0.56918436", "0.5639497"...
0.73487484
1
Form submission handler for mongo_node_bundle_create_form().
function mongo_node_bundle_create_form_submit($form, $form_state) { $entity_type = $form_state['values']['entity_type']; $label = $form_state['values']['label']; $machine_name = $form_state['values']['name']; $description = $form_state['values']['description']; $set = mongo_node_settings(); $set[$entity_t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_form_submit(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state);\n $insert = empty($entity->mid);\n entity_save($entity_type, $entity);\n\n $info = entity_get_info($entity_type)...
[ "0.77444345", "0.7322824", "0.7106233", "0.7082012", "0.6999719", "0.6659567", "0.6641731", "0.6170207", "0.61485773", "0.61443996", "0.61306095", "0.6128872", "0.612424", "0.6100041", "0.60700536", "0.60196453", "0.59921896", "0.5978814", "0.5967667", "0.5955421", "0.5953872...
0.7590311
1
Form constructor for entity bundle editing.
function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) { $set = mongo_node_settings(); $form = array(); $form['label'] = array( '#type' => 'textfield', '#title' => t('Entity type'), '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'], '#description' => t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(\\Library\\Entity $entity){\n\t\t$this->setForm(new Form\\Form($entity));\n\t}", "public function initialize($entity = null, $options = null)\n {\n if (isset($options['edit']) && $options['edit']) {\n $id = new Hidden('id');\n } else {\n $id = ne...
[ "0.70325786", "0.66830426", "0.6604624", "0.66041875", "0.64861786", "0.6474166", "0.64365596", "0.6365781", "0.6349567", "0.63389164", "0.630213", "0.62161237", "0.6187194", "0.617044", "0.6165809", "0.6147192", "0.6099529", "0.6069998", "0.604738", "0.60436785", "0.60327756...
0.6571871
4
Form submission handler for mongo_node_bundle_edit_form().
function mongo_node_bundle_edit_form_submit($form, $form_state) { $label = $form_state['values']['label']; $machine_name = $form_state['values']['name']; $entity_type = $form_state['values']['bundle_type']['entity_type']; $old_bundle_type = $form_state['values']['bundle_type']['bundle']; $description = $form...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) {\n\n $set = mongo_node_settings();\n\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'],\n '#de...
[ "0.7503424", "0.72289693", "0.66206306", "0.65316916", "0.6489455", "0.64525265", "0.64298", "0.63958144", "0.6388495", "0.6169524", "0.6124327", "0.61211413", "0.60745347", "0.6058325", "0.5982858", "0.5959377", "0.5955767", "0.5938314", "0.59210277", "0.5911633", "0.5896756...
0.75950235
0
Helper function Rename a mongo collection.
function _mongo_node_rename_collection($old_entity_type, $new_entity_type) { $mongodb = mongodb(); // Get connection and database name by forcing call to __toString(). $m = $mongodb->connection; $database = sprintf('%s', $mongodb); $admin_db = $m->admin; $res = $admin_db->command(array( "renameCollec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCollectionName($name);", "protected function dropCollection($name)\n {\n if ($this->mongodb) {\n try {\n $this->mongodb->createCommand()->dropCollection($name);\n } catch (Exception $e) {\n // shut down exception\n }\n ...
[ "0.6554234", "0.5911178", "0.5841201", "0.5796181", "0.57822454", "0.57485217", "0.57028073", "0.5685802", "0.5666897", "0.5641118", "0.5636572", "0.55369127", "0.55330616", "0.5511881", "0.54671305", "0.54500496", "0.5412006", "0.53969", "0.536967", "0.53045493", "0.5280285"...
0.7404457
0
Helper function update entities type.
function _mongo_node_update_type($old_entity_type, $entity_type) { // Update collection names. _mongo_node_rename_collection($old_entity_type, $entity_type); // Update bundle name in mongo entities. $collection = mongodb_collection('fields_current', $entity_type); $result = $collection->update( array('_t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function update_type($new_type) { \n\n\t\tif ($this->_update_item('type',$new_type,'50')) { \n\t\t\t$this->type = $new_type;\n\t\t}\n\n\t}", "function entity_info_alter_build(&$entity_info, $entity_type) {\n}", "public function getType(): EntityType;", "public function setType(EntityType $type);", ...
[ "0.6912789", "0.65836614", "0.6572131", "0.6534108", "0.648626", "0.6399886", "0.6325793", "0.63029975", "0.6285561", "0.62635577", "0.6200354", "0.6191755", "0.6148646", "0.6144508", "0.60502535", "0.6000529", "0.5997764", "0.597976", "0.59766966", "0.59686095", "0.5955569",...
0.77196634
0
Helper function update entities bundle.
function _mongo_node_update_bundle($entity_type, $old_bundle, $bundle) { // Update bundle name in ids collection. $collection = mongodb_collection($entity_type . '_ids'); $result = $collection->update( array('bundle' => $old_bundle), array('$set' => array('bundle' => $bundle)) ); // Update bundle n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function apachesolr_index_set_bundles($env_id, $entity_type, array $bundles) {\n $transaction = db_transaction();\n try {\n db_delete('apachesolr_index_bundles')\n ->condition('env_id', $env_id)\n ->condition('entity_type', $entity_type)\n ->execute();\n\n if ($bundles) {\n $insert = db...
[ "0.623332", "0.6216402", "0.62133163", "0.6124402", "0.6114456", "0.6112794", "0.6112794", "0.60829264", "0.6059587", "0.598349", "0.5919275", "0.5845906", "0.58347076", "0.5807777", "0.57997024", "0.57898045", "0.5758896", "0.57507616", "0.574629", "0.57397", "0.57026", "0...
0.6639322
0
Helper function if machine name exists.
function _mongo_node_bundle_exists($bundle) { $entity_type = arg(3); $set = mongo_node_settings(); if (isset($set[$entity_type]['bundles'][$bundle])) { return TRUE; } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isMachine($name);", "protected function validateMachineName($value) {\n if (preg_match(\"/^[a-z0-9\\_]+$/\", $value))\n return true;\n $this->setError(t(\"Invalid machine name (only a-z, 0-9, and _)\"));\n return false;\n }", "protected function generateMachineName() {\n retur...
[ "0.7412608", "0.64426965", "0.606492", "0.6062058", "0.6057177", "0.5988294", "0.5776909", "0.5712959", "0.56961334", "0.56575686", "0.56463534", "0.5601881", "0.55832756", "0.5484777", "0.54744977", "0.5446809", "0.543575", "0.54186755", "0.53737575", "0.5371278", "0.5345347...
0.0
-1
Form constructor for entity bundle delete.
function mongo_node_bundle_delete_form($form, $form_state, $entity_type, $bundle) { $form = array(); $form['entity_type'] = array( '#type' => 'value', '#value' => $entity_type, ); $form['bundle'] = array( '#type' => 'value', '#value' => $bundle, ); $path = '/admin/structure/mongo-node/' . ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}", "protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAt...
[ "0.65059566", "0.65002024", "0.64804673", "0.6416298", "0.64131904", "0.6307785", "0.62689507", "0.62194777", "0.6204152", "0.61482984", "0.6147878", "0.6127656", "0.6116169", "0.6108576", "0.6107843", "0.60805726", "0.60765046", "0.60756636", "0.60694903", "0.6067795", "0.60...
0.6678628
0
Form submission handler for mongo_node_bundle_delete_form().
function mongo_node_bundle_delete_form_submit($form, $form_state) { $set = mongo_node_settings(); $entity_type = $form_state['values']['entity_type']; $bundle = $form_state['values']['bundle']; // Remove entity type. unset($set[$entity_type]['bundles'][$bundle]); mongo_node_settings_save($set); // Red...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_page_delete_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n $entity = $form['#entity'];\n $entity->delete();\n\n $entity_type = $entity->entityType();\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_...
[ "0.80393004", "0.7939578", "0.73766434", "0.71545696", "0.7057786", "0.69853455", "0.6817365", "0.66699225", "0.66454107", "0.66023004", "0.64903253", "0.64874077", "0.6448774", "0.644205", "0.6392401", "0.63327026", "0.63049406", "0.6286109", "0.6284347", "0.62316376", "0.62...
0.7860396
2
Show all defined mongo entities to administer.
function mongo_node_entities() { $set = mongo_node_settings(); $base_path = 'admin/structure/mongo-node'; $header = array(t('Name'), array( 'data' => t('Operations'), 'colspan' => 3, ), ); foreach ($set as $entity_type => $settings) { $rows[] = array( array('data' => l($settings['label...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showAll()\n {\n $objects = $this->repo->showAll();\n return view('admin.showAll', compact('objects') );\n }", "public function findAllAdmin() {\n\t\t\t$result = $this->createQuery()->execute();\n\t\t\treturn $result;\n\t\t}", "function findAllAdministrators() {\r\n\r\n\t\tre...
[ "0.67338544", "0.66438824", "0.6639408", "0.65726495", "0.6551215", "0.64955777", "0.6485584", "0.6479486", "0.64198875", "0.6326081", "0.6307325", "0.6274499", "0.6237284", "0.61738837", "0.61732745", "0.6170904", "0.61017853", "0.6087415", "0.60782176", "0.60630286", "0.602...
0.6673599
1
Show for a certain entity type all its bundles.
function mongo_node_bundles($entity_type) { $set = mongo_node_settings(); $base_path = 'admin/structure/mongo-node/' . $entity_type . '/manage'; $header = array(t('Name'), array( 'data' => t('Operations'), 'colspan' => 4, ), ); $rows = array(); foreach ($set[$entity_type]['bundles'] as $bundl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bundles() {\n $bundles = $this->user->find(Auth::user()->id)->bundles()->get();\n return view('frontend.bundle.list_bundle', compact('bundles'));\n }", "public function bundleTags($entity_type_id, $bundle) {\n $storage = \\Drupal::entityTypeManager()->getStorage($entity_type_i...
[ "0.70876724", "0.6725116", "0.63923025", "0.6293192", "0.61694837", "0.612593", "0.6121211", "0.6014721", "0.5982945", "0.5967028", "0.5932462", "0.5929955", "0.5836877", "0.5831712", "0.58022636", "0.5786125", "0.5760216", "0.5755756", "0.5738403", "0.5737353", "0.57142586",...
0.6656393
2
Menu callback: content administration.
function mongo_node_admin_content($form, $form_state, $entity_type) { $settings = mongo_node_settings(); // Send entity type. $form['entity_type'] = array( '#type' => 'value', '#value' => $entity_type, ); $form['filters'] = array( '#type' => 'fieldset', '#title' => t('Show only items where')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function spreadshop_admin_menu_entry($content) \n\t{\n add_menu_page(\"Spreadshop Admin\", \"Spreadshop\", 1, \"Spreadshop_Admin\", \"spreadshop_admin\"); \n\t}", "public function menu()\n\t{\n\t\t$partial = new Inoves_Partial('Content/view/menu/contentMain.phtml');\n\n\t\t$partial->slug = Inoves_URS::$param...
[ "0.75816447", "0.751679", "0.7451049", "0.7451049", "0.7451049", "0.7363373", "0.7205725", "0.71880084", "0.71625173", "0.71401995", "0.71400595", "0.7139254", "0.7130263", "0.70999354", "0.7099162", "0.70788985", "0.70547605", "0.70543283", "0.702008", "0.69823855", "0.69700...
0.0
-1
Content administration page operations validate function.
function mongo_node_operation_validate($form, &$form_state) { if (!is_array($form_state['values']['entities']) || !count(array_filter($form_state['values']['entities']))) { form_set_error('', t('No items selected.')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate_page()\n {\n }", "function validate_page()\n {\n }", "function admin_validate_edit_cms_ajax(){\r\r\n\t\t\r\r\n\t\t$this->layout = \"\";\r\r\n\t\t$this->autoRender = false;\r\r\n\t\tif($this->RequestHandler->isAjax()){\r\r\n\t\t\t$errors_msg = null;\r\r\n\t\t\tApp::import('Model','...
[ "0.73652107", "0.73652107", "0.67072755", "0.66907024", "0.6670536", "0.66690695", "0.6592889", "0.65618914", "0.65471035", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.649211...
0.0
-1
Content administration page operations submit function.
function mongo_node_operation_submit($form, &$form_state) { $operations = mongo_node_operations(); $operation = $operations[$form_state['values']['operation']]; $entities = array_filter($form_state['values']['entities']); $entity_type = $form_state['values']['entity_type']; if ($function = $operation['callba...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function submitPage() {}", "function index_action()\n {\n $this->object->enqueue_backend_resources();\n if ($token = $this->object->is_authorized_request()) {\n // Get each form. Validate it and save any changes if this is a post\n // request\n $tabs = arr...
[ "0.7391098", "0.6994369", "0.68740684", "0.6791515", "0.67127603", "0.6692319", "0.6666784", "0.6592971", "0.65409666", "0.65100205", "0.64858127", "0.64802134", "0.6475867", "0.64414793", "0.6438079", "0.641483", "0.63807654", "0.6366037", "0.6364764", "0.63596547", "0.63545...
0.0
-1
Operations for content administration page.
function mongo_node_operations() { $operations = array( 'publish' => array( 'label' => t('Publish selected content'), 'callback' => 'mongo_node_mass_update', 'callback arguments' => array('updates' => array('status' => 1)), ), 'unpublish' => array( 'label' => t('Unpublish selected ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function adminContentArea(): void {\n global $security;\n global $media_admin;\n global $media_manager;\n\n // Prepare Query\n if(($absolute = MediaManager::absolute($_GET[\"path\"] ?? DS)) === null) {\n $absolute = PATH_UPLOADS_PAGES;\n...
[ "0.741837", "0.74097395", "0.7119664", "0.7119664", "0.70954823", "0.69737273", "0.6914717", "0.68635476", "0.6860336", "0.68533176", "0.6827469", "0.6825064", "0.6816729", "0.6810954", "0.6801038", "0.6777734", "0.6772251", "0.67599267", "0.6692817", "0.66927224", "0.6686614...
0.0
-1
Callbacks for operation select.
function mongo_node_mass_update($entity_type, $entities, $args) { foreach ($entities as $entity_id) { $entity = entity_get_controller($entity_type)->load(array($entity_id)); $entity = reset($entity); // Skip if not updates. if (!isset($args['updates'])) { continue; } foreach ($args['upda...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function select(callable $callback);", "function callback_select(array $args)\n {\n }", "abstract function selectHook();", "public function select();", "public function select();", "public function select();", "protected static function select()\n {\n }", "public function D...
[ "0.721117", "0.71609926", "0.6908219", "0.6744716", "0.6744716", "0.6744716", "0.6429232", "0.63148093", "0.62806994", "0.6259463", "0.6248305", "0.6094883", "0.60862833", "0.59205896", "0.5835924", "0.5811498", "0.5771971", "0.5693358", "0.55812496", "0.5570643", "0.5499443"...
0.0
-1
Callbacks for operation select.
function mongo_node_mass_delete($entity_type, $entities) { entity_delete_multiple($entity_type, $entities); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function select(callable $callback);", "function callback_select(array $args)\n {\n }", "abstract function selectHook();", "public function select();", "public function select();", "public function select();", "protected static function select()\n {\n }", "public function D...
[ "0.721117", "0.71609926", "0.6908219", "0.6744716", "0.6744716", "0.6744716", "0.6429232", "0.63148093", "0.62806994", "0.6259463", "0.6248305", "0.6094883", "0.60862833", "0.59205896", "0.5835924", "0.5811498", "0.5771971", "0.5693358", "0.55812496", "0.5570643", "0.5499443"...
0.0
-1
List mongo entity administration filters that can be applied.
function mongo_node_filters($entity_type) { $filters = array( 'status' => array( 'any' => array( 'label' => 'Any', ), 'published' => array( 'label' => 'Published', 'filters' => array( array( '#type' => 'status', '#value' => 1, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'rights', // perform access control for CRUD operations\n\t\t);\n\t}", "public function filters()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'rights', // perform access control for CRUD operations\r\n\t\t);\r\n\t}", "public function getAllFilters();", "publi...
[ "0.72582465", "0.7228641", "0.6834802", "0.6754441", "0.6688583", "0.6633112", "0.66118705", "0.65971446", "0.65966713", "0.65680695", "0.65680695", "0.6555706", "0.65507996", "0.6544781", "0.6539271", "0.6518539", "0.6518539", "0.6518094", "0.64543015", "0.64362013", "0.6421...
0.0
-1
Mongo entity filter submit handler. It is used by the filter buttons in mongo_node_admin_content().
function mongo_node_filters_submit($form, &$form_state) { $entity_type = $form_state['values']['entity_type']; $filters = mongo_node_filters($entity_type); $op = strtolower($form_state['input']['op']); if ($op == 'reset') { // Remove all filters. unset($_SESSION[$entity_type . '_filters']); } else...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_admin_content($form, $form_state, $entity_type) {\n $settings = mongo_node_settings();\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show on...
[ "0.6391795", "0.63402665", "0.60834455", "0.5925225", "0.58937114", "0.5856125", "0.5801112", "0.5790417", "0.5740966", "0.5717158", "0.56784385", "0.56057435", "0.5585326", "0.5578976", "0.5576083", "0.5572961", "0.55641407", "0.55086225", "0.5496539", "0.548823", "0.5483889...
0.72924733
0
Page callback: Displays all entity bundle add links. Redirects if only one bundle found
function mongo_node_add_page() { $item = menu_get_item(); $content = system_admin_menu_block($item); if (count($content) == 1) { $item = array_shift($content); drupal_goto($item['href']); } return theme('admin_block_content', array('content' => $content)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_add()\n { \n // Render the page\n View::make($this->bundle . '::product.add')->render();\n }", "public function new_bundle() {\n \treturn view('frontend.bundle.new_bundle');\n }", "public function addPage() {\n $item = menu_get_item();\n $content = sys...
[ "0.606799", "0.6036074", "0.57965624", "0.57860816", "0.5754964", "0.5749019", "0.5675564", "0.5625833", "0.56165206", "0.5454767", "0.54438275", "0.54224145", "0.5415871", "0.5387076", "0.53594583", "0.5355363", "0.5319278", "0.5308089", "0.5283216", "0.526992", "0.5237428",...
0.5485806
9
Returns a mongo entity submission form.
function mongo_node_add($entity_type, $bundle) { global $user; $set = mongo_node_settings(); $entity = entity_create($entity_type, array( 'uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => $bundle, 'language' => LANGUAGE_NONE, ) ); $form_id = $entity...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormInObject()\n {\n $sExKey = null;\n\n if ($this->_iIdEntity > 0 && $this->_sSynchronizeEntity !== null && count($_POST) < 1) {\n\n $sModelName = str_replace('Entity', 'Model', $this->_sSynchronizeEntity);\n $oModel = new $sModelName;\n\n $oEnt...
[ "0.68841326", "0.6682035", "0.66420656", "0.6575569", "0.657286", "0.6540874", "0.64872676", "0.6481667", "0.6481667", "0.6451737", "0.63655335", "0.6349057", "0.63418573", "0.63264304", "0.6258806", "0.62565213", "0.61998427", "0.61737174", "0.61565804", "0.61414826", "0.609...
0.0
-1
Generate the mongo entity add/edit form array.
function mongo_node_form($form, &$form_state, $entity, $entity_type) { $form = array(); $form_state['entity_type'] = $entity_type; if (!isset($form_state[$entity_type])) { $form_state[$entity_type] = $entity; } else { $entity = $form_state[$entity_type]; } // Get title label name from properties...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddForm();", "public function add_edit_form(){\n\n $_id = $_GET['id']; \n $tblName = $this->get_tbl_name();\n\n $source = DB::table($tblName)->where('id',$_id)->get();\n\n $source_first = $source[0];\n\n // mhtml::dump($source_first);\n\n\n $struct = $...
[ "0.59969765", "0.59668356", "0.59434354", "0.5909509", "0.5900607", "0.5805662", "0.57287455", "0.57250273", "0.5683926", "0.56693876", "0.5658327", "0.56146044", "0.56030506", "0.5601319", "0.5598297", "0.55948204", "0.5556551", "0.5552996", "0.55227846", "0.5518935", "0.551...
0.5554197
17
Mongo entity add/edit validate function.
function mongo_node_form_validate(&$form, &$form_state) { $entity_type = $form_state['entity_type']; $entity = $form_state[$entity_type]; field_attach_form_validate($entity_type, $entity, $form, $form_state); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateOnAdd( $entity ){\t\t\t\n\t\t//TODO unicidad (cliente )\n\t\t\n\t}", "abstract public function validate($entity);", "public function validate($entity)\n {\n }", "function validate_on_create() {}", "public function validate() \n\t{\t\t\n\t\tif(!$this->entity) \n\t\t{\n\t\t\t$method = ...
[ "0.6894728", "0.6702714", "0.667578", "0.6397669", "0.6164084", "0.6154304", "0.6153707", "0.61482984", "0.6070457", "0.5998407", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "...
0.5836037
27
Form submit handler for mongo_node_form().
function mongo_node_form_submit(&$form, &$form_state) { $entity_type = $form_state['entity_type']; $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state); $insert = empty($entity->mid); entity_save($entity_type, $entity); $info = entity_get_info($entity_type); $bundle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_operation_submit($form, &$form_state) {\n $operations = mongo_node_operations();\n $operation = $operations[$form_state['values']['operation']];\n\n $entities = array_filter($form_state['values']['entities']);\n $entity_type = $form_state['values']['entity_type'];\n if ($function = $operat...
[ "0.7229615", "0.67927057", "0.6580903", "0.6456499", "0.6303718", "0.624416", "0.6215408", "0.6187164", "0.61237925", "0.60917765", "0.6072781", "0.6052198", "0.6030238", "0.60244405", "0.5989919", "0.5971032", "0.5894369", "0.5832111", "0.58249694", "0.57996845", "0.57809097...
0.781233
0
Menu callback; Generate an array for rendering the given entity.
function mongo_node_page_view($entity_type, $entity, $langcode = NULL) { if (!isset($langcode)) { $langcode = $GLOBALS['language_content']->language; } $controller = entity_get_controller($entity_type); $title = $entity->title; drupal_set_title($title); // Allow modules to change the view mode. $vi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function buildMenuArray() {}", "private function getMenuArrayRender()\n {\n $this->load->model('Menu_Model', \"menuModel\");\n $this->menuModel->setControllerName($this->_controllerName);\n return $this->menuModel->getMenuArray();\n }", "protected function generateMenu() {}...
[ "0.68613905", "0.67297935", "0.6662822", "0.6662822", "0.6662822", "0.6662822", "0.6662822", "0.6662822", "0.66595215", "0.6258645", "0.60994905", "0.6066189", "0.59590465", "0.59067225", "0.5855896", "0.57561463", "0.5738372", "0.5705399", "0.5699163", "0.5697926", "0.569594...
0.0
-1
Menu callback; presents the mongo entity editing form.
function mongo_node_page_edit($entity_type, $entity) { $title = $entity->title; drupal_set_title($title); $content = array(); $content = drupal_get_form('mongo_node_form', $entity, $entity_type); return $content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function _EDIT(){\n\t\tglobal $id;\n\n\t\tif(!$id){\n\t\t\t$cid = josGetArrayInts('cid');\n\t\t\t$id = $cid[0];\n\t\t}\n\t\t$menutype = strval(mosGetParam($_REQUEST, 'menutype', 'mainmenu'));\n\n\t\tLibMenuBar::startTable();\n\t\tif(!$id){\n\t\t\t$link = 'index2.php?option=com_menus&menutype=' . $men...
[ "0.67873544", "0.6768123", "0.67381614", "0.668048", "0.6650032", "0.6611225", "0.65789515", "0.65725017", "0.65610623", "0.6559797", "0.6544932", "0.6535698", "0.6525163", "0.6471587", "0.6461748", "0.645963", "0.6453348", "0.6453348", "0.6447904", "0.6439489", "0.6430223", ...
0.6296313
53
Menu callback ask for confirmation of mongo entity deletion.
function mongo_node_page_delete($form, $form_state, $entity_type, $entity) { $form['#entity'] = $entity; $uri = entity_uri($entity_type, $entity); return confirm_form($form, t('Are you sure you want to delete %title', array('%title' => $entity->title)), $uri['path'], t('This action cannot be undone')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_page_delete_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n $entity = $form['#entity'];\n $entity->delete();\n\n $entity_type = $entity->entityType();\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_...
[ "0.7021321", "0.68786114", "0.6858826", "0.6818826", "0.6798554", "0.6672725", "0.66523004", "0.66453815", "0.65345025", "0.6451527", "0.6426621", "0.6326857", "0.6311236", "0.6309773", "0.6291765", "0.62407255", "0.62407255", "0.6235067", "0.6228635", "0.62215805", "0.622029...
0.6905984
1
Mongo entity delete submit handler for mongo_node_page_delete().
function mongo_node_page_delete_submit($form, &$form_state) { if ($form_state['values']['confirm']) { $entity = $form['#entity']; $entity->delete(); $entity_type = $entity->entityType(); $info = entity_get_info($entity_type); $bundle_key = $info['bundle keys']['bundle']; $bundle_label = $info...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_page_delete($form, $form_state, $entity_type, $entity) {\n $form['#entity'] = $entity;\n $uri = entity_uri($entity_type, $entity);\n\n return confirm_form($form,\n t('Are you sure you want to delete %title', array('%title' => $entity->title)),\n $uri['path'],\n t('This action cannot...
[ "0.71317905", "0.7057607", "0.7055268", "0.68226093", "0.67156976", "0.6710894", "0.67040217", "0.66735077", "0.642241", "0.6374308", "0.6361223", "0.63513196", "0.6340487", "0.6323407", "0.63184184", "0.6316687", "0.62518245", "0.62388307", "0.6222638", "0.6219751", "0.61835...
0.71954656
0
Provide only the necessary paramertes for a POSTable type request.
public function validParameters(array $overrides = []): array { return array_merge([ 'line1' => $this->faker->streetAddress(), 'city' => $this->faker->city(), 'state' => $this->faker->state(), 'postal_code' => $this->faker->postcode(), 'country' =>...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setPostParameters(): void\n {\n $params = filter_input_array(INPUT_POST);\n\n if (!isset($params)) {\n $this->body = (object)array();\n return;\n }\n\n $this->body = $params;\n }", "abstract protected function getRequiredRequestParameters()...
[ "0.65967983", "0.65819126", "0.6569871", "0.65487933", "0.65364546", "0.64292634", "0.636753", "0.6360307", "0.6359314", "0.6341095", "0.63166517", "0.6240009", "0.6088325", "0.6077701", "0.60482645", "0.603084", "0.6018115", "0.6006058", "0.59902585", "0.5968261", "0.5953073...
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('admin'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.687...
0.0
-1
Display a listing of the resource.
public function index() { $properties = Property::where('id', '!=', 0)->get(); if (count($properties) > 0) { foreach ($properties as $property) { if ($property->boss_id > 0) { $property['boss'] = User::wher...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { $users = User::where([ 'isAdmin' => null, 'isEmployee' => null, 'isBoss' => 1, 'boss_id' => null ])->get(); return view('property.create')->with('users', $users); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store() { $rules = array( 'name' => 'required', 'street' => 'required', 'city' => 'required' ); $validator = Validator::make(Input::all(), $rules); if ($validator->fails()) { return Redirect::to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function tempPropertyShow($id) { $tempProperty = TempProperty::where('id', $id)->with('tempUser')->first(); if ($tempProperty !== null) { return view('property.temp_property_show')->with([ 'tempProperty' => $tempProperty ]);...
{ "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) { $property = Property::where('id', $id)->first(); if ($property !== null) { $bosses = User::where([ 'isAdmin' => null, 'isEmployee' => null, 'isBoss' => 1, 'boss_id' => null ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $property = Property::where('id', $id)->first(); if ($property !== null) { $property->delete(); return redirect('/property/index')->with('success', 'Property deleted!'); } return redirect()->route('welc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Remove the specified resource from storage.
public function tempPropertyDestroy($id) { $tempProperty = TempProperty::where('id', $id)->first(); if ($tempProperty !== null) { $tempProperty->delete(); return redirect('/property/index')->with('success', 'Temporary property deleted!'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Validate a few cases and requests the googlemap API to obtain the lat/lng of a user address and store it in the gmap SQL table as well as in cache
public function refreshUserGeolocation($iUserId, $sCountryIso, $sCity, $sPostalCode) { $aUserRow = $this->getUserAddress($iUserId); //Address Not found if($aUserRow == null || !isset($sCity) || $sCity == '') { $this->database()->delete(Phpfox::getT('gmap'), 'user_id = \'' . $iUserId . '\''); $this->ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getlatlng($address)\n\t{\n\t\t#perintah pengulangan jika terdapat query limit saat mendapatkan data\n\t\tgetlatlng:\n\t\t$data = json_decode(file_get_contents(\"http://maps.google.com/maps/api/geocode/json?address=\" . urlencode($address)));\n\t\t\n\t\t#berhenti jika data tidak lagi over query limit\n\t\t...
[ "0.6377701", "0.6340843", "0.63292575", "0.6327707", "0.631581", "0.623319", "0.6231387", "0.62205684", "0.62188077", "0.62090397", "0.618338", "0.6156632", "0.61554605", "0.6149053", "0.6144952", "0.61071324", "0.60952973", "0.6081244", "0.6073249", "0.6069403", "0.60045105"...
0.5346811
85
Create a list of all the user locations and sort them by countries
public function getAllLocations() { $sCacheId = $this->cache()->set('gmap.locations'); if (!($aRows = $this->cache()->get($sCacheId))) { $aRows = $this->database()->select('f.*, u.full_name, u.user_name, u.country_iso') ->from(Phpfox::getT('gmap'), 'f') ->join(Phpfox::getT('user'), 'u', 'u.user_id...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllCountriesLocations()\n\t{\n\t\t$sCacheId = $this->cache()->set('gmap.countries');\n\t\n\t\tif (!($aRows = $this->cache()->get($sCacheId)))\n\t\t{\n\t\t\t$aRows = $this->database()->select('fc.country_iso, c.name, c.phrase_var_name, fc.*, COUNT(u.user_id) as total_people')\n\t\t\t\t->from(Phpf...
[ "0.74711514", "0.6865445", "0.66405714", "0.642414", "0.64046234", "0.6379594", "0.6359848", "0.63485265", "0.6315212", "0.63120854", "0.6269753", "0.62527496", "0.62338364", "0.6229553", "0.61809915", "0.6132394", "0.61199135", "0.6118651", "0.6097875", "0.6093005", "0.60629...
0.6729927
2
Create a list of all the countries of the user in the databse
public function getAllCountriesLocations() { $sCacheId = $this->cache()->set('gmap.countries'); if (!($aRows = $this->cache()->get($sCacheId))) { $aRows = $this->database()->select('fc.country_iso, c.name, c.phrase_var_name, fc.*, COUNT(u.user_id) as total_people') ->from(Phpfox::getT('gmap_countries'),...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countryList()\n {\n $arrClms = array(\n 'country_id',\n 'name',\n );\n $varOrderBy = 'name ASC ';\n $arrRes = $this->select(TABLE_COUNTRY, $arrClms);\n //pre($arrRes);\n return $arrRes;\n }", "public static function getCountryList(){\...
[ "0.7717195", "0.7541187", "0.7524395", "0.7513591", "0.7469724", "0.74654615", "0.7353423", "0.7318043", "0.73065144", "0.72373843", "0.72113544", "0.7169729", "0.71623", "0.7162076", "0.7156155", "0.7125835", "0.7098961", "0.70277655", "0.7026228", "0.70021564", "0.70020545"...
0.6412694
74
Sort an array of objects by a specific property of these objects
public function sortByProp($array, $propertyName) { $sorted = []; foreach ($array as $item) $sorted[$item[$propertyName]][] = $item; ksort($sorted); $result = []; foreach ($sorted as $subArray) foreach ($subArray as $item) $result[] = $item; return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function propsort(&$array, $property) {\n uasort($array, create_function('$a,$b','return strcmp($a->'.$property.', $b->'.$property.');'));\n return $array;\n}", "function ObjectSorter(&$array, $props){\n if(!is_array($props)) $props = array($props => true); \n\t\t$function = '$props=unserialize(\\''.tri...
[ "0.7317352", "0.72741103", "0.7058861", "0.6701996", "0.66820407", "0.6495673", "0.63685226", "0.630918", "0.6290204", "0.626741", "0.620392", "0.6154181", "0.6003923", "0.6003923", "0.5989498", "0.5912365", "0.5905978", "0.58621144", "0.58428043", "0.5841331", "0.5819053", ...
0.62068564
10
Get a country localisation
public function getCountryLocalisation($countryIso) { $aRows = $this->database()->select('c.country_iso, c.name, fc.*') ->from(Phpfox::getT('gmap_countries'), 'fc') ->join(Phpfox::getT('country'), 'c', 'fc.country_iso = c.country_iso') ->where('c.country_iso = \'' . $countryIso . '\'') ->execute('getS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountry();", "public function getCountry();", "public function getCountry() {}", "public function getCountry() {}", "public function getCountryName();", "public function getCountry(): string\n {\n return $this->result->country_name;\n }", "public function getCountry()\n ...
[ "0.8331893", "0.8331893", "0.82503766", "0.82503766", "0.7764177", "0.758795", "0.75109965", "0.7490316", "0.74700093", "0.7391631", "0.73791456", "0.736314", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", ...
0.0
-1
Get a user full address from the Phpfox user fields
public function getUserAddress($iUserId) { $aRow = $this->database()->select('u.user_id, c.name as country, uf.city_location as city, uf.postal_code, c.country_iso') ->from(Phpfox::getT('user'), 'u') ->join(Phpfox::getT('user_field'), 'uf', 'uf.user_id = u.user_id') ->join(Phpfox::getT('country'), 'c', '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getLoggedInUserFullAddress()\n {\n \t$userId = Auth::getUser()->ID;\n \t$user = self::select('address1','zip','city','state')->where('ID', $userId)->first();\n \t$address = str_ireplace(\" \",\"+\",$user->address1).',+'.$user->zip.',+'.str_ireplace(\" \",\"+\",$user->city).',+'.s...
[ "0.731484", "0.6859681", "0.6820991", "0.646137", "0.6240512", "0.62200207", "0.6196467", "0.6196467", "0.6156209", "0.6154776", "0.60920185", "0.60744375", "0.60595506", "0.6054618", "0.6041222", "0.60032177", "0.5957405", "0.5957297", "0.594598", "0.5940521", "0.5928398", ...
0.0
-1
Instanciate a googlemap map, configure it and generate its client side code.
public function generateGoogleMap($defaultUser = '') { if(!isset($oGoogleMapService)) $oGoogleMapService = Phpfox::getService('gmap.googlemap'); //Init params $oGoogleMapService->setDivId('gmap'); $oGoogleMapService->setEnableWindowZoom(true); $oGoogleMapService->setSize('100%','100%'); $oGoogleMapServ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function output_map() {\n\n\t\tif ( $this->lat && $this->lng ) {\n\n\t\t\t$this->generate_map_lat_lng();\n\n\t\t} else {\n\n\t\t\t$this->generate_map_address();\n\t\t}\n\n\t\t?>\n\n\t\t<script src=\"https://maps.googleapis.com/maps/api/js?callback=initMap\"\n\t\t async defer></script>\n\n\t\t<div cla...
[ "0.7098154", "0.6853707", "0.6699524", "0.6583248", "0.6495953", "0.6489559", "0.64703095", "0.64691424", "0.64638376", "0.6461891", "0.6453968", "0.6371167", "0.6317142", "0.6273739", "0.6186014", "0.6145094", "0.61420304", "0.6084451", "0.6033601", "0.5996493", "0.5963358",...
0.0
-1
Generate the JS code of the map
public function getGoogleMapJS() { if(!isset($oGoogleMapService)) $oGoogleMapService = Phpfox::getService('gmap.googlemap'); return $oGoogleMapService->getGoogleMap(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateJavaScript($mapName) { \n $code = \"new google.maps.Marker ({\\n\";\n $code .= \"\\t position: \".$this->_position->getJavaScript().\",\\n\";\n $code .= \"\\t map: {$mapName},\\n\";\n if (!empty($this->_icon)) {\n $code .= \"\\t icon: \\\"{$...
[ "0.72252077", "0.67608774", "0.67607427", "0.66616005", "0.6614166", "0.6531004", "0.641709", "0.6415641", "0.6412427", "0.6403291", "0.6387463", "0.6316864", "0.6189339", "0.6127493", "0.5979974", "0.5967074", "0.5958609", "0.5947183", "0.5936739", "0.5900446", "0.589403", ...
0.55455226
60
Run the database seeds.
public function run() { Terms::insert([ 'terms' => 'One', 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), 'updated_at' => Carbon::now()->format('Y-m-d H:i:s') ]); Terms::insert([ 'terms' => 'Two', 'created_at' => Carbon::now()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Method returning the class name
public function __toString() { return __CLASS__; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClassName();", "public function getClassName();", "public function getClassName() ;", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName()\n {\n ...
[ "0.87522393", "0.87522393", "0.8751158", "0.87397957", "0.87397957", "0.87397957", "0.87397957", "0.8731564", "0.8696754", "0.8673495", "0.8638432", "0.8615335", "0.8603119", "0.8566906", "0.8562364", "0.8555002", "0.85503733", "0.85503733", "0.85425884", "0.8533183", "0.8529...
0.0
-1
/ detecta si un string esta en utf8
function is_utf8($str) { $c=0; $b=0; $bits=0; $len=strlen($str); for($i=0; $i<$len; $i++){ $c=ord($str[$i]); if($c > 128){ if(($c >= 254)) return false; elseif($c >= 252) $bits=6; elseif($c >= 248) $bits=5; elseif($c >= 240) $bits=4; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_well_formed_utf8($string)\n{\n if ( empty($string) ) {\n return true;\n }\n // iconv is the fastest and best way to check this but it\n // might not be installed\n // The comments in this blog post will explain what is going on\n // http://www.sitepoint.com/blogs/2006/08/09/scr...
[ "0.8238786", "0.8135406", "0.80862665", "0.8034385", "0.8022029", "0.79785603", "0.7975109", "0.78999686", "0.7857252", "0.7857252", "0.78398585", "0.78052855", "0.77975214", "0.77107453", "0.7698924", "0.7628334", "0.75758505", "0.7575359", "0.7554979", "0.75518435", "0.7474...
0.75543904
19
/ consultas a la base de datos mysql
function consulta($sql=false,$F=false,$accesos=false){ if ($sql==false){return false;} if(is_utf8($sql)){ $sql = utf8_decode($sql); } if(is_array($accesos) && $accesos!=false){ $servidor = (isset($accesos['servidor']))?$accesos['servidor']:__servidor; $base ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function consultaTodos()\n\t{\n\t\t$sql = \"SELECT * FROM \" . $this->tabela;\n\n\t\t// $this->resultado = mysqli_query($this->conn, $sql);\n\t\t$this->resultado = $this->conn->prepare($sql);\n\t\treturn $this->resultado->execute();\n\t}", "function Readto()\n {\n $conexion=floopets_BD::Connect();\n ...
[ "0.71992135", "0.71833885", "0.715125", "0.71253973", "0.7120007", "0.7113935", "0.7090362", "0.70648676", "0.7037965", "0.69573224", "0.6932917", "0.6932673", "0.6894677", "0.6872656", "0.6870303", "0.68536407", "0.6852207", "0.68456346", "0.6832023", "0.68196905", "0.681700...
0.0
-1
/ obtiene un campo desde la base de datos
function obtener_campo($sql, $campo=false){ $datos = consulta($sql,true); if (!$datos) { return false; }else { if($campo==false){ $datos = array_shift ($datos['resultado'][0]); }else{ $datos = $datos['datos'][0][$campo]; } return $dato...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchField();", "public abstract function FetchField();", "function getField($campo)\n{\n\treturn $this->res2[$campo];\n}", "public function __get($field){\n if ($field == 'usuario_id'){\n return $this->codigo;\n }\n else{\n return $this->fields[$fie...
[ "0.766757", "0.7237235", "0.7116232", "0.7068761", "0.7053466", "0.6940864", "0.6823613", "0.6788515", "0.67578477", "0.6747154", "0.6746513", "0.6697203", "0.66888267", "0.66880494", "0.66880494", "0.66880494", "0.6662906", "0.66099024", "0.66099024", "0.66099024", "0.660990...
0.6340105
37
/ textarea con version legible para humanos de una variable
function dump($string=""){ echo '<textarea style="width:700px; margin:auto;" rows="15">'.print_r($string,true).'</textarea>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setting_textarea( $option ) {\n\n\t\t$value = $this->pretty_print(get_option( $option ));\n?>\n\t<textarea name=\"<?php echo $option; ?>\"><?php echo $value;\n?></textarea>\n<?php\n\t}", "function print_textarea($value){\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title;\n\t\...
[ "0.6185957", "0.6164023", "0.6014055", "0.5984428", "0.5971634", "0.58903176", "0.58843064", "0.58661956", "0.5859177", "0.58512264", "0.5839002", "0.58265525", "0.58026034", "0.5745917", "0.572787", "0.57239044", "0.5693771", "0.56813836", "0.56781936", "0.56752795", "0.5663...
0.53765094
60
/ formateo de variables para ser procesadas en consultas sql
function varSQL($cadena, $tipo="text"){ $cadena = (!get_magic_quotes_gpc()) ? addslashes($cadena) : $cadena; switch ($tipo) { case "text": $cadena = ($cadena != "") ? "'" . $cadena . "'" : "NULL"; break; case "int": $cadena = ($cadena != "") ? intval($cadena) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cadena_sql($tipo,$variable)\n {\n switch ($tipo)\n {\n case 'periodoActivo':\n\n $cadena_sql=\"SELECT ape_ano ANO,\";\n $cadena_sql.=\" ape_per PERIODO\";\n $cadena_sql.=\" FROM acasperi\";\n ...
[ "0.6623784", "0.6563229", "0.64704484", "0.6253002", "0.6168803", "0.61628234", "0.61376", "0.60776997", "0.60756654", "0.604257", "0.60166776", "0.599603", "0.5940931", "0.5929678", "0.58914566", "0.5888518", "0.5864434", "0.5862955", "0.5853247", "0.5853172", "0.5834608", ...
0.57408243
33
/ carga de la plantilla del sitio y del sitio como tal
function _load(){ //verificar la session if(isset($_GET['adm'])&&!inicie_sesion()){ if(isset($_COOKIE['sessionHash'])&&$_COOKIE['sessionHash']!=''){ login_user_hash($_COOKIE['sessionHash']); _load(); exit; } if(isset($_GET['ajax'])){ ec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function obtener_plantilla_controlador(){\r\n\t\t\treturn require_once \"./vistas/plantilla.php\";\r\n\t\t}", "function crearPlantilla($datos);", "private function setRutasVista() {\n /* variable relacionadas a un controlador especifico */\n $this->_rutas = [\n 'vista' => RUTA_M...
[ "0.6222192", "0.59357166", "0.5881839", "0.5851187", "0.5839516", "0.57855976", "0.57337683", "0.57190156", "0.5709565", "0.56901073", "0.5675262", "0.5636738", "0.5586401", "0.55425847", "0.55406094", "0.5537599", "0.55358523", "0.55174476", "0.5512077", "0.5508782", "0.5498...
0.0
-1
/ carga los contenidos de los sitios
function cargar_contenidos(){ $mod=(isset($_GET['modulo']))?$_GET['modulo']:'index'; //habilitar limpiado de contenidos $c = false; $func=(isset($_GET['funcion']))?$_GET['funcion']:$mod; if(isset($_GET['adm'])){ $localreq=__path.'componentes/'.$mod.'/index.admin.php'; $globalreq='co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listarSitios(){\n $sql = \"SELECT\n sitioid,\n imagenIcono,\n titulo,\n introduccion,\n imagenPortada,\n descripcion\n from sitio\";\n $rs = $this->consultaSQL($sq...
[ "0.66017437", "0.61777204", "0.59924364", "0.5941101", "0.59369826", "0.5894734", "0.58513874", "0.5840232", "0.58258766", "0.58137476", "0.5802826", "0.5693212", "0.56732106", "0.5670481", "0.5668076", "0.56402105", "0.56332386", "0.5630327", "0.5626877", "0.5610573", "0.560...
0.59826434
3
/ Cargar el linkManager de los componentes del sistema
function LM(){ $mod=(isset($_GET['modulo']))?$_GET['modulo']:'index'; $func=(isset($_GET['funcion']))?$_GET['funcion']:$mod; $localreq=__path.'componentes/'.$mod.'/LM.php'; $globalreq='componentes/'.$mod.'/LM.php'; if(file_exists($localreq)){ require($localreq); }else{ if(file_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function maybe_disable_link_manager()\n {\n }", "public function getManagerLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url(...
[ "0.5935237", "0.59285134", "0.59028524", "0.5693557", "0.55867624", "0.55867624", "0.5578843", "0.5577812", "0.5560919", "0.55029273", "0.54935783", "0.5478747", "0.54342324", "0.5432871", "0.5398975", "0.5395888", "0.53832924", "0.5376758", "0.5374401", "0.53715265", "0.5306...
0.0
-1
/ obtiene las direcciones ip de los visitantes
function getUserIP(){ $client = @$_SERVER['HTTP_CLIENT_IP']; $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; $remote = $_SERVER['REMOTE_ADDR']; if(filter_var($client, FILTER_VALIDATE_IP)) { $ip = $client; } elseif(filter_var($forward, FILTER_VALIDATE_IP)) { $ip = $forwar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function obtenerDireccionIP() {\n if (isset($_SERVER[\"HTTP_CLIENT_IP\"])) {\n return $_SERVER[\"HTTP_CLIENT_IP\"];\n } elseif (isset($_SERVER[\"HTTP_X_FORWARDED_FOR\"])) {\n return $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n } elseif (isset($_SERVER[\"HTTP_X_FORWARDED\"...
[ "0.738927", "0.7246671", "0.7190098", "0.7126971", "0.70113254", "0.6845851", "0.6823245", "0.67787135", "0.6759557", "0.6666617", "0.6663436", "0.66491956", "0.6616005", "0.6567725", "0.6557975", "0.65462434", "0.64780617", "0.64559", "0.64496815", "0.64425415", "0.64092106"...
0.0
-1
/ version minimificada de un codigo html =>
function minify_html($input){ if(trim($input) === "") return $input; // Remove extra white-space(s) between HTML attribute(s) $input = preg_replace_callback('#<([^\/\s<>!]+)(?:\s+([^<>]*?)\s*|\s*)(\/?)>#s', function($matches) { return '<' . $matches[1] . preg_replace('#([^\s=]+)(\=([\'"]?)(.*?)\3)?(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHtmlVer() {}", "function tidy_get_html_ver(tidy $object) {}", "function hi_updateVersion() {\n global $pth;\n\n return '<h1>CMSimple_XH - Update-Check</h1>' . \"\\n\"\n . tag('img src=\"' . $pth['folder']['plugins'] . 'hi_updatecheck/images/software-update-icon.png\" class=\...
[ "0.7347078", "0.6888472", "0.66132015", "0.651782", "0.6430769", "0.63862866", "0.63454545", "0.6319209", "0.6319209", "0.62528956", "0.6243193", "0.6224757", "0.6224757", "0.6224757", "0.6224757", "0.6224757", "0.61367357", "0.6129585", "0.60586226", "0.6036473", "0.6009289"...
0.0
-1
/ version minimificada de css =>
function minify_css($input) { if(trim($input) === "") return $input; return preg_replace( array( // Remove comment(s) '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')|\/\*(?!\!)(?>.*?\*\/)|^\s*|\s*$#s', // Remove unused white-space(s) '#("(?:[^"\\\]++...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function css();", "public static function css();", "public static function getCssRevision()\n {\n return 16;\n }", "public function build_css() {\n\t\t\t\n\t\t}", "function SA_dev_register_style($handle, $src, $ver){echo '<link rel=\"stylesheet\" href=\"'.$src.'\" type=\"text/css\" char...
[ "0.6989226", "0.69082993", "0.68470657", "0.68090916", "0.6535704", "0.6479604", "0.6478211", "0.6450226", "0.644263", "0.6416634", "0.64081115", "0.6401576", "0.6377028", "0.6357637", "0.63272446", "0.6326733", "0.6275637", "0.6243151", "0.6241626", "0.6233753", "0.62233734"...
0.0
-1
/ version minimificada de javascript =>
function minify_js($input) { if(trim($input) === "") return $input; return preg_replace( array( // Remove comment(s) '#\s*("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')\s*|\s*\/\*(?!\!|@cc_on)(?>[\s\S]*?\*\/)\s*|\s*(?<![\:\=])\/\/.*(?=[\n\r]|$)|^\s*|\s*$#', // Re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function js_2()\n {\n }", "public function js();", "public static function js();", "public function js_1()\n {\n }", "public function js()\n {\n }", "private function javascripter()\n {\n //@return : $stri_js => retourne le code javascript (return java...
[ "0.6834386", "0.64720696", "0.64274794", "0.64174646", "0.619034", "0.6189757", "0.6187709", "0.6169745", "0.61534584", "0.61534584", "0.6108636", "0.6055908", "0.6047977", "0.60175663", "0.60175663", "0.60175663", "0.60175663", "0.60175663", "0.6005991", "0.5972561", "0.5972...
0.0
-1
/ Limpia espacios, saltos de linea y comentarios en cadenas html
function limpiahtml($salida){ $regex = "/<script.*?>.*?<\/script>/ims"; preg_match_all($regex, $salida, $matches, null, 0); if(count($matches)>0){ $tags2add = ""; foreach($matches[0] as $tag){ if(!strstr($tag, "inmovil")){ $retag = $tag; $tag = JS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ChapterBody() {\n //$conn->SQL(\"select * from esquema.almacen_ubicacion\");\n\n\n\n\n //aqui metemos los parametros del contenido\n //$this->SetWidths(array(25,25,30,22,40,20));\n $this->SetWidths(array(10,30,22,22,25,21,23,25,32,20));\n //$this->SetAligns(array(\"C\",\...
[ "0.622012", "0.61342084", "0.6127845", "0.60945827", "0.60945827", "0.60486", "0.603544", "0.60237837", "0.6003663", "0.598029", "0.59544665", "0.59143096", "0.5908731", "0.5908122", "0.58891016", "0.5863715", "0.58446085", "0.58433926", "0.5839545", "0.583594", "0.5815094", ...
0.0
-1
/ funcion que recupera el pais de una IP del visitante
function getPais($ip = false){ $ip = ($ip==false)?getUserIP():$ip; $key="7b471597a8e15e665536cef21de5b54ffc5a38a7"; $data= file_get_contents("http://api.db-ip.com/addrinfo?addr=$ip&api_key=$key"); $data = json_decode($data,true); return ($data['country']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iploc($ip){\n\t\t/* preg_match(\"/<li>Country : (.*?) <img/\",$html,$data); */\n\t\t$d['pais'] = \"nada\";\n\t\t/* preg_match(\"/<li>State\\/Province : (.*?)<\\/li>/\",$html,$data); */\n\t\t$d['estado'] = \"nada\";\n\t\t/* preg_match(\"/<li>City : (.*?)<\\/li>/\",$html,$data); */\n\t\t$d['ciudad'] = \"nad...
[ "0.64549655", "0.60389394", "0.5822331", "0.5804361", "0.57738405", "0.567063", "0.56298107", "0.5623736", "0.5584858", "0.5565743", "0.55511135", "0.5549495", "0.5544723", "0.5543816", "0.5520428", "0.551994", "0.54972196", "0.5468901", "0.5441195", "0.5437298", "0.5436699",...
0.6262196
1
/ funcion para convertir caracteres especiales a codigos html
function to_html($cadena){ $busqueda = array("á","é","í","ó","ú","Á","É","Í","Ó","Ú","ñ","Ñ","¿"); $reemplazo= array("&aacute;","&eacute;","&iacute;","&oacute;","&uacute;","&Aacute;","&Eacute;","&Iacute;","&Oacute;","&Uacute;", "&ntilde;","&Ntilde;","&#191;"); $resultado = str_replace($busqueda, $re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traducirHTML($cad){\n $cad=htmlspecialchars_decode($cad);\n $esp=array('&nbsp;','&Aacute;','&Auml;','&Ccaron;','&Dcaron;','&Eacute;','&Lacute;','&Lcaron;','&Ncaron;','&Oacute;','&Ocirc;','&Racute;','&Scaron;','&Tcaron;','&Uacute;','&Yacute;','&Zcaron;','&aacute;','&auml;','&ccaron;','&dcaron;','&eac...
[ "0.6673663", "0.6673663", "0.6527756", "0.6498215", "0.63972336", "0.6355365", "0.6302068", "0.630082", "0.6292011", "0.62564963", "0.6237709", "0.62167984", "0.61930776", "0.6155556", "0.6132251", "0.6110325", "0.6109017", "0.6101897", "0.6043615", "0.6041443", "0.6031668", ...
0.67559993
0
/ Inicia sesion a un usuario en el sistema
function login_user($user,$pass,$activo=false,$h=false){ $c = ($h)?$pass:md5($pass); $sql = sprintf("SELECT * FROM `login` WHERE `email` = %s AND `contrasena` = %s AND `cloud` = %s LIMIT 1", varSQL($user), varSQL($c), varSQL(__sistema)); $datos = consulta($sql,true); if($datos !=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function logInSUUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(1646);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $this->us...
[ "0.6969137", "0.67961705", "0.6779878", "0.6691744", "0.65447706", "0.64971274", "0.6355214", "0.63495773", "0.63391834", "0.6337481", "0.6297443", "0.6263401", "0.6232567", "0.61990994", "0.61809903", "0.61727434", "0.6148751", "0.61391735", "0.61332494", "0.6087304", "0.606...
0.0
-1
/ Registrar un usuario en la tabla login
function registrar_usuario($datos = array()){ if(empty($datos)||!($datos['perfil']!=''&&$datos['email']!=''&&$datos['contrasena']!='')){return false;} $sql = sprintf("INSERT INTO `login` (`cloud`,`perfil`,`nombres`,`apellidos`,`email`,`telefono`,`contrasena`) SELECT * FROM (SELECT %s,%s,%s,%s,%s,%s,%s) AS `tmp`...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cadastrar()\n\t{\n\t\t//conexao com o banco\n\t\t$connect = new Connect('user_login');\n\n\t\t$this->id = $connect->insert([\n\t\t\t\t'login'=> $this->login,\n\t\t\t\t'password'=> $this->password\n\t\t]);\n\n\t}", "public function registerUser()\n {\n $sql = \"INSERT INTO user (username...
[ "0.71785843", "0.688725", "0.6738213", "0.66912943", "0.66807795", "0.6643173", "0.66336715", "0.6628408", "0.66276956", "0.65206176", "0.6513554", "0.64967364", "0.648998", "0.6477704", "0.64532024", "0.6446673", "0.64392096", "0.6435796", "0.6409339", "0.64071745", "0.63881...
0.6268589
29
/ verifica si inicie sesion en el sistema
function inicie_sesion(){ return (isset($_SESSION['usuario'])&&$_SESSION['usuario']!=''&&isset($_SESSION['session_key'])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function sesion_iniciada()\n\t{\n\t\t$this->load->library(\"session\");\n\t\tif($this->session->userdata(\"isess\")){\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }", "public function inactividad...
[ "0.7696209", "0.6886382", "0.68207043", "0.680028", "0.6506509", "0.6445368", "0.6404683", "0.640142", "0.63806766", "0.6348124", "0.63030344", "0.61870414", "0.615614", "0.6149614", "0.6149545", "0.6143909", "0.61438", "0.6142401", "0.61385113", "0.61026776", "0.60959333", ...
0.65233624
4
/ errores del sistema
function errLog($text='Error'){ echo "<div class='text-center' style='color:red;background-color:white;'>".$text."</div>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function muestraErrores(){\n error_reporting(E_ALL);\n ini_set('display_errors', '1');\n}", "private function _error() {\n\t\trequire $this->_controllerPath . $this->_errorFile;\n\t\t$this->_controller = new Error();\n\t\t$this->_controller->index('Esta página no existe');\n\t\texit;\n\t}", "function aff...
[ "0.69722664", "0.68555987", "0.6794135", "0.6780865", "0.6780865", "0.674656", "0.6733402", "0.67250794", "0.6686103", "0.66486144", "0.6608718", "0.6569574", "0.6514291", "0.64822483", "0.6459277", "0.6453669", "0.6436135", "0.6430882", "0.6428649", "0.6406779", "0.639872", ...
0.0
-1
/ detectar dispositivos moviles
function isMobile(){ $detect = new Mobile_Detect(); return $detect->isMobile(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function findLineMove()\n\t{\n\t\t$moves = array();\n\t\t\n\t\tfor($i = 3; $i >= -3; $i--)\n\t\t{\n\t\t\tfor($j = -3; $j <= 3; $j++)\n\t\t\t{\n\t\t\t\t$hole = & $this->board[$i][$j];\n\t\t\t\t\n\t\t\t\tif(\t$hole )\n\t\t\t\t{\n\t\t\t\t\tif($hole->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Top\n\t\t\t\t\t\tif(...
[ "0.5247034", "0.518427", "0.50850207", "0.5053846", "0.5052573", "0.50488615", "0.5033761", "0.49807224", "0.49682704", "0.495854", "0.48415375", "0.48214668", "0.47541276", "0.47476426", "0.47457343", "0.47129738", "0.467588", "0.46752053", "0.46734437", "0.4641412", "0.4636...
0.0
-1
/ Convertir un string a un formato compatible con urls
function urlTitulo($str, $replace=array(), $delimiter='-') { setlocale(LC_ALL, 'en_US.UTF8'); if( !empty($replace) ) { $str = str_replace((array)$replace, ' ', $str); } $str = (is_utf8($str))? $str : utf8_encode($str); $clean = iconv('UTF-8', 'ASCII//TRANSLIT', $str); $clean = preg_replace("/[^a-zA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function massimport_convertspip_uri($str) {\n\t return eregi_replace('[^(->)\\'\\\"]http://([^[:space:]<]*)', ' [http://\\\\1->http://\\\\1]', $str); \n}", "function convertStringUrl($string){\n\n $wasteValue = [3];\n $url = parse_url($string);\n\n $scheme = $url['scheme'];\n $host = $url['host'];\n ...
[ "0.7457937", "0.73514843", "0.701122", "0.68946594", "0.67897123", "0.6719183", "0.6685257", "0.66183525", "0.6611778", "0.66002846", "0.6581184", "0.6573557", "0.6547947", "0.6532781", "0.6514709", "0.6494908", "0.6485179", "0.64815795", "0.6431849", "0.64270574", "0.6410923...
0.0
-1
/ Limpia el html de una cadena y permite recortarla
function limpiarHTML($cadena,$largo=0){ $cadena = preg_replace(array('@<style[^>]*?>.*?</style>@si','@<[\/\!]*?[^<>]*?>@si'),array("",""),$cadena); if($largo!=0){ $cadena = substr ($cadena, 0,$largo); } return $cadena; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadHTML();", "public function getHTML();", "abstract function get_html();", "public abstract function get_html();", "function _getContentHTML()\n\t{\n\t\tinclude_once ($_SERVER['DOCUMENT_ROOT'] . \"/webEdition/we/include/we_classes/html/we_multibox.inc.php\");\n\t\tinclude_once ($_SERVER['...
[ "0.6741055", "0.64413214", "0.6356386", "0.63376796", "0.62458897", "0.6217688", "0.6217688", "0.6204738", "0.6191451", "0.61839145", "0.6172932", "0.61624", "0.60967356", "0.6091406", "0.6029172", "0.6018081", "0.60135317", "0.5975807", "0.5918726", "0.5903938", "0.5878765",...
0.5837408
22
/ convierte un timestamp de mysql a un formato legible
function time2string($timestamp=''){ $meses = array('01' => 'enero','02'=>'febrero','03'=>'marzo','04'=>'abril','05'=>'mayo','06'=>'junio','07'=>'julio','08'=>'agosto','09'=>'septiembre','10'=>'octubre','11'=>'noviembre','12'=>'diciembre'); $partes = preg_split('/[\s,-]+/',$timestamp); $fecha = $partes[2].'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mysql_timestamp(): string {\n\treturn date('Y-m-d H:i:s');\n}", "function datetime_unix2mysql($timestamp) {\n\treturn date('Y-m-d H:i:s', $timestamp);\n}", "function mysqldate($timestamp) {\n return \"'\" . date('Y-m-d H:i:s', $timestamp) . \"'\";\n}", "function to_mysqlDate($time)\r\n{\r\n //...
[ "0.7706972", "0.7485957", "0.7376256", "0.7153472", "0.70794123", "0.70647407", "0.68878055", "0.68853295", "0.6881415", "0.6874447", "0.67726636", "0.6772412", "0.6765006", "0.67498624", "0.6724285", "0.656349", "0.6528642", "0.65284693", "0.65117186", "0.64848363", "0.64804...
0.0
-1
/ Establece el titulo del documento html resultante
function tituloHTML($titulo){ $_SESSION['configuracion']['titulo'] = $titulo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTitle() {\n return $this->document->getTitle();\n }", "private function getTitle() {\n\t\tif ($_GET['doc'] == 'index') {\n\t\t\treturn $this->config['title'];\n\t\t}\n\t\treturn $this->texy->headingModule->title . ' - ' . $this->config['title'];\n\t}", "function RellenarTitulo()\r\n {\r\n $...
[ "0.6553824", "0.6322908", "0.6309456", "0.63085574", "0.6266009", "0.6205865", "0.62001216", "0.6198791", "0.6187458", "0.6164674", "0.6164674", "0.61582404", "0.61543113", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61...
0.0
-1
/ obtiene el contenido de una pagina en especial
function pagina($id){ $pg = consulta(sprintf("SELECT `contenido` FROM `contenidos` WHERE `id` = %s LIMIT 1",varSQL($id)),true); return $pg['resultado'][0]['contenido']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function content($page = 1)\n {\n return file_get_contents($this->endpoint() . '&Pagina=' . $page);\n }", "function page_content()\n {\n //This needs to deliver page data that is requested by the ROUTE.\n }", "public function getPageContent(): string {\n\t\treturn $this->m_pag...
[ "0.7014478", "0.67272127", "0.67093396", "0.67029035", "0.66110665", "0.65743744", "0.65445083", "0.653453", "0.64839286", "0.6385815", "0.63592994", "0.6335847", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.633513...
0.614567
43
/ editor de contenidos
function editor($selector='textarea'){ if(!defined('__editor_script')){ echo '<script src="/frontend/tinymce/tinymce.min.js"></script>'; define('__editor_script', 'true'); } ?> <script type="text/javascript"> $('document').ready(function(){ tinymce.init({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editorAction() {\n \n }", "public function __viewEdit()\n {\n $this->_context[2] = 'single';\n $this->addStylesheetToHead(self::$assets_base_url . 'editor.css');\n $this->addScriptToHead(self::$assets_base_url . 'editor.js');\n $filepath = EXTENSIONS . '/wo...
[ "0.6857355", "0.6809973", "0.6790261", "0.6633102", "0.6555018", "0.6429233", "0.63850117", "0.6362742", "0.6360705", "0.63591206", "0.63570243", "0.62725323", "0.62690294", "0.62652475", "0.6248976", "0.6237461", "0.6204494", "0.618674", "0.61763644", "0.61552966", "0.615065...
0.6182594
18
/ Permite copiar un directorio completo de forma recursiva
function copiar ($desde, $hasta){ mkdir($hasta, 0777); $this_path = getcwd(); if(is_dir($desde)) { chdir($desde); $handle=opendir('.'); while(($file = readdir($handle))!==false){ if(($file != ".") && ($file != "..")){ if(is_dir($file)){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recursive_copy($src, $dst): void\n{\n $dir = opendir($src);\n if (!@mkdir($dst) && !is_dir($dst)) {\n throw new RuntimeException(sprintf('Directory \"%s\" was not created', $dst));\n }\n while (($file = readdir($dir))) {\n if (($file !== '.') && ($file !== '..')) {\n i...
[ "0.6919138", "0.6891525", "0.684044", "0.6804076", "0.6776408", "0.6764926", "0.66789585", "0.6662889", "0.66518027", "0.66457427", "0.6632279", "0.6572202", "0.6561335", "0.6530037", "0.6505243", "0.64843374", "0.64732915", "0.6471976", "0.6463541", "0.6450435", "0.64069027"...
0.76319045
0
/ Permite eliminar un directorio completo
function eliminarDirectorio($directorio){ foreach(glob($directorio . "/*") as $archivos_carpeta){ if (is_dir($archivos_carpeta)){ eliminarDirectorio($archivos_carpeta); } else{ unlink($archivos_carpeta); } } rmdir($directorio); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarDirectorio($directorio,$rutaActual){\n\t$carpeta = @scandir($rutaActual.\"/\".$directorio);\n\tif (count($carpeta) > 2){\n\t echo \"El directorio contiene Archivos, verifique la informacion\";\n\t}else{\n\t if(rmdir($rutaActual.\"/\".$directorio)){\n\t\techo \"<script type='text/javascript'>...
[ "0.726087", "0.7205929", "0.71847975", "0.70745915", "0.6993625", "0.6987787", "0.6937795", "0.67718405", "0.6760282", "0.6746342", "0.6740512", "0.6701986", "0.6687171", "0.66768277", "0.6674728", "0.66515046", "0.6611792", "0.6610989", "0.66024506", "0.6590333", "0.6589668"...
0.7954474
0
/ genera el listado de categorias
function listarCategoriasComponente($componente){ $sql = sprintf("SELECT * FROM `categorias` WHERE `componente` = %s AND `nivel` = 0",varSQL($componente)); $c = consulta($sql,true); if($c!=false){ $c = $c['resultado'][0]['id']; $listado = array(); lcc($c,$listado); return $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getList()\n {\n $categories = array();\n\n $q = $this->_db->query('SELECT * FROM categorie ORDER BY idCategorie');\n\n while ($donnees = $q->fetch(PDO::FETCH_ASSOC))\n {\n $categories[] = ($donnees);\n \n }\n }", "public function getCategories();", "public function get...
[ "0.7335028", "0.732332", "0.732332", "0.7064533", "0.7062532", "0.69344646", "0.69012886", "0.68743414", "0.6856543", "0.68463296", "0.67614883", "0.6745046", "0.67320484", "0.6685929", "0.6683568", "0.6676232", "0.6660882", "0.6653027", "0.6639007", "0.6639007", "0.6602982",...
0.0
-1
/ Genera repeticiones de caracteres
function repetir($caracteres,$repeticiones=1){ for ($i=0; $i < $repeticiones; $i++) { echo $caracteres; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function buildControlCharacters()\n {\n for ($i = 0; $i <= 31; ++$i) {\n if ($i != 9 && $i != 10 && $i != 13) {\n $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_';\n $replace = chr($i);\n self::$controlCharacters[$find] = ...
[ "0.6607641", "0.65943", "0.6568492", "0.6522997", "0.63863266", "0.6251588", "0.62383705", "0.6223935", "0.61954516", "0.6177217", "0.6149367", "0.6140704", "0.6140348", "0.6132072", "0.6027043", "0.6023939", "0.600699", "0.6002173", "0.5979539", "0.5963263", "0.5958525", "...
0.6840336
0
/ Trae las ciudades en zona de riesgo
public function TraerCiudadRiesgo(){ $sentencia = $this->db->prepare("SELECT *FROM ciudad WHERE zona_riesgo=1 " ); $sentencia->execute(); // ejecuta - $query= $sentencia->fetchAll(PDO::FETCH_OBJ); // obtiene la respuesta return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChapeau();", "public function obtenerViajesplusAbonados();", "private function __getRupiah()\r\n\t{\r\n\t\t$request = Requests::get('http://www.bca.co.id/id/biaya-limit/kurs_counter_bca/kurs_counter_bca_landing.jsp');\r\n\t\t\r\n\t\tpreg_match('(\\d\\d\\40\\w+\\40\\d\\d\\d\\d\\40/\\40\\d\\d:...
[ "0.62288296", "0.62096786", "0.60756165", "0.59804267", "0.5945923", "0.5900716", "0.5899298", "0.58700716", "0.5869683", "0.58557475", "0.58062994", "0.5781538", "0.57766837", "0.5745159", "0.5702248", "0.5701149", "0.56982017", "0.5678287", "0.56605196", "0.56279904", "0.56...
0.58526725
10
Resizes a given image (if required) and renders the respective img tag.
public function render(): string { $src = (string)$this->arguments['src']; if (($src === '' && $this->arguments['image'] === null) || ($src !== '' && $this->arguments['image'] !== null)) { throw new Exception('You must either specify a string src or a File object.', 1382284106); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function image_render()\r\n {\r\n // Send the correct HTTP header\r\n \\header(\"Cache-Control:no-cache,must-revalidate\");\r\n \\header(\"Pragma:no-cache\");\r\n \\header('Content-Type: image/'.static::$image_type);\r\n \\header(\"Connection:close\");\r\n\r\n ...
[ "0.63067955", "0.622595", "0.61529046", "0.6054009", "0.6025174", "0.5974393", "0.5925865", "0.59153134", "0.59094566", "0.5893909", "0.58926284", "0.58719856", "0.5862669", "0.5835045", "0.5833018", "0.58267534", "0.5794286", "0.57547796", "0.5753699", "0.57504445", "0.57444...
0.0
-1
Get the breaches request.
public function getRequest(): ?BreachesRequest { return parent::getRequest(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReferringRequest() {}", "public function get_request()\n\t{\n\t\treturn $this->request;\n\t}", "public function get_request()\n\t{\n\t\treturn $this->request;\n\t}", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\...
[ "0.6688049", "0.6590395", "0.6590395", "0.6431904", "0.6431904", "0.6431904", "0.6431904", "0.63992965", "0.6397963", "0.6397963", "0.63911855", "0.6377279", "0.6375402", "0.63612074", "0.63598", "0.63598", "0.6357312", "0.63419515", "0.63117474", "0.6308457", "0.63021797", ...
0.7318399
0
Get the breaches response.
public function getResponse(): ?BreachesResponse { return parent::getResponse(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_response()\n\t{\n\t\treturn $this->response;\n\t}", "public function get_response()\n\t{\n\t\treturn $this->response;\n\t}", "function get_response() {\n return $this->response;\n }", "public function get_response()\n {\n return $this->response; \n }", "public function getRespo...
[ "0.6645051", "0.6645051", "0.6571819", "0.6557799", "0.6464147", "0.6464147", "0.6414569", "0.6350447", "0.63103235", "0.63103235", "0.63103235", "0.6302234", "0.62934583", "0.62546796", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344"...
0.7667638
0
function to generate a random character of the specified type ("symbol" or "number") calls the following functions: generateRandomNumber generateRandomSymbol
function generateRandomCharacter($type) { switch($type) { case 'symbol': return generateRandomSymbol(); break; case 'number': return generateRandomNumber(); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateRandomSymbol() {\n $r = mt_rand(0, 3);\n switch($r) {\n case 0: $i = mt_rand(33, 47); break;\n case 1: $i = mt_rand(58, 64); break;\n case 2: $i = mt_rand(91, 96); break;\n case 3: $i = mt_rand(123, 126); break;\n }\n return c...
[ "0.82840157", "0.7588584", "0.7123843", "0.69153625", "0.6724275", "0.66869706", "0.66380626", "0.66359055", "0.6625801", "0.6625514", "0.6595244", "0.6593437", "0.65721387", "0.65529925", "0.65500575", "0.6503184", "0.6496332", "0.6486056", "0.6480896", "0.64700735", "0.6460...
0.87992066
0
function to generate a random number based on ASCII code
function generateRandomNumber() { return chr(mt_rand(48, 57)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function genCode()\r\n\t{\r\n\t\t$digits = 10;\r\n\t\treturn rand(pow(10, $digits-1), pow(10, $digits)-1);\r\n\t}", "function generateRandomSymbol() {\n $r = mt_rand(0, 3);\n switch($r) {\n case 0: $i = mt_rand(33, 47); break;\n case 1: $i = mt_rand(58, 64); break;\n ...
[ "0.80122215", "0.7859618", "0.76705587", "0.7569429", "0.7539996", "0.7445171", "0.7370656", "0.7368243", "0.7332235", "0.7318972", "0.72628844", "0.72602165", "0.7256367", "0.72338855", "0.7232471", "0.72289187", "0.72104394", "0.7203421", "0.7197888", "0.7185042", "0.716928...
0.84985834
0
function to generate a random symbol based on ASCII code
function generateRandomSymbol() { $r = mt_rand(0, 3); switch($r) { case 0: $i = mt_rand(33, 47); break; case 1: $i = mt_rand(58, 64); break; case 2: $i = mt_rand(91, 96); break; case 3: $i = mt_rand(123, 126); break; } return chr($i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slRandomChar()\n{\n\t$char = '';\n\tfor ($i = 0; $i < 20; $i++)\n\t\t$char .= rand(0, 9);\n\treturn ($char);\n}", "function random_char($length = 16, $symbol = false)\n{\n $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n if($symbol) {\n \t$chars .= '~!@#$%^&*()-_+?{}...
[ "0.77047366", "0.76092833", "0.75886685", "0.7489973", "0.74861985", "0.7437758", "0.7412867", "0.73086303", "0.7301061", "0.7286641", "0.728562", "0.7274973", "0.72679263", "0.7236917", "0.7218145", "0.7169612", "0.711009", "0.70662624", "0.70088685", "0.69720984", "0.695793...
0.88800955
0
Builds the form. Symfony2 doesn't let us see the form data in this method, unless using an event listener hook. Which seems perfectyl logical, but we need it. So we are requiring the calling method to give us the neccessary data in the constructor...
public function buildForm(FormBuilder $builder, array $options) { $builder->add('title', 'text'); $builder->add('body', 'textarea'); if (!$this->special) { $builder->add('inMenu', 'checkbox'); $builder->add('fbbox', 'checkbox'); $parentlist = $this ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildForm()\n {\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->t...
[ "0.77342105", "0.74738115", "0.7348327", "0.72974354", "0.72965676", "0.7044055", "0.6969023", "0.6870084", "0.6853562", "0.66208476", "0.6578482", "0.65710163", "0.65534335", "0.65127456", "0.64911085", "0.6475481", "0.6454409", "0.6434787", "0.6427859", "0.642068", "0.63894...
0.0
-1
Returns the name of the form type.
public function getName() { return 'textpage_form'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getName()\n {\n return 'user_form_type';\n }", "public function getFormType();", "public function getTypeName()\n {\n return $this->type->getName();\n }", "public function getTypeName()\n {\n return $this->type_name;\n }", "public function getName() {\...
[ "0.8198043", "0.79904956", "0.77916247", "0.7766487", "0.77337635", "0.7698481", "0.7696464", "0.75959945", "0.7595872", "0.7595872", "0.7534543", "0.7506197", "0.74868584", "0.7443108", "0.7393556", "0.7327615", "0.73123956", "0.72769326", "0.7272592", "0.7239928", "0.723400...
0.66518396
61