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 |
|---|---|---|---|---|---|---|
/ this function is set to clean and save a text | function Rec($text)
{
$text = htmlspecialchars(trim($text), ENT_QUOTES);
if (1 === get_magic_quotes_gpc())
{
$text = stripslashes($text);
}
$text = nl2br($text);
return $text;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function clean_text($text) {\n\treturn $text;\n}",
"private function cleanText($text) {\n return $text;\n }",
"function text($text) {\n\t\t// Removing html tags\n\t\t$text = strip_tags($text);\n\t\t// Removing line breaks and tabs\n\t\t$text = preg_replace('/[\\n\\r\\t]+/',' ',$text);\n\t\t// Removin... | [
"0.67417693",
"0.67115337",
"0.6656856",
"0.6464599",
"0.64059114",
"0.63104284",
"0.63104284",
"0.6211645",
"0.61807656",
"0.61723155",
"0.61462873",
"0.61040765",
"0.6097638",
"0.60629535",
"0.60620683",
"0.6022567",
"0.60168725",
"0.6014722",
"0.59958756",
"0.5976179",
"0.... | 0.5771874 | 34 |
/ This function check the synthax of an email | function IsEmail($email)
{
$value = preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function emailOk ($email) {\r\n return filter_var($email, FILTER_VALIDATE_EMAIL);\r\n }",
"public function isEmail();",
"function validateEmail($TO,$SUBJECT,$BODY,$headers){\r\n\r\n if(!$this->getAccessLevel() > 0) {echo 'false'; return false;}\r\n\r\n //$server = \"http://localhost... | [
"0.71680707",
"0.7099788",
"0.7025897",
"0.69389284",
"0.693363",
"0.69320184",
"0.68899703",
"0.6888583",
"0.686845",
"0.68427116",
"0.68057686",
"0.68032044",
"0.67794305",
"0.6775179",
"0.67427766",
"0.6727921",
"0.67278355",
"0.672636",
"0.6725586",
"0.67196435",
"0.67173... | 0.0 | -1 |
Display a listing of the resource. | public function index(Request $request)
{
$estado = $request->get('estado');
$nombre = $request->get('nombre');
$pagina = ($request->get('page')!=null)?$request->get('page'):1;
$pagina--;
$pagina *= 10;
$tacs = Tac::buscar($nombre,$estado);
$activos = Tac::where('estado',tr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view('Tac.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
DB::beginTransaction();
try{
$tacNuevo = new Tac;
$tacNuevo->nombre=$request->nombre;
$tacNuevo->save();
//Crear una categoria de servicio asociada a los examen
$categoria_existe = CategoriaServicio::where('nombre','TAC')-... | {
"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.72875285",
"0.71454394",
"0.71323526",
"0.6639812",
"0.6620611",
"0.6568348",
"0.6526527",
"0.6509403",
"0.64499927",
"0.6375791",
"0.63739914",
"0.6365971",
"0.6365971",
"0.6365971",
"0.6342667",
"0.6342667",
"0.6342667",
"0.6342667",
"0.6342667",
"0.6342667",
"0.6342667"... | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$tac = Tac::find($id);
$servicio = Servicio::where('f_tac',$id)->first();
return view('Tac.show',compact('tac','servicio'));
} | {
"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)
{
$servicio =Servicio::where('f_tac',$id)->first();
$precio=$servicio->precio;
$tac = Tac::find($id);
return view('Tac.edit',compact('tac','precio'));
} | {
"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)
{
$servicio =Servicio::where('f_tac',$id)->first();
$servicio->precio=$request->precio;
$servicio->save();
$tac = Tac::find($id);
$tac->fill($request->all());
$tac->save();
Bitacora::bitacora('update','tacs','tacs',$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)
{
DB::beginTransaction();
try{
$servicio =Servicio::where('f_tac',$id)->first();
$servicio->delete();
$tac = Tac::findOrFail($id);
$tac->delete();
}catch(\Exception $e){
DB::rollback();
return redirect('/tacs?estado=0')->with('er... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n ... | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897... | 0.0 | -1 |
CREATE TABLE tb_table_pk ( table_name varchar(20) not null, pk_value varchar(20), PRIMARY KEY (table_name) ); | public function get_pk_value($table_name)
{
$sql = " SELECT pk_value FROM tb_table_pk ";
$sql .= " WHERE table_name = '".$table_name."'";
Log::debug($sql);
$this->open_connect();
$this->db->query("LOCK TABLES tb_table_pk");
$result = $this->db->query($s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function create_table($table_name, $fields, $primary_key = TRUE);",
"public function createTable( $table ) {\n\t\t$idfield = $this->getIDfield($table, true);\n\t\t$table = $this->safeTable($table);\n\t\t$sql = \"\n CREATE TABLE $table ( $idfield INTEGER PRIMARY KEY AUTOINCREME... | [
"0.703775",
"0.65729445",
"0.6402711",
"0.6353708",
"0.6323042",
"0.6176299",
"0.6168588",
"0.60971045",
"0.6075723",
"0.607519",
"0.6074395",
"0.6063244",
"0.60473573",
"0.6045216",
"0.6007314",
"0.5996009",
"0.5992343",
"0.59665954",
"0.5958267",
"0.59581256",
"0.59344035",... | 0.58527946 | 27 |
TODO:: make sure this is a AJAX Request | public function checkUserExistsAjaxAction()
{
if(isset($_POST['Username']) && !empty($_POST['Username'])) {
header('Content-type: text/plain');
if(UserModel::userExists($this->filterString($_POST['Username'])) !== false) {
echo 1;
} else {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handleAjaxRequest();",
"public function ajax_response()\n {\n }",
"protected function processGetRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'get'\n ]));\n }",
"public function ajax_function()\n\t{\n... | [
"0.71470916",
"0.6824907",
"0.66170937",
"0.6443197",
"0.63690317",
"0.6348328",
"0.62474847",
"0.62352216",
"0.617868",
"0.6102074",
"0.60912126",
"0.608441",
"0.6081433",
"0.60764885",
"0.6071746",
"0.60660714",
"0.60460734",
"0.60431075",
"0.60210663",
"0.6013252",
"0.5975... | 0.0 | -1 |
TODO:: make sure this is a AJAX Request | public function checkEmailExistsAjaxAction()
{
if(isset($_POST['Email']) && !empty($_POST['Email'])) {
header('Content-type: text/plain');
if(UserModel::emailExists($this->filterString($_POST['Email'])) !== false) {
echo 1;
} else {
echo 2;... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handleAjaxRequest();",
"public function ajax_response()\n {\n }",
"protected function processGetRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'get'\n ]));\n }",
"public function ajax_function()\n\t{\n... | [
"0.71470916",
"0.6824907",
"0.66170937",
"0.6443197",
"0.63690317",
"0.6348328",
"0.62474847",
"0.62352216",
"0.617868",
"0.6102074",
"0.60912126",
"0.608441",
"0.6081433",
"0.60764885",
"0.6071746",
"0.60660714",
"0.60460734",
"0.60431075",
"0.60210663",
"0.6013252",
"0.5975... | 0.0 | -1 |
///////////////////////////////////////////////////////////////////////// / Constructor / ///////////////////////////////////////////////////////////////////////// | function __construct()
{
$this->user = new Profile();
$this->status = new Status();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function __construct()\t{}",
"final private function __construct() {\n\t\t\t}",
"private function __construct( )\n {\n\t}",
"private function __construct() {\r\n\t\r\n\t}",
"final private function __construct()\n\t{\n\t}",
"private function __construct()\r\n\t{\r\n\t\r\n\t}",
"public functio... | [
"0.8757909",
"0.85689086",
"0.8497271",
"0.8496717",
"0.8492053",
"0.84912395",
"0.84625304",
"0.8459791",
"0.8459791",
"0.8459791",
"0.84510356",
"0.84014404",
"0.84014404",
"0.84014404",
"0.84014404",
"0.84014404",
"0.84014404",
"0.84014404",
"0.839564",
"0.83825314",
"0.83... | 0.0 | -1 |
///////////////////////////////////////////////////////////////////////// / login() / / This method will attempt to login a user give a username and password. / If the login is successful it will load the user profile. Otherwise the / user profile will remain empty. / | public function login($username, $password)
{
if (strlen($username) > 0 && strlen($password) > 0)
{
// If values are supplied for both parameters then attempt to login.
$this->user->loadProfile($username);
$correctPassword = $this->user->getPassword();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function doLogin()\n {\n\n //check if all the fields were filled\n if (!Request::checkVars(Request::postData(), array('username', 'password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"Complete all the fields!\", \"type\" => \"error\")));... | [
"0.75616276",
"0.7542298",
"0.7539375",
"0.74898446",
"0.74624556",
"0.7413393",
"0.73520154",
"0.7333756",
"0.7300886",
"0.72897387",
"0.72496456",
"0.72196776",
"0.72187316",
"0.72020835",
"0.71899796",
"0.7184783",
"0.71790147",
"0.7174712",
"0.7156235",
"0.7153245",
"0.71... | 0.0 | -1 |
///////////////////////////////////////////////////////////////////////// / createJSONResponse() / / This method will return the JSON response to output so that the iPhone / application can parse the profile along with status object. If the / operation was not successul (i.e. the status object holds anything but / SUCC... | public function createJSONResponse()
{
$json_array = array();
if ($this->status->getCode() != Status::SUCCESS)
{
// The operation failed. Send only the error
$json_array['Status'] = $this->status->membersToJsonFormat();
}
else
{
// ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function jsonResponse($status, $code, $html, $message = null) {\n $this->getResponse()\n ->setHeader('Content-Type', 'application/json')\n ->setHttpResponseCode($code)\n ->setBody(Zend_Json::encode(array(\"status\" => $status, \"html\" => $html, \"messa... | [
"0.655637",
"0.6509824",
"0.63844895",
"0.63839203",
"0.63462466",
"0.6301859",
"0.6283636",
"0.6273224",
"0.62719935",
"0.62586755",
"0.621284",
"0.62051564",
"0.61972684",
"0.6192168",
"0.61861074",
"0.6154327",
"0.61485696",
"0.61400616",
"0.6078888",
"0.6058823",
"0.60327... | 0.8476488 | 0 |
Creates a mock reference. | public static function createMockReference($location = null, $subLocation = null)
{
$prophet = new Prophet();
$prophecy = $prophet->prophesize('Kreait\Firebase\ReferenceInterface');
if (!$location) {
return $prophecy;
}
$prophecy->getLocation()->willReturn($loca... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function testCanCreateMockMethodWithReturnByReference()\n {\n //If the return by ref doesn't come from an interface derived types can override it\n $mock = Phockito::mock(FooReturnsByReferenceNoImplements::class);\n $res = &$mock->Foo();\n $this->assertNull($res);\n\n //we nee... | [
"0.6913172",
"0.67155665",
"0.6602933",
"0.6525306",
"0.63454586",
"0.63134843",
"0.628404",
"0.6211032",
"0.61159116",
"0.60593474",
"0.6026771",
"0.59836614",
"0.59658664",
"0.5877068",
"0.58284694",
"0.5779687",
"0.5765337",
"0.57647663",
"0.57615286",
"0.5750453",
"0.5731... | 0.5402348 | 48 |
Seed the application's database. | public function run()
{
User::factory(20)->create();
Comment::factory(1000)->create();
Comment::where('id','<', 101)->update(['parent_id' => null]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function dbSeed(){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Turn foreign key checks off\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');// <- USE WITH CAUTION!\n\t\t\t//Seed tables\n\t\t\tArtisan::call('db:seed');\n\t\t\t//Turn foreign key checks on\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=... | [
"0.8065584",
"0.7848217",
"0.76748335",
"0.7244791",
"0.7217673",
"0.7133266",
"0.70984626",
"0.70752525",
"0.7050456",
"0.69926506",
"0.6988436",
"0.6985116",
"0.69669306",
"0.68992233",
"0.68682885",
"0.6847507",
"0.6831097",
"0.68208444",
"0.68041754",
"0.68041754",
"0.680... | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$estudiantes = Estudiante::orderBy('id', 'des');
$estudiantes_t = Estudiante::orderBy('apellidoEst', 'asc')
->join('proyecto_estudiante', 'estudiante.idEstudiante', '=', 'proyecto_estudiante.idEstudiante')
->where('estado', 'inactivo')
->get();
... | {
"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()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$this->validate($request, [
'ciEst' => 'required|string',
'nombreEst' => 'required|string',
'apellidoEst' => 'required|string',
'emailEst' => 'required|email',
'telefono' => 'required|integer',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.63424... | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
/*
$tribunales = Estudiante::select('docente.apeMaternoDoc','docente.apePaternoDoc','docente.nombreDoc')
->join('proyecto_estudiante', 'estudiante.idEstudiante', '=', 'proyecto_estudiante.idEstudiante')
->where('proyecto_estudiante.idEstudiante' , '=', $id... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8232636",
"0.81890994",
"0.68296117",
"0.64987075",
"0.649589",
"0.64692974",
"0.64633286",
"0.63640857",
"0.6307513",
"0.6281809",
"0.621944",
"0.61926234",
"0.61803305",
"0.6173143",
"0.61398774",
"0.6119022",
"0.61085826",
"0.6106046",
"0.60947937",
"0.6078597",
"0.6047... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"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)
{
/*return response()->json([
'message' => $id,
]);*/
$this->validate($request, [
'ciEst' => 'required|string',
'nombreEst' => 'required|string',
'apellidoEst' => 'required|string',
//'e... | {
"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)
{
Estudiante::where('idEstudiante', $id)->delete();
return response()->json([
'mensaje' => 'Se elimino correctamente!',
]);
} | {
"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 |
Add CSS via ResourceLoader | public function initPage( OutputPage $out ) {
$out->addMeta( 'viewport',
'width=device-width, initial-scale=1.0, ' .
'user-scalable=yes, minimum-scale=0.25, maximum-scale=5.0'
);
$out->addModuleStyles( [
// 'mediawiki.skinning.interface',
// 'mediawiki.skinning.content.externallinks',
'skins.ims'
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function loadCss() {}",
"public static function appendCss($resource)\n {\n self::append('css', $resource);\n }",
"private static function defCssLoader() {\n\n\t\t$loadedResources = Yii::app()->user->getState('nlsLoadedResources');\n\t\tif (!isset($loadedResources))\n\t\t\t$loadedResource... | [
"0.73147994",
"0.71999764",
"0.7056463",
"0.6875748",
"0.681634",
"0.67804253",
"0.6746531",
"0.6696955",
"0.6664494",
"0.6631029",
"0.6591192",
"0.6535578",
"0.65086675",
"0.64745843",
"0.641187",
"0.638663",
"0.63371277",
"0.6333775",
"0.63267523",
"0.631587",
"0.6287945",
... | 0.0 | -1 |
/ Action: Insert, Delete, Update | function executarSQLAction($query)
{
global $basedados;
try
{
$stmt = $basedados->prepare($query);
$stmt->execute();
return( $stmt );
}
catch (PDOException $e)
{
imprimir($e->getMessage());
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCreate()\n\t{\n $this->actionUpdate();\n\t}",
"public function actionCreate() {\n $this->actionUpdate();\n }",
"function saveAction()\n {\n\t\t$params = $this->_request->getParams();\n \t$id=(int)$params[\"id\"];\n\t\t$name = $params[\"txtName\"];\n\t\t$address = $p... | [
"0.72144425",
"0.7141254",
"0.67431885",
"0.6656521",
"0.6656521",
"0.66423965",
"0.6595205",
"0.6592592",
"0.64974916",
"0.6487419",
"0.6466672",
"0.6415162",
"0.6410732",
"0.6296168",
"0.6285263",
"0.6277352",
"0.6265169",
"0.62626046",
"0.6243847",
"0.6233441",
"0.62292176... | 0.0 | -1 |
For internal only. DO NOT USE IT. | public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Time",$param) and $param["Time"] !== null) {
$this->Time = $param["Time"];
}
if (array_key_exists("CompanyId",$param) and $param["CompanyId"] !== null) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function __init__() { }",
"private function __() {\n }",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}... | [
"0.62662613",
"0.6151871",
"0.5989886",
"0.5989886",
"0.5989886",
"0.5989886",
"0.5989418",
"0.5989418",
"0.5989418",
"0.5989418",
"0.5989418",
"0.5989418",
"0.5988404",
"0.5988404",
"0.5949015",
"0.5939596",
"0.59168774",
"0.59168774",
"0.58703923",
"0.58665824",
"0.5855589"... | 0.0 | -1 |
Grocery Crud callback functions | public function callback_before_create_user($post_array)
{
$post_array['password'] = hash_pw($post_array['password']);
return $post_array;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function distributors_list(){\r\n \r\n $crud = new grocery_CRUD();\r\n \r\n $crud->set_table('distributors');\r\n $crud->set_subject('Distributor');\r\n\r\n $crud->columns('id','company_name','contact_name','number','email','address');\r\n $crud->display_as('contact... | [
"0.680696",
"0.6621944",
"0.66056025",
"0.6406889",
"0.63191915",
"0.6300433",
"0.61782837",
"0.6100026",
"0.59831005",
"0.5965348",
"0.59386766",
"0.58565575",
"0.58446",
"0.58225316",
"0.58103186",
"0.58043706",
"0.58038926",
"0.57651114",
"0.5750417",
"0.57329994",
"0.5709... | 0.0 | -1 |
/ Plugin Name: Note Taker Plugin URI: Description: Takes Notes on a page and saves them with ajax Version: 0.0.1 Author: Oyin Abatan Author URI: License: GPL2 License URI: Calls Notes if Template Pages | function nt_course_note_call() {
// only show logged-in members on learn dash pages
$post_type = get_post_type();
$types = array( 'sfwd-courses', 'sfwd-lessons', 'sfwd-topic', 'sfwd-assignment');
if (is_user_logged_in()){
if( in_array( $post_type, $types ) ) {
return nt_course_note_entry_field();
} else ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _addNotes()\n\t{\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\treturn Admin_Form_Entity::factory('Script')\n\t\t\t->value(\"$(function (){\n\t\t\t\t$.adminLoad({ path: '/admin/crm/project/note/index.php', additionalParams: 'crm_project_id=\" . $this->_object->id . \"', wi... | [
"0.6546427",
"0.63748735",
"0.6362832",
"0.63580805",
"0.63543826",
"0.6194748",
"0.61930937",
"0.619011",
"0.6169558",
"0.61306274",
"0.59950274",
"0.59931594",
"0.5979956",
"0.595651",
"0.5950447",
"0.5937393",
"0.5921388",
"0.5902664",
"0.58746684",
"0.58700025",
"0.586040... | 0.0 | -1 |
Registers Course Notes as custom post type | function nt_register_course_note_create_type() {
$post_labels = array(
'name' => 'Course Notes',
'singular_name' => 'Course Notes',
'add_new' => 'Add New',
'add_new_item' => 'Add New Note',
'edit' => 'Edit',
'edit_item' => 'Edit Course Note',
'new_item' => 'New Co... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function courses_custom_post_type (){\n\n $labels = array(\n 'name' => 'Courses',\n 'singular_name' => 'Course',\n 'add_new' => 'Add course',\n 'all_items' => 'All courses',\n 'add_new_item' => 'Add course',\n 'edit_item' => 'Edit course',\n 'new_item' => 'New co... | [
"0.6953161",
"0.67703384",
"0.6549829",
"0.6466879",
"0.6453754",
"0.6426882",
"0.64204943",
"0.6400464",
"0.6392772",
"0.6388003",
"0.63603806",
"0.6349964",
"0.63493836",
"0.63026845",
"0.6274581",
"0.62579477",
"0.6244729",
"0.62369424",
"0.62205845",
"0.6216684",
"0.62091... | 0.8126819 | 0 |
Adds Course Note taxonomies | function nt_regsiter_taxonomy() {
$labels = array(
'name' => 'Course Note Categories',
'singular_name' => 'Course Note Category',
'search_items' => 'Search Course Notes Categories',
'all_items' => 'All Course Note Categories',
'edit_item' => 'Edit Course Note Category',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function nt_register_course_note_create_type() {\n\t$post_labels = array(\n\t\t'name' \t\t\t => 'Course Notes',\n\t\t'singular_name' \t=> 'Course Notes',\n\t\t'add_new' \t\t => 'Add New',\n\t\t'add_new_item' \t=> 'Add New Note',\n\t\t'edit'\t\t => 'Edit',\n\t\t'edit_item'\t => 'Edit Course Not... | [
"0.6718812",
"0.6598343",
"0.65285033",
"0.64682776",
"0.64632624",
"0.64328915",
"0.6418902",
"0.6416722",
"0.6398339",
"0.6386658",
"0.63728386",
"0.6352394",
"0.63428694",
"0.63150233",
"0.6286803",
"0.62698144",
"0.6267546",
"0.62572664",
"0.62428963",
"0.6229403",
"0.622... | 0.69820523 | 0 |
Retreives Post Id from Meta Key | function get_post_id_by_meta_key_and_value($key, $value) {
global $wpdb;
$meta = $wpdb->get_results("SELECT * FROM `".$wpdb->postmeta."` WHERE meta_key='".$wpdb->escape($key)."' AND meta_value='".$wpdb->escape($value)."'");
if (is_array($meta) && !empty($meta) && isset($meta[0])) {
$meta = $meta[0];
}
if (... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getKeyField() {\n return \"PostID\"; \n }",
"public function get_id() {\n\t\treturn $this->_post->ID;\n\t}",
"public function getPostId()\n {\n return $this->postId;\n }",
"public function getPostId()\n {\n return $this->postId;\n }",
"public f... | [
"0.72524434",
"0.6795377",
"0.6756939",
"0.6756939",
"0.6752889",
"0.66948944",
"0.66713715",
"0.66638386",
"0.6656644",
"0.6640809",
"0.66318136",
"0.66162735",
"0.6552369",
"0.65450555",
"0.65189976",
"0.64934975",
"0.64695567",
"0.64685637",
"0.64552027",
"0.6436293",
"0.6... | 0.6553685 | 12 |
Prints Note field in front end and retieves exisintg note as placeholder | function nt_course_note_entry_field() {
global $post;
//ID's
$current_user = get_current_user_id();
$current_lesson_id = $post->ID;
$current_post_type = get_post_type();
//Checks if note exists and changes title and body variables accordingly
$args = array(
'post_type' => 'coursenote',
'post_status' => array('draf... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function shownote($note){\n\treturn \"onfocus=\\\"note('<b>NOTE:</b><br>$note');\\\"\n\t\t\tonblur=\\\"note('');\\\"\";\n}",
"function setNoteText(){\n $html = \"\";\n \n $this->aFields[\"note\"]->editable = true;\n $this->aFields[\"note\"]->value = $html;\n }",
"public static function n... | [
"0.7143933",
"0.70152646",
"0.68602276",
"0.6796966",
"0.66756994",
"0.65140975",
"0.6469367",
"0.6460229",
"0.6429491",
"0.63810456",
"0.6360678",
"0.635171",
"0.6338213",
"0.6335402",
"0.6335402",
"0.6335402",
"0.6335402",
"0.6335402",
"0.6335402",
"0.6335402",
"0.6335402",... | 0.5796442 | 41 |
Genereate full title for course, lessson, topic | function nt_generate_course_title($course_type,$active_id){
if( $course_type == 'sfwd-courses' ) {
$title = get_the_title($active_id);
}
if( $course_type == 'sfwd-lessons' ) {
$course_id = get_post_meta( $active_id , 'course_id' , true );
$course_title = get_the_title( $course_id );
$lesson_title = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function generate_title()\r\n\t\t{\r\n\t\t\treturn $this->c_title;\r\n\t\t}",
"private function _generateTitle()\n {\n $title = '';\n foreach ($this->_contents as $content)\n {\n $title = ('' == $title) ? $content->myGetSeoTitleTag() : $content->myGetSeoTitleTag().' | '.$title;\n }\n ... | [
"0.76468766",
"0.7431139",
"0.72518694",
"0.7196875",
"0.7176244",
"0.71324164",
"0.71307904",
"0.71307904",
"0.7121572",
"0.6982277",
"0.69780296",
"0.69776493",
"0.69529694",
"0.68825686",
"0.6865529",
"0.6864429",
"0.68161696",
"0.68044627",
"0.6802795",
"0.6782037",
"0.67... | 0.76487195 | 0 |
AJAX Submits Note and Saves extra fields to Postmeta | function process_course_note() {
if ( ! empty( $_POST[ 'submission' ] ) ) {
wp_send_json_error( 'Honeypot Check Failed' );
}
if ( ! check_ajax_referer( 'nt-course-note-nonce', 'security' ) ) {
wp_send_json_error( 'Security Check failed' );
}
$course_title = nt_generate_course_title($_POST[ 'data' ][ 'currentPo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function save_meta_box_ajax() {\n\t\tcheck_ajax_referer( 'create-tracking-item', 'security', true );\n\n\t\tif ( isset( $_POST['tracking_number'] ) && strlen( $_POST['tracking_number'] ) > 0 ) {\n\n\t\t\t$order_id = wc_clean( $_POST['order_id'] );\n\t\t\t$args = array(\n\t\t\t\t'tracking_provider' =>... | [
"0.656293",
"0.65079296",
"0.62839484",
"0.62827927",
"0.626688",
"0.61148787",
"0.60743237",
"0.60599065",
"0.6055768",
"0.6006708",
"0.60038984",
"0.59891254",
"0.5974096",
"0.59569776",
"0.5892944",
"0.58695656",
"0.5852006",
"0.5851478",
"0.5832846",
"0.58246607",
"0.5814... | 0.64557743 | 2 |
create shortcode to list all notes | function nt_mass_listing_shortcode( $atts ) {
ob_start();
$current_user = get_current_user_id();
//Admin and editor users can view all notes
if(current_user_can('edit_posts')) {
$args = array(
'post_type' => 'coursenote',
'posts_per_page' => -1,
'post_status' => array('draft'),
'order... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNotes();",
"private function get_notes()\n\t{\n\t\t$notes = $this->api->search( Options::get('simplenote__search') );\n\t\t\t\t\n\t\treturn $notes;\n\t}",
"public function notesAction() {\n\t$notes = new Findofnotereasons();\n\t$this->view->notes = $notes->getReasonsList();\n\t}",
"public ... | [
"0.7024557",
"0.6983451",
"0.66899973",
"0.66415876",
"0.66243756",
"0.66228783",
"0.6504357",
"0.6491858",
"0.63816416",
"0.6369563",
"0.634885",
"0.6320098",
"0.62794673",
"0.6256552",
"0.6190016",
"0.61171585",
"0.6106902",
"0.6080982",
"0.6042622",
"0.6022212",
"0.6020969... | 0.6881182 | 2 |
echo "entro al mail"; | function enviamail($datos) {
//Create a new PHPMailer instance
// Crear una nueva instancia de PHPMailer habilitando el tratamiento de excepciones
try {
$mail = new PHPMailer(true);
// Configuramos el protocolo SMTP con autenticación
$mail->IsSMTP();
$mail->S... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function enviarEmail($msg)\n {\n // setando conteudo do email para avisos\n echo 'Envio email';\n }",
"function mail()\n {\n\n\n }",
"public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }",
"public function sendEmail(): void\n {\n ech... | [
"0.72432065",
"0.7234289",
"0.7224487",
"0.70980513",
"0.6775472",
"0.6630516",
"0.6558356",
"0.65565693",
"0.6542384",
"0.6524156",
"0.65235895",
"0.65115315",
"0.65075415",
"0.65033907",
"0.650003",
"0.64514774",
"0.6451145",
"0.6443376",
"0.6415766",
"0.6407102",
"0.638240... | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
} | {
"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()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
Userpreference::where('person_id', $_POST['person_id'])->delete();
Userpreference::create($request->all());
// Userpreference::updateOrCreate(
// ['person_id'=>$_POST['person_id']],
// $request->all()
// );
return redirect ('pre... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.63424... | 0.0 | -1 |
Display the specified resource. | public function show($uniqid)
{
$person = \App\Person::where('uniqid',$uniqid)->first();
$person_id = $person->id;
$userpreference = Userpreference::where('person_id', $person_id)->first();
return view ('userpreferences.show',Compact('userpreference','person'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8232636",
"0.81890994",
"0.68296117",
"0.64987075",
"0.649589",
"0.64692974",
"0.64633286",
"0.63640857",
"0.6307513",
"0.6281809",
"0.621944",
"0.61926234",
"0.61803305",
"0.6173143",
"0.61398774",
"0.6119022",
"0.61085826",
"0.6106046",
"0.60947937",
"0.6078597",
"0.6047... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit(Userpreference $userpreference)
{
//
} | {
"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, Userpreference $userpreference)
{
//
} | {
"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(Userpreference $userpreference)
{
//
} | {
"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 |
/ end of connection; | function array_iunique($array) {
return array_intersect_key($array,array_unique(
array_map(strtolower,$array)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function onConnectionClosed();",
"abstract protected function closeConnection();",
"protected function connectionDestruct()\t{}",
"public function closeConnection()\n {\n }",
"private function close_connection(){\n\t\t$this -> conn -> close();\n\t}",
"private function close_connection() \n\t... | [
"0.724493",
"0.7161869",
"0.69937307",
"0.6919006",
"0.6882437",
"0.6715584",
"0.6700235",
"0.6700235",
"0.6700235",
"0.66562307",
"0.66006273",
"0.65875256",
"0.65844333",
"0.6574307",
"0.65278107",
"0.65278107",
"0.65278107",
"0.6506683",
"0.6495169",
"0.6485497",
"0.648549... | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
if(LaravelLocalization::getCurrentLocale() == 'ar'){
$name = 'name_ar';
}else{
$name = 'name_en';
}
$cities = City::with(['country' => function($query) use($name){
$query->select('id', "$name as name");
}])->select... | {
"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()
{
if(LaravelLocalization::getCurrentLocale() == 'ar'){
$name = 'name_ar';
}else{
$name = 'name_en';
}
$countries = Country::select('id', "$name as name")->get();
return view('backend.cities.create', compact('countries'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$request->validate([
'name_ar' => 'required|string',
'name_en' => 'required|string',
'country_id' => 'required|integer|exists:countries,id',
]);
City::create($request->only(['name_ar', 'name_en', 'country_id']));
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.63424... | 0.0 | -1 |
Display the specified resource. | public function show(City $city)
{
if(LaravelLocalization::getCurrentLocale() == 'ar'){
$name = 'name_ar';
}else{
$name = 'name_en';
}
$countries = Country::select('id', "$name as name")->get();
return view('backend.cities.update', compact('countries',... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8232636",
"0.81890994",
"0.68296117",
"0.64987075",
"0.649589",
"0.64692974",
"0.64633286",
"0.63640857",
"0.6307513",
"0.6281809",
"0.621944",
"0.61926234",
"0.61803305",
"0.6173143",
"0.61398774",
"0.6119022",
"0.61085826",
"0.6106046",
"0.60947937",
"0.6078597",
"0.6047... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, City $city)
{
$request->validate([
'name_ar' => 'required|string',
'name_en' => 'required|string',
'country_id' => 'required|integer|exists:countries,id',
]);
$city->update($request->only(['name_ar', 'name_en', 'co... | {
"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 |
Display a listing of the resource. | public function index(Request $request)
{
//dd(QrCode::size(200)->generate(url('/menu?branch_id='.session()->get('branch')->id)));
if ($request->ajax()) {
$table = BranchTable::where('branch_id', session()->get('branch')->id)->first();
$elements = Element::where('branch_id', ... | {
"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()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
} | {
"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.72875285",
"0.71454394",
"0.71323526",
"0.6639812",
"0.6620611",
"0.6568348",
"0.6526527",
"0.6509403",
"0.64499927",
"0.6375791",
"0.63739914",
"0.6365971",
"0.6365971",
"0.6365971",
"0.6342667",
"0.6342667",
"0.6342667",
"0.6342667",
"0.6342667",
"0.6342667",
"0.6342667"... | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$QrSetting = QrSetting::where('branch_id', session()->get('branch')->id)->first();
$hex = $QrSetting->color;
[$r, $g, $b] = sscanf($hex, '#%02x%02x%02x');
$hex = $QrSetting->color2;
[$r2, $g2, $b2] = sscanf($hex, '#%02x%02x%02x');
if ($QrSe... | {
"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)
{
if ($request->type == 'size') {
$table = BranchTable::where('branch_id', session()->get('branch')->id)->first();
$table->width = $request->width;
$table->height = $request->height;
$table->save();
r... | {
"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 |
Handle request yang masuk. | public function handle(Request $request, Closure $next); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function handle_request();",
"function handleRequest() ;",
"public function handleRequest();",
"public function handleRequest();",
"public function handleRequest();",
"public function handleRequest() {}",
"protected abstract function handleRequest();",
"function handleRequest() {\n ... | [
"0.79725784",
"0.78659445",
"0.7760349",
"0.7760349",
"0.7760349",
"0.7655138",
"0.7613487",
"0.7090827",
"0.7006855",
"0.70034647",
"0.70024645",
"0.6966011",
"0.68782115",
"0.67687017",
"0.6761424",
"0.6759892",
"0.6754558",
"0.6748933",
"0.6729073",
"0.6675144",
"0.6671741... | 0.0 | -1 |
Traverse the configured route if it exists. | public function route() {
$file = $this->app_directory . '/controllers/' . $this->controller . '.php';
if(\mfw\helpers\FileHelper::fileExists($file)) {
include $this->app_directory . '/controllers/' . $this->controller . '.php';
$controller = new $this->controller($this->controller, $this->app_directory);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function route(): void\n {\n $url = $this->getUrlAsArray();\n $size = \\sizeof($url);\n $section = $this->section;\n\n for ($i = 0; $i < $size; $i++) {\n if ($i < ($size - 1)) {\n $section = $section->searchInSections($url[$i]);\n if (... | [
"0.65946484",
"0.64926034",
"0.6487607",
"0.6281742",
"0.62562615",
"0.6230622",
"0.61826414",
"0.6122974",
"0.6121335",
"0.6084998",
"0.5966015",
"0.5943828",
"0.59267294",
"0.58867705",
"0.58679634",
"0.58229125",
"0.58109015",
"0.58077353",
"0.58067566",
"0.5719957",
"0.57... | 0.0 | -1 |
Time to live in minutes | public function setTtl($ttl = 60)
{
$this->ttl = $ttl;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTimeInMinutes();",
"function getLifeTime();",
"public function timeToLive($value = null) {\n\t\tif (func_num_args() > 0) {\n\t\t\t$this->timeToLive = $value;\n\t\t} else {\n\t\t\treturn $this->timeToLive;\n\t\t}\n\t}",
"public static function getTimeToRun();",
"public function activityTi... | [
"0.69382447",
"0.6494767",
"0.6428171",
"0.63389665",
"0.6300368",
"0.6181017",
"0.6144704",
"0.6135144",
"0.6129771",
"0.61203045",
"0.60181534",
"0.601468",
"0.6010354",
"0.59780407",
"0.59738326",
"0.59405667",
"0.59137034",
"0.58339185",
"0.5828018",
"0.581391",
"0.577332... | 0.0 | -1 |
Seed the application's database. | public function run()
{
$this->call(CiudadTableSeeder::class);
$this->call(PaisTableSeeder::class);
$this->call(CarreraTableSeeder::class);
$this->call(UserTableSeeder::class);
$this->call(TallerTableSeeder::class);
$this->call(HorarioTableSeeder::class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function dbSeed(){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Turn foreign key checks off\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');// <- USE WITH CAUTION!\n\t\t\t//Seed tables\n\t\t\tArtisan::call('db:seed');\n\t\t\t//Turn foreign key checks on\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=... | [
"0.8065584",
"0.7848217",
"0.76748335",
"0.7244791",
"0.7217673",
"0.7133266",
"0.70984626",
"0.70752525",
"0.7050456",
"0.69926506",
"0.6988436",
"0.6985116",
"0.69669306",
"0.68992233",
"0.68682885",
"0.6847507",
"0.6831097",
"0.68208444",
"0.68041754",
"0.68041754",
"0.680... | 0.0 | -1 |
Contructor Creates an object representing an Element. | final public function __construct(CtkView $view, $name, $data = array(), $options = array()) {
parent::__construct();
$this->_view = $view;
$this->_name = (string) $name;
$this->_data = $data;
$this->_options = $options;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static function getElementInstance(string $element): Element\n {\n switch ($element) {\n case \"0\":\n case \"Fire\":\n return new Fire();\n case \"1\":\n case \"Water\":\n return new Water();\n case \"2\":\n ... | [
"0.6877082",
"0.68266314",
"0.67332226",
"0.6644454",
"0.6600208",
"0.6570985",
"0.6399482",
"0.6378918",
"0.63742787",
"0.6342441",
"0.624203",
"0.6232333",
"0.6195526",
"0.616579",
"0.6127352",
"0.6120941",
"0.61048234",
"0.6094329",
"0.608333",
"0.6078004",
"0.6075986",
... | 0.0 | -1 |
Renders the node if called as a string. | final public function __toString() {
try {
return $this->render();
} catch(Exception $e) {
trigger_error($e->getMessage(), E_USER_ERROR);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function render() {\n\t\t\n\t\tif(!$this->line_number)\n\t\t\t$this->parse();\n\t\t\n\t\t$result = $this->root->render();\n\t\t\n\t\tob_start();\n\t\t\n\t\tStringStream::add_string('result', $result);\n\t\textract($this->variables);\n\t\t$__options = $this->options;\n\t\t$__render_attributes = function($att... | [
"0.6574533",
"0.6432814",
"0.6417186",
"0.6417186",
"0.6417186",
"0.6417186",
"0.6323785",
"0.6323785",
"0.6323785",
"0.6283732",
"0.6283732",
"0.6283732",
"0.6283732",
"0.6283732",
"0.6283732",
"0.62682235",
"0.62408125",
"0.62312305",
"0.62312305",
"0.6222271",
"0.6133049",... | 0.0 | -1 |
Returns the name of the object. | final public function getName() {
return 'Element';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_object_name() : string ;",
"function get_object_name()\n {\n return $this->_object_name;\n }",
"public function objectAsName($object);",
"function name()\n {\n \n return new StringWrapper(get_class($this->object).'#'.$this->id());\n \n }",
"public function getNam... | [
"0.8829165",
"0.870608",
"0.8227463",
"0.8184838",
"0.8125817",
"0.80594957",
"0.79293984",
"0.7611413",
"0.75948834",
"0.74643624",
"0.7453147",
"0.7438825",
"0.7438825",
"0.74306315",
"0.7417954",
"0.7417954",
"0.73918205",
"0.73667884",
"0.73519856",
"0.73507905",
"0.73507... | 0.0 | -1 |
Returns the name of the factory which created the node. | final public function getFactory() {
return '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFactory()\n\t{\n\t\treturn empty($this->factory) ? 'new '.$this->getClass() : $this->factory;\n\t}",
"public function getDataFactoryName()\n {\n return $this->dataFactory->getName();\n }",
"public function getActiveFactoryName()\n {\n return $this->activeFactoryName;\n... | [
"0.7683385",
"0.74644196",
"0.7233918",
"0.6568206",
"0.6500953",
"0.6476344",
"0.6378232",
"0.6359979",
"0.6324381",
"0.62927884",
"0.6263692",
"0.62582153",
"0.62582153",
"0.62582153",
"0.62582153",
"0.62582153",
"0.62582153",
"0.62582153",
"0.62582153",
"0.62542415",
"0.62... | 0.71559995 | 3 |
Returns the name of the template for the node. | final public function getTemplate() {
return '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTemplateName()\n {\n return $this->templateName;\n }",
"function getTemplateName() {\n\t\treturn $this->templateName;\n\t}",
"public function getTemplateName()\n {\n return $this->_sThisTemplate;\n }",
"public function getTemplateName() {\n\t\treturn 'uitypes/Tree... | [
"0.7775373",
"0.7743881",
"0.75473285",
"0.73741245",
"0.72695297",
"0.7260627",
"0.7215766",
"0.70725423",
"0.7071507",
"0.7039025",
"0.7035399",
"0.6954474",
"0.6917212",
"0.6862439",
"0.6848056",
"0.68408495",
"0.68129146",
"0.6800569",
"0.6795225",
"0.6691858",
"0.6678995... | 0.6840022 | 16 |
Determines if the node allows a parent node. | final public function allowsParent() {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function is_for_parent_node(Jquarry_Node $parent);",
"public function isParent();",
"public function hasParent(BaseObject $node)\n {\n return (bool)$node->getParentIdValue();\n }",
"public function hasParent();",
"public function hasParent();",
"public function hasParent();",
"publ... | [
"0.77847123",
"0.7613103",
"0.7498584",
"0.7463138",
"0.7463138",
"0.7463138",
"0.7421399",
"0.734292",
"0.73293597",
"0.7315476",
"0.7274375",
"0.7221334",
"0.7178115",
"0.714417",
"0.71127516",
"0.7076997",
"0.7028497",
"0.7007704",
"0.681925",
"0.6754446",
"0.66959333",
... | 0.7977174 | 0 |
Determines if the node has a parent node. | final public function hasParent() {
return ($this->_parentNode !== null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasParent(BaseObject $node)\n {\n return (bool)$node->getParentIdValue();\n }",
"public function hasParent()\n {\n return $this->currentParent !== null;\n }",
"public function hasParent()\n\t{\n\t\treturn !empty($this->parent);\n\t}",
"public function hasParent() {\n retu... | [
"0.8103629",
"0.80385506",
"0.7996985",
"0.79281795",
"0.78594285",
"0.7759335",
"0.7759335",
"0.7759335",
"0.7632996",
"0.76225877",
"0.7453177",
"0.7414269",
"0.7411043",
"0.73730993",
"0.7371341",
"0.7369907",
"0.7111826",
"0.7086192",
"0.7049188",
"0.70080405",
"0.6909298... | 0.8085965 | 1 |
Returns the parent node of this node. | final public function getParent() {
return $this->_parentNode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getParentnode()\n {\n return $this->__parentnode__;\n }",
"public function getParentNode() {}",
"public function getParentNode()\r\n {\r\n return $this->_parentNode ? $this->_parentNode : false;\r\n }",
"public function get_parent() {\n\t\treturn $this->parent();\n\t... | [
"0.8736719",
"0.8143647",
"0.8125172",
"0.8109064",
"0.8107589",
"0.8100206",
"0.8060032",
"0.7985446",
"0.79760116",
"0.7964146",
"0.79399323",
"0.7919951",
"0.79183215",
"0.79183215",
"0.791358",
"0.791358",
"0.79123634",
"0.79123634",
"0.79123634",
"0.79123634",
"0.7912363... | 0.83716 | 1 |
Sets the parent node for this node. | final public function setParent(CtkBuildable $node = null) {
$this->_parentNode = $node;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setParent(Node $parent)\n {\n $this->parent = $parent;\n }",
"public function setParent(Module_Node_Model $parent = null);",
"public function setParent(PhpcrNodeInterface $parentNode);",
"public function setParent(self $parent)\n {\n $this->_parent = $parent;\n }",
... | [
"0.83225507",
"0.79335314",
"0.7705811",
"0.76145583",
"0.75762635",
"0.75071263",
"0.75018597",
"0.75018597",
"0.74901074",
"0.7429061",
"0.7383314",
"0.7319894",
"0.72148144",
"0.7201187",
"0.7123215",
"0.7091682",
"0.70636123",
"0.70559883",
"0.7032391",
"0.7014905",
"0.69... | 0.72155887 | 12 |
Determines if the node is allowed children. | final public function allowsChildren() {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function canHaveChildren() {}",
"function isChildren()\n {\n return count($this->children)>0;\n }",
"final public function hasChildren() {\n\t\treturn false;\n\t}",
"public function has_children()\n {\n return ($this->size > 2);\n }",
"public function hasChildren()\n {\n... | [
"0.7782169",
"0.7439577",
"0.73829496",
"0.7340907",
"0.7249016",
"0.7231493",
"0.72313994",
"0.72313994",
"0.72313994",
"0.72313994",
"0.718624",
"0.71645445",
"0.71645445",
"0.71645445",
"0.71645445",
"0.71552926",
"0.7153716",
"0.71522504",
"0.71467394",
"0.712846",
"0.712... | 0.7883431 | 0 |
Determines if the node has child nodes. | final public function hasChildren() {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasChildNodes() {}",
"#[\\ReturnTypeWillChange]\n public function hasChildren()\n {\n return $this->current()->hasChildNodes();\n }",
"public function hasChildren()\n {\n return $this->children->count() == 0 ? false : true;\n }",
"public function hasChildren()\n ... | [
"0.8415711",
"0.8315343",
"0.82838696",
"0.8250786",
"0.8247916",
"0.8226179",
"0.8187223",
"0.81460714",
"0.81459546",
"0.8128275",
"0.81024617",
"0.80841255",
"0.80841255",
"0.80841255",
"0.80841255",
"0.8079649",
"0.8049684",
"0.8047055",
"0.799931",
"0.797158",
"0.797158"... | 0.814092 | 9 |
Determines if a node is a child of this node. | final public function hasChild(CtkBuildable $node) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isChild()\n {\n return $this->parentId != null;\n }",
"public function isChild() {\n\t\treturn $this->_parent !== null;\n\t}",
"public function isChild()\n {\n if (false === $this->parent_category) {\n return false;\n }\n\n return true;\n\n }",... | [
"0.78043455",
"0.769076",
"0.73376924",
"0.7164119",
"0.7136918",
"0.7039642",
"0.70053774",
"0.699184",
"0.68647105",
"0.66530263",
"0.6577549",
"0.6538332",
"0.65284574",
"0.6517924",
"0.6473631",
"0.6458456",
"0.6456004",
"0.6440618",
"0.6405818",
"0.6383382",
"0.6307312",... | 0.68469954 | 9 |
Returns the child nodes of this node as an array. | final public function getChildren() {
return array();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getChildNodes() : array {\n return $this->childNodes;\n }",
"public function children()\n {\n return (array) $this->children;\n }",
"public function getChildren(): array {\n return iterator_to_array(clone $this->children);\n }",
"public function getChildren():... | [
"0.8418066",
"0.81136",
"0.80979496",
"0.8087373",
"0.8038098",
"0.8009374",
"0.78061616",
"0.75933874",
"0.75644505",
"0.7498086",
"0.7445753",
"0.744398",
"0.7396642",
"0.7396383",
"0.73725575",
"0.7346226",
"0.73402417",
"0.7333206",
"0.7333206",
"0.7333206",
"0.7333206",
... | 0.7592311 | 8 |
Returns the first child node of this node. | final public function getFirst() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function firstChild() {\n\t\t$children = $this->children();\n\t\tif (sizeof($children>0)) {\n\t\t\treturn $children[0];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public function firstChild()\n {\n $node = $this->node->firstChild;\n\n if ($node === null) {\n return null;\n ... | [
"0.7909703",
"0.785417",
"0.77718514",
"0.77534854",
"0.692618",
"0.68995184",
"0.6750996",
"0.6614837",
"0.6580448",
"0.6478152",
"0.6441489",
"0.6435494",
"0.6349834",
"0.62961566",
"0.6094803",
"0.60846853",
"0.6043376",
"0.59984595",
"0.59815824",
"0.590827",
"0.5855173",... | 0.0 | -1 |
Returns the last child node of this node. | final public function getLast() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLastChild()\n\t{\n\t\treturn $this->children[count($this->children)-1];\n\t}",
"public function lastChild()\n {\n $node = $this->node->lastChild;\n\n if ($node === null) {\n return null;\n }\n\n return new Element($node);\n }",
"public function ge... | [
"0.8670471",
"0.84469956",
"0.82278454",
"0.82278454",
"0.8067385",
"0.8020301",
"0.77429277",
"0.76669425",
"0.73860556",
"0.7359422",
"0.7063451",
"0.68913794",
"0.68122005",
"0.6700331",
"0.66831243",
"0.6652818",
"0.6640706",
"0.6640706",
"0.6640706",
"0.6640706",
"0.6640... | 0.63668764 | 58 |
Returns the previous node before this node in the common parent. | final public function getPrevious() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPrevious()\n {\n $prev = $this;\n $find = false;\n if (!is_null($this->parent)) {\n foreach ($this->parent->content as $c) {\n if ($c === $this) {\n $find=true;\n break;\n }\n if... | [
"0.8331974",
"0.7805668",
"0.7789767",
"0.7576522",
"0.7559238",
"0.75513285",
"0.7537708",
"0.7439251",
"0.7432675",
"0.73726857",
"0.7296436",
"0.72257066",
"0.71299654",
"0.71299654",
"0.7115595",
"0.70967144",
"0.70664227",
"0.70285827",
"0.7016926",
"0.7006968",
"0.70035... | 0.71348363 | 12 |
Returns the next node after this node in the common parent. | final public function getNext() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNext()\n {\n $next = null;\n $find = false;\n if (!is_null($this->parent)) {\n foreach ($this->parent->content as $c) {\n if ($find) {\n $next = &$c;\n break;\n }\n if ($c == $th... | [
"0.75268507",
"0.68934745",
"0.68866533",
"0.66833735",
"0.65698004",
"0.6382568",
"0.63546336",
"0.63029605",
"0.62576604",
"0.625619",
"0.6120316",
"0.60716075",
"0.6044811",
"0.60279506",
"0.60272616",
"0.6009663",
"0.59958595",
"0.5986714",
"0.5961782",
"0.5929814",
"0.59... | 0.61264646 | 10 |
Executes a callback function on each of the child nodes. | final public function each($callback, array $data = array(), $deep = false) {
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function iterateChildren();",
"public function getChildNodes();",
"public function getChildNodes() {}",
"public function getChildNodes() {}",
"public function each($callback)\n {\n array_walk($this->items, $callback);\n }",
"public function forEach(callable $callback): void {\n\t\tfor... | [
"0.6595269",
"0.64285487",
"0.6387632",
"0.63863707",
"0.6334177",
"0.6329996",
"0.6239527",
"0.62331754",
"0.62168336",
"0.62017244",
"0.61088604",
"0.61075777",
"0.6072097",
"0.6072097",
"0.6072097",
"0.6072097",
"0.5913235",
"0.5824274",
"0.5789463",
"0.5764517",
"0.572219... | 0.0 | -1 |
Returns a duplicate of the node. | final public function copy(array $params = null) {
return clone $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function duplicate()\n {\n $duplicator = new NodeDuplicator(\n $this->getNode(),\n $this->objectManager,\n $this->nodeNamePolicy\n );\n return $duplicator->duplicate();\n }",
"public function duplicate(){\n\t\treturn self::cloneObject($this);\n\t... | [
"0.82958126",
"0.754263",
"0.7497843",
"0.7123807",
"0.68968034",
"0.65360004",
"0.63945055",
"0.631674",
"0.6251477",
"0.6250337",
"0.62381965",
"0.6201114",
"0.6095647",
"0.604233",
"0.60077184",
"0.5974419",
"0.595604",
"0.5941394",
"0.5935824",
"0.588741",
"0.588741",
"... | 0.0 | -1 |
Adds a node to this node as a child. | final public function add(CtkBuildable $node) {
throw new CakeException('Cannot add children to node');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addChild(Node $child);",
"public function addChild(Node $child)\n {\n $this->children[] = $child;\n }",
"function addChild( $node )\n\t\t{\n\t\t$this->childs[] = $node ;\n\t\t}",
"public function add($child) {\n $this->children[] = $child;\n }",
"public function a... | [
"0.83781385",
"0.76881486",
"0.75892305",
"0.71660656",
"0.7158922",
"0.70509785",
"0.7042457",
"0.7040599",
"0.69980556",
"0.6971137",
"0.68763995",
"0.6857314",
"0.67896897",
"0.676381",
"0.6734846",
"0.66822916",
"0.6580756",
"0.6525707",
"0.64458984",
"0.64412534",
"0.640... | 0.6088483 | 29 |
Adds a node before the specified node. | final public function addBefore(CtkBuildable $node, CtkBuildable $before) {
throw new CakeException(sprintf('Cannot add children to %s', get_class($this)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function insertBefore (DOMNode $newnode , $refnode = null) {}",
"public function getAppendBeforeNode();",
"public function insertBefore($key, $data){\n $input = new Node($data);\n $temp = $this->head;\n while($temp != NULL){\n if(($temp->data == $key) && ($temp == $this->head)){\n $... | [
"0.80076665",
"0.7039313",
"0.67718965",
"0.6546532",
"0.63464546",
"0.62512606",
"0.6245053",
"0.6244906",
"0.6219497",
"0.6142735",
"0.6131885",
"0.59556025",
"0.5952647",
"0.59383327",
"0.5871021",
"0.5831786",
"0.5814597",
"0.57992494",
"0.57983136",
"0.5732195",
"0.57086... | 0.6841655 | 2 |
Adds a node after the specified node. | final public function addAfter(CtkBuildable $node, CtkBuildable $after) {
throw new CakeException(sprintf('Cannot add children to %s', get_class($this)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addNodeafter($node,$flag){\n $node->next = $flag->next;\n $flag->next = $node;\n $this->_length++;\n }",
"public function addChildAsLast(Node $node)\n {\n if(null === $this->children)\n {\n $this->children = array();\n ... | [
"0.7696656",
"0.6771784",
"0.65175265",
"0.6188816",
"0.6107677",
"0.61040723",
"0.60862356",
"0.6033241",
"0.6023598",
"0.59521323",
"0.5836208",
"0.5831884",
"0.58112335",
"0.57608616",
"0.5737349",
"0.57331336",
"0.56643367",
"0.56597143",
"0.56374",
"0.5633122",
"0.557660... | 0.6551407 | 2 |
Adds an array of nodes to this node as children. | final public function addMany(array $nodes) {
throw new CakeException(sprintf('Cannot add children to %s', get_class($this)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addChildren(array $children);",
"function addChildren(array $children) : void;",
"function add_children(){\n\t\t\t\t\t//if the array has a parent add it to the parents child array\n\t\tforeach ($this->nodes as $node){\n\t\t\tif($node->parent!=-1){\n\t\t\t\tif(isset($this->nodes[$node->parent]))... | [
"0.79234344",
"0.75128704",
"0.74833965",
"0.7092819",
"0.70302635",
"0.69920653",
"0.6749784",
"0.64732796",
"0.6426426",
"0.6426426",
"0.63213325",
"0.6293087",
"0.6293087",
"0.6293087",
"0.62740886",
"0.6256044",
"0.6216699",
"0.6212888",
"0.6212888",
"0.6212888",
"0.62128... | 0.6854739 | 6 |
Inherits the children of another node. | final public function addFrom(CtkBuildable $node, $prepend = false) {
throw new CakeException(sprintf('Cannot add children to %s', get_class($this)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getChildNodes() {}",
"public function getChildNodes() {}",
"public function getChildNodes();",
"abstract public function inherit($parent);",
"function getChildNodes() ;",
"public function getChildren() {}",
"public function getChildren() {}",
"public function getChildren() {}",
"pub... | [
"0.640123",
"0.64009917",
"0.6338444",
"0.6139745",
"0.60453206",
"0.59346896",
"0.59346896",
"0.59346896",
"0.5887354",
"0.5887354",
"0.5887354",
"0.5887354",
"0.5887354",
"0.5887354",
"0.5887354",
"0.5887354",
"0.5887354",
"0.58665335",
"0.58665335",
"0.57611483",
"0.575388... | 0.0 | -1 |
Conditionally adds a node to this node as a child. | final public function addIf($condition = false, CtkBuildable $node) {
throw new CakeException(sprintf('Cannot add children to %s', get_class($this)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addChild(Node $child);",
"protected function addChildIfMissing(NodeInterface $child)\n {\n $this->addChild($child);\n }",
"public function addChild(self $child): void\n\t{\n\t\tif (!$this->children->contains($child)) {\n\t\t\t// ...and assign it to collection\n\t\t\t$this->children... | [
"0.7423277",
"0.6686382",
"0.65202665",
"0.65020585",
"0.6398468",
"0.63334215",
"0.62865317",
"0.6247421",
"0.6190925",
"0.6176126",
"0.61677957",
"0.6124729",
"0.6058088",
"0.6039321",
"0.6023294",
"0.60165787",
"0.60148895",
"0.5976568",
"0.59093624",
"0.5833765",
"0.58103... | 0.66711754 | 2 |
Adds a node to this node as a child while the callback function returns a node. | final public function addWhile($callback, array $data = array()) {
throw new CakeException(sprintf('Cannot add children to %s', get_class($this)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addChild(Node $child);",
"function appendChild ($a_node)\n\t{\n\t\treturn $this->doc->append_child($a_node);\n\t}",
"public function addChild(Node $child) {\n return $this->root->addChild($child);\n }",
"function addChild( $node )\n\t\t{\n\t\t$this->childs[] = $node ;\n\t\t}",
"publ... | [
"0.7203511",
"0.6351661",
"0.6155289",
"0.6129545",
"0.6093489",
"0.60223854",
"0.5939296",
"0.59257823",
"0.5920227",
"0.5849091",
"0.5835997",
"0.5831631",
"0.58312815",
"0.5830525",
"0.5802936",
"0.5786045",
"0.57746196",
"0.5759919",
"0.5758656",
"0.57143307",
"0.5708681"... | 0.5160123 | 54 |
Adds raw content to the children of this node. | final public function addContent($content = '') {
throw new CakeException(sprintf('Cannot add children to %s', get_class($this)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function collectChildren(): void\n {\n $this->collection = new Collection();\n foreach ($this->rawResults as $blockChildContent) {\n $this->collection->add(Block::fromResponse($blockChildContent));\n }\n }",
"public function setRawContent($content);",
"function a... | [
"0.5742958",
"0.5548387",
"0.5508129",
"0.5469732",
"0.5444319",
"0.5350477",
"0.53329",
"0.5244999",
"0.5228491",
"0.51884985",
"0.51321983",
"0.51147246",
"0.5066204",
"0.50396997",
"0.5034574",
"0.50275093",
"0.5021501",
"0.5021501",
"0.5021501",
"0.5017015",
"0.5017015",
... | 0.5305827 | 7 |
Replaces the specified node with the given node. | final public function replaceChild(CtkBuildable $node, CtkBuildable $replace) {
throw new CakeException(sprintf('Unknown child %s', get_class($replace)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function replace(Node $node)\n {\n }",
"public function replaceValue(&$node, $name, $value) {\n\t\t$domElement = $this->getChildNode($node, $name);\n\t\tif (!is_null($domElement)) {\n\t\t\t$node->removeChild($domElement);\n\t\t\t$this->setValue($node, $value, $name, true);\n\t\t}\n\t}",
"public... | [
"0.83052725",
"0.7239726",
"0.70015186",
"0.6607099",
"0.64231855",
"0.6258045",
"0.6227687",
"0.6186882",
"0.6178768",
"0.5861413",
"0.5789779",
"0.5759568",
"0.5748731",
"0.5746",
"0.5729402",
"0.57170993",
"0.5703546",
"0.56936246",
"0.56610006",
"0.5636171",
"0.56270844",... | 0.5873422 | 9 |
Removes and returns a child node from this node. | final public function removeChild(CtkBuildable $node) {
throw new CakeException(sprintf('Unknown child %s', get_class($node)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function removeChild($child)\n {\n $child = $this->index($child);\n if ($child >= 0) {\n $this->nodes[$child]->parent = null;\n array_splice($this->nodes, $child, 1);\n if (!empty($this->indexes)) {\n foreach ($this->indexes as $id => $index) ... | [
"0.71099144",
"0.6816529",
"0.67181706",
"0.66345996",
"0.64185786",
"0.6307472",
"0.6117607",
"0.6117501",
"0.6114836",
"0.61138725",
"0.6066455",
"0.5985873",
"0.59855413",
"0.59137124",
"0.59124845",
"0.58872694",
"0.5883162",
"0.58308214",
"0.5822515",
"0.58078706",
"0.56... | 0.60962963 | 10 |
Removes all children from this node. | final public function clearChildren() {
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function clearChildren(): void\n {\n if ($this->children instanceof Collection) {\n $this->children = new Collection;\n return;\n }\n\n $this->children = [];\n }",
"public function removeChildNodes() {}",
"protected function deleteChildren() {}",
"priva... | [
"0.7502292",
"0.7184683",
"0.70725316",
"0.6909457",
"0.66480285",
"0.6436955",
"0.6329638",
"0.62436664",
"0.6186484",
"0.6150926",
"0.60017306",
"0.59897685",
"0.59644026",
"0.5884285",
"0.5877814",
"0.586493",
"0.58552337",
"0.5749035",
"0.5636031",
"0.55647415",
"0.556045... | 0.6882512 | 4 |
Determines if the node is allowed events. | final public function allowsEvents() {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static function allowedEvents()\n\t{\n\t\treturn array();\n\t}",
"protected static function allowedEvents()\n\t{\n\t\treturn array(\n\t\t\t\t\t\t'onclick',\n\t\t\t\t\t\t'ondblclick',\n\t\t\t\t\t\t'onmousedown',\n\t\t\t\t\t\t'onmouseup',\n\t\t\t\t\t\t'onmouseover',\n\t\t\t\t\t\t'onmousemove',\n\t\t\t\t\... | [
"0.6507748",
"0.61673623",
"0.61363316",
"0.6070249",
"0.6053544",
"0.59942406",
"0.5910554",
"0.58316106",
"0.5809283",
"0.58078367",
"0.5785749",
"0.57683766",
"0.57584107",
"0.5697767",
"0.56874067",
"0.56789976",
"0.5611035",
"0.56024045",
"0.55912614",
"0.55571294",
"0.5... | 0.71755666 | 0 |
Parses the template for the node. | final public function template($path) {
return '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _parseTemplate() {}",
"private function _processTemplate(\\DOMNode $node, array $path = [/** value is missing */], array &$dataPathCache = [/** value is missing */], $currentDataPath = '') {}",
"function parseTemplate() {\n $this->initParsing();\n $this->beginMainBlock();\n if (!$this-... | [
"0.7963959",
"0.67730635",
"0.6405399",
"0.6391035",
"0.6383359",
"0.6292401",
"0.6166923",
"0.6120286",
"0.60562384",
"0.6001131",
"0.59994847",
"0.595612",
"0.58189416",
"0.5811472",
"0.58111817",
"0.5807173",
"0.5764626",
"0.5761209",
"0.5728857",
"0.5715737",
"0.56773466"... | 0.0 | -1 |
Renders the node using the the view renderer. | final public function render() {
return $this->_view->getBaseView()->element($this->_name, $this->_data, $this->_options);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function renderView();",
"protected function render()\n {\n $this->renderer->exec();\n }",
"protected function render(){\n //render view\n \n }",
"protected function _render()\n {\n }",
"function Render() {\n $this->RenderChildren();\n }",
"priv... | [
"0.69817185",
"0.6945028",
"0.6757159",
"0.65225804",
"0.6485945",
"0.6441403",
"0.6441403",
"0.64333695",
"0.64333695",
"0.63641447",
"0.63601077",
"0.6354301",
"0.6354301",
"0.6354301",
"0.6354301",
"0.6354301",
"0.6354301",
"0.63515127",
"0.6349761",
"0.6346712",
"0.634507... | 0.64232635 | 9 |
Renders the child nodes of this node. | final public function renderChildren() {
return '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function renderChildren() {}",
"function Render() {\n $this->RenderChildren();\n }",
"function RenderChildren() {\n if ($this->HasControls()) {\n foreach($this->Controls as $control) {\n $control->Render();\n }\n }\n }",
"public function ... | [
"0.78030807",
"0.77022815",
"0.7259376",
"0.7007551",
"0.685497",
"0.67571235",
"0.6616756",
"0.6612959",
"0.66128385",
"0.6441183",
"0.6433968",
"0.6402696",
"0.6402696",
"0.6402696",
"0.6340813",
"0.6340813",
"0.6340813",
"0.6340813",
"0.6340813",
"0.6340813",
"0.6340813",
... | 0.68691784 | 4 |
Id Unittest with Regular expression Check digits because Id consist of only Digits | public function testThatWeCanGetTheId()
{
$ads = new Cities;
$ads->setId('1');
//$this->assertEquals($ads->getId(), '1');
$this->assertEquals(1 , preg_match( '/^[0-9]+$/', $ads->getId() ), $ads->getId() . ' is not a set of digits' );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function idFormat($value){\n \n if(!preg_match(VALID_INT_FORMAT,$value)){\n return false;\n }\n \n return true;\n\n}",
"function isValidStudentID($id){\n if(preg_match('/^\\d+$/', $id) && strlen($id) == 8){\n return true;\n }\n else{\n return false;\n }\n }",
"funct... | [
"0.7301074",
"0.70989186",
"0.7034525",
"0.6836522",
"0.6819846",
"0.67861956",
"0.66976845",
"0.6664169",
"0.6619569",
"0.6570407",
"0.65465444",
"0.64891106",
"0.64370906",
"0.6389786",
"0.6352944",
"0.62604386",
"0.62125146",
"0.62057936",
"0.62054217",
"0.6114142",
"0.611... | 0.75277257 | 0 |
Cities Unittest with Regular expression Check String(Lowercase, Uppercase) and Digits because Ac_Id consist of String & Digits | public function testThatWeCanGetTheCategories()
{
$ads = new Cities;
$ads->setCities('Waterloo');
$this->assertEquals(1 , preg_match( '/^[a-zA-Z]{3,30}$/', $ads->getCities() ), $ads->getCities() . ' is less 3 or more 31' );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testThatWeCanGetTheId()\n {\n $ads = new Cities;\n \n $ads->setId('1');\n \n \n //$this->assertEquals($ads->getId(), '1');\n $this->assertEquals(1 , preg_match( '/^[0-9]+$/', $ads->getId() ), $ads->getId() . ' is not a set of digits' );\n\n\n }... | [
"0.6448094",
"0.5794556",
"0.56666297",
"0.5577351",
"0.5554657",
"0.5548007",
"0.5533867",
"0.55268145",
"0.541211",
"0.53914994",
"0.5359269",
"0.5347262",
"0.5345646",
"0.5343187",
"0.53343713",
"0.5292221",
"0.52845764",
"0.5280481",
"0.52538395",
"0.5251958",
"0.5250439"... | 0.6176894 | 1 |
TODO opportunity to fix | public function productPrices()
{
return $this->belongsToMany(ProductPrice::class, 'product_prices', null, 'product_id');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function fixSelf() {}",
"protected function fixSelf() {}",
"protected function __init__() { }",
"public function helper()\n\t{\n\t\n\t}",
"private function __construct()\t{}",
"final private function __construct(){\r\r\n\t}",
"private function __() {\n }",
"protected function _pr... | [
"0.5706767",
"0.5706767",
"0.5576486",
"0.54688895",
"0.5390365",
"0.5352551",
"0.5351307",
"0.5333488",
"0.5333488",
"0.5333488",
"0.5333488",
"0.53263783",
"0.53209686",
"0.53209686",
"0.53209686",
"0.53209686",
"0.53209686",
"0.53209686",
"0.53207207",
"0.53207207",
"0.532... | 0.0 | -1 |
Returns the parsed upload_paths for $record's uploads | public static function determine_folder_path(\DataObject $record)
{
// Grab paths
$paths = Config::inst()->get(__CLASS__, 'upload_paths');
// Grab ancestry from top-down
$className = get_class($record);
$classes = array_reverse(ClassInfo::ancestry($className));
$pat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function uploadGetUploadedFilesList($fieldName)\n\t{\n\t\t$returnValue = [];\n\n\t\t$fileString = $this->getObjectData($fieldName);\n\t\tif (!empty($fileString)) {\n\t\t\t$filesArray = explode(\"#\", $fileString);\n\t\t\tforeach ($filesArray as $fullFilePath) {\n\t\t\t\tif (!empty($fullFilePath)) {\n\t\t\t\... | [
"0.606116",
"0.60114723",
"0.5939847",
"0.58901644",
"0.5739032",
"0.5711511",
"0.5705625",
"0.56313145",
"0.5467583",
"0.54382384",
"0.5411503",
"0.53950095",
"0.5389481",
"0.53644305",
"0.53644305",
"0.5335713",
"0.53040653",
"0.5287242",
"0.52597153",
"0.5247577",
"0.52084... | 0.5677413 | 7 |
Handler for timelane setup storage into sessions. | public function handleStoreDate($yearFrom,$monthFrom,$yearTo,$monthTo)
{
$session = $this->session->getSection('map');
$session->dateFrom = array('Year'=>$yearFrom,'Month'=>$monthFrom);
$session->dateTo = array('Year'=>$yearTo,'Month'=>$monthTo);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setup()\n {\n $_SESSION = array();\n $_SESSION['security'] = array(\n 'user-agent' => md5(empty($_SERVER['HTTP_USER_AGENT']) ? '' : $_SERVER['HTTP_USER_AGENT']),\n 'ip' => $_SERVER['REMOTE_ADDR'],\n 'start' => time()\n );\n $_SESSION['stores... | [
"0.6556193",
"0.63545746",
"0.6354262",
"0.62131435",
"0.61086285",
"0.60772276",
"0.6041215",
"0.59287906",
"0.588352",
"0.5870326",
"0.574875",
"0.5666511",
"0.56540185",
"0.5650061",
"0.56337",
"0.5615553",
"0.5569826",
"0.556885",
"0.5558049",
"0.55578446",
"0.55538243",
... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.