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 |
|---|---|---|---|---|---|---|
get the vector objects to hide, added via laravelpostgres module | public function gethiddenObjLow()
{
return self::accessPgArray($this->hiddenbuildingsLow);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHideInList() {}",
"static function listHiddenExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE visible = FALSE ORDER BY creation_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exh... | [
"0.56201726",
"0.56047946",
"0.5516188",
"0.5451353",
"0.5441552",
"0.5438562",
"0.5432635",
"0.5421956",
"0.53526276",
"0.5343734",
"0.534103",
"0.5330038",
"0.5254642",
"0.524294",
"0.52314895",
"0.52264404",
"0.5212517",
"0.5211298",
"0.5204854",
"0.51964754",
"0.51964754"... | 0.0 | -1 |
Retorna a lista de arquivos Javascript | public static function getJs() {
return self::get('_js', array());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFiles ();",
"public function getFiles();",
"public function getFiles();",
"public function getFiles();",
"function arquivos() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\t\t$templateMgr =& TemplateManager::getManager();\n\n\t\t//carregar lista de arquivos:\n\t\t$template... | [
"0.71901864",
"0.7148936",
"0.7148936",
"0.7148936",
"0.70244753",
"0.6985555",
"0.6947344",
"0.6922616",
"0.68358403",
"0.68358403",
"0.68358403",
"0.6819728",
"0.6786284",
"0.6774349",
"0.6745213",
"0.67362034",
"0.67323464",
"0.67239803",
"0.6684824",
"0.66447055",
"0.6638... | 0.0 | -1 |
Retorna a lista de arquivos CSS | public static function getCss() {
return self::get('_css', array());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function findCssFiles();",
"public function getCSSFiles() {\n //je krijgt op het einde .. en . terug, deze mag je niet opnemen in je links\n $cssFiles = scandir(\"css\", 1);\n \n return $cssFiles;\n }",
"function get_css_files() {\n\t$csslist = array();\n\n\t// List pfSense files... | [
"0.7980199",
"0.7705979",
"0.7662851",
"0.7594721",
"0.7503362",
"0.7484169",
"0.7431319",
"0.7413066",
"0.72974855",
"0.72974855",
"0.72279865",
"0.7216365",
"0.7172619",
"0.71657825",
"0.7154179",
"0.711784",
"0.7116806",
"0.6983952",
"0.6909629",
"0.68976116",
"0.68697286"... | 0.69740456 | 18 |
$sql="SElECT From stage e inner join formationphp.stage a on e.cin= a.cin"; | function afficherstages(){
$sql="SElECT * From stage";
$db = config::getConnexion();
try{
$liste=$db->query($sql);
return $liste;
}
catch (Exception $e){
die('Erreur: '.$e->getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function joins()\r\n {\r\n /* SELECT* FROM DOCUMENT WHERE DOCUMENT.\"id\" IN ( SELECT ID FROM scholar WHERE user_company_id = 40 )*/\r\n\r\n $query = EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n ... | [
"0.5885986",
"0.5661132",
"0.5364603",
"0.5356815",
"0.5264715",
"0.5243854",
"0.52430826",
"0.522154",
"0.51881987",
"0.5163535",
"0.51398206",
"0.51397425",
"0.51204646",
"0.51117957",
"0.50816417",
"0.50795937",
"0.5040926",
"0.5037547",
"0.50320095",
"0.5029383",
"0.50244... | 0.55641544 | 2 |
Display a listing of the resource. | public function index()
{
// $messages = Message::all();
$messages = Message::get();
return view('messages.index', compact('messages') );
} | {
"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('messages.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)
{
$validated = $request->validate([
// 'name' => 'required',
// 'email' => 'required',
'message' => 'required',
]);
$message = new Message( $validated );
if ( auth()->check() )
{
// $use... | {
"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(Message $message)
{
//
} | {
"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(Message $message)
{
//
} | {
"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, Message $message)
{
//
} | {
"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(Message $message)
{
//
} | {
"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 |
Run the database seeds. | public function run()
{
$leave_type = new \App\LeaveType();
$leave_type->leave_code = 'VL';
$leave_type->leave_description = 'Vacation Leave';
$leave_type->save();
$leave_type = new \App\LeaveType();
$leave_type->leave_code = 'SL';
$leave_type->leave_descript... | {
"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 |
alternate between 2 books | public function __construct()
{
if ('odd' != self::$oddOrEven) {
$this->author = 'David Sklar and Adam Trachtenberg';
$this->title = 'PHP Cookbook';
self::$oddOrEven = 'odd';
}
$this->author = 'Rasmus Lerdorf and Kevin Tatroe';
$this->title = 'Pr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateBookTag()\n {\n\t\tif (intval($this->type_flag) === ENTRY_TYPE_BOOK)\n\t\t{\n\t\t\t// non-book may have been changed to book\n\t\t\t$this->addBookTag();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// in case book was changed to non-book\n\t\t\t$this->removeBookTag();\n\t\t}\n\t}",
"public function ge... | [
"0.6012918",
"0.5858289",
"0.5700511",
"0.5555178",
"0.55465615",
"0.5521223",
"0.5447774",
"0.54476434",
"0.53988624",
"0.5355919",
"0.5329269",
"0.5308581",
"0.5279037",
"0.5214918",
"0.5195621",
"0.5185803",
"0.51627153",
"0.5153283",
"0.5142592",
"0.5140316",
"0.5138095",... | 0.0 | -1 |
alternate randomly between 2 books | public function __construct()
{
mt_srand((int)microtime() * 10000000);
$randNum = mt_rand(0, 1);
if (1 < $randNum) {
$this->author = 'Christian Wenz';
$this->title = 'PHP Phrasebook';
}
$this->author = 'George Schlossnagle';
$this->title = 'A... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function orderRandom();",
"private function getRecommendedBooks($book, $book_id)\n {\n $genre_id = $book->getGenre()->getId();\n $author_id = $book->getAuthor()->getId(); \n $entityManager = $this->getDoctrine()->getManager();\n $conn = $entityManager->getConnection()... | [
"0.6348684",
"0.62760097",
"0.59678096",
"0.5967124",
"0.59624064",
"0.58881307",
"0.57251835",
"0.56926435",
"0.56852967",
"0.5627833",
"0.56147295",
"0.5578866",
"0.5551529",
"0.5540592",
"0.5456183",
"0.5441198",
"0.5421628",
"0.54120016",
"0.54053587",
"0.53914946",
"0.53... | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$pages = Page::get();
return view("admin.pages.index")
->with(compact('pages',$pages));
} | {
"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()
{
$page = new Page;
$pages = Page::where('id', '!=', $page->id)->get();
$auth = Auth::user();
$users = User::get();
$templates = Template::get();
$image = null;
$imagefiles = null;
foreach($users as $user) {
if($aut... | {
"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)
{
$regex = '/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/';
$validatedData = $request->validate([
'path' => 'required',
'title' => 'required|max:255',
'seo_title' => 'max:255',
'og_image' => '... | {
"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)
{
//
} | {
"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)
{
$page = Page::findOrFail($id);
$pages = Page::where('id', '!=', $page->id)->get();
$auth = Auth::user();
$users = User::get();
$image = $page->images->first();
$templates = Template::get();
return view('admin.pages.edit')
... | {
"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.7855196",
"0.76957726",
"0.7273917",
"0.7241426",
"0.71717227",
"0.7064183",
"0.70528984",
"0.69836885",
"0.694763",
"0.69469565",
"0.6941572",
"0.69301945",
"0.6903868",
"0.68989486",
"0.68989486",
"0.68787694",
"0.68641657",
"0.6860115",
"0.6857286",
"0.68464494",
"0.683... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$regex = '/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/';
$validatedData = $request->validate([
'path' => 'required',
'title' => 'required|max:255',
'seo_title' => 'max:255',
'og_image... | {
"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)
{
$page = Page::findOrFail($id);
$page->delete();
return redirect()->route('admin.pages');
} | {
"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 |
empty trashed post single item | public function destroytrashed($id)
{
$page = Page::onlyTrashed()->findOrFail($id);
$page->categories()->sync([]);
$page->slug->delete();
$page->forceDelete();
return redirect()->route('admin.pages.trash');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function trashed_post($post_id)\n {\n }",
"public function trashed_posts()\n\t{\n\t\t$data['posts'] = $this->common_model->getAllData('blog_post','*','',array('deleted_at !=' => 'Null'));\n\n\t\t$data['page'] = \"blog/trashed_posts\";\n \t$this->template->template_view($data);\t\n\t}",
"publi... | [
"0.66220754",
"0.6438582",
"0.6377596",
"0.63097525",
"0.61426586",
"0.60319275",
"0.6024002",
"0.5979271",
"0.5858699",
"0.58542657",
"0.58323395",
"0.58235645",
"0.58207756",
"0.5792331",
"0.5737186",
"0.5737168",
"0.572542",
"0.570757",
"0.56476873",
"0.56232256",
"0.56172... | 0.0 | -1 |
empty all trashed posts at once | public function emptytrash() {
$pages = Page::onlyTrashed()->get();
foreach($pages as $page) {
$page->slug->delete();
$page->forceDelete();
}
return redirect()->route('admin.pages.trash');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function removeAllPosts() {}",
"public function clearPostIndexs()\n\t{\n\t\t$this->collPostIndexs = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function trashed_posts()\n\t{\n\t\t$data['posts'] = $this->common_model->getAllData('blog_post','*','',array('del... | [
"0.70051914",
"0.6962962",
"0.6904693",
"0.6723057",
"0.6503081",
"0.64129955",
"0.63915837",
"0.63674873",
"0.63504106",
"0.63281375",
"0.63281375",
"0.6326946",
"0.6317248",
"0.6316123",
"0.62905115",
"0.62790275",
"0.62756115",
"0.6273807",
"0.6268743",
"0.6250929",
"0.622... | 0.6661631 | 4 |
restore trashed post single item | public function restoretrashed($id)
{
$page = Page::onlyTrashed()->findOrFail($id);
$page->restore();
return redirect()->route('admin.pages.trash');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function restoreTrashedItems()\n {\n $trashedItems = Item::onlyTrashed()->get();\n foreach ($trashedItems as $item) {\n $item->restore();\n }\n\n }",
"public function restored(Post $post)\n {\n //\n }",
"public function restored(Post $post)\n {\n ... | [
"0.749934",
"0.7450364",
"0.7450364",
"0.6838015",
"0.6838015",
"0.6816885",
"0.6800222",
"0.674118",
"0.6503433",
"0.6496795",
"0.64947575",
"0.6453908",
"0.6439421",
"0.6386067",
"0.638073",
"0.6347891",
"0.63362664",
"0.6304327",
"0.6246267",
"0.62184477",
"0.6179735",
"... | 0.54846776 | 74 |
restore all trashed posts | public function restoretrash() {
$pages = Page::onlyTrashed()->get();
foreach($pages as $page) {
$page->restore();
}
return redirect()->route('admin.pages');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function restoreTrashedItems()\n {\n $trashedItems = Item::onlyTrashed()->get();\n foreach ($trashedItems as $item) {\n $item->restore();\n }\n\n }",
"public function restoreAllTrashed()\n {\n return $this->model->withTrashed()->restore();\n }",
"pub... | [
"0.793516",
"0.78645676",
"0.75180626",
"0.7009122",
"0.69669116",
"0.69669116",
"0.6661088",
"0.66356534",
"0.66042733",
"0.65506727",
"0.6523616",
"0.64810157",
"0.64680654",
"0.6456855",
"0.6449989",
"0.6444507",
"0.63709474",
"0.6336842",
"0.62940454",
"0.6223377",
"0.621... | 0.7240323 | 3 |
Find rate based on location and calendar? (//TODO) | public function getRuleAttribute(){
$pickupZipcode = $this->pickup_address_zipcode;
$rule = \App\Rule::whereHas('locations', function($query) use($pickupZipcode){
$query->where('zipcode',$pickupZipcode);
})->first();
return $rule;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_result($db, $location) {\n\t\t$lat = $location['lat'];\n\t\t$lng = $location['lng'];\n\t\t\n\t\t// Get the API-format force and neighbourhood IDs.\n\t\t$forceAndNhoodObj = getForceAndNhood($lat, $lng);\n\t\t$force = $forceAndNhoodObj->force;\n\t\t$neighbourhood = $forceAndNhoodObj->neighbourhoo... | [
"0.6051194",
"0.6046116",
"0.60363394",
"0.5929003",
"0.59093875",
"0.58738256",
"0.5805983",
"0.56745636",
"0.548379",
"0.5468481",
"0.540387",
"0.53973675",
"0.53865564",
"0.5377251",
"0.5269662",
"0.52636456",
"0.5255585",
"0.52458566",
"0.5197948",
"0.51747507",
"0.517149... | 0.0 | -1 |
Run the database seeds. | public function run()
{
\DB::table('surat_korespondensi')->insert(array (
0 =>
array(
'name'=>'Surat Pernyataan',
'location'=>'uploads/suratkorespondensi/surat-pernyataan.doc',
),
1=>
array(
'name'=>'... | {
"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 |
Run the database seeds. | public function run()
{
DB::table('empresas')->insert([
'nome' => 'EMPRESA A',
'cnpj' => '11122233344455566699',
'email' => 'empresaa@email.com',
'telefone' => '2222-3333',
]);
} | {
"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 |
hasMany association via Containable. Should still work when Linkable is loaded | public function testHasMany()
{
$arrayExpected = array(
'User' => array('id' => 1, 'username' => 'CakePHP'),
'Comment' => array(
0 => array(
'id' => 1,
'user_id' => 1,
'body' => 'Text'
),
1 => array(
'id' => 2,
'user_id' => 1,
'body' => 'Text'
),
)
);
$... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHasMany()\n {\n return $this->hasMany;\n }",
"public function hasMany($class, $foreignKey = null, $localKey = null);",
"public function setupAssociations() \n {\n \n }",
"public function testGetModelAssociation()\n {\n $user = new User();\n $assoc = $use... | [
"0.6094528",
"0.595812",
"0.59501624",
"0.5852159",
"0.5839466",
"0.5734061",
"0.5734061",
"0.5734061",
"0.5734061",
"0.5734061",
"0.5734061",
"0.5734061",
"0.5734061",
"0.5734061",
"0.57265776",
"0.5725272",
"0.5712776",
"0.5712776",
"0.5712776",
"0.5712776",
"0.5712776",
... | 0.7353375 | 0 |
Series of tests that assert if Linkable can adapt to assocations that have aliases different from their standard model names | public function testNonstandardAssociationNames()
{
$this->Tag =& ClassRegistry::init('Tag');
$arrayExpected = array(
'Tag' => array(
'name' => 'Test I'
),
'Parent' => array(
'name' => 'General'
)
);
$arrayResult = $this->Tag->find('first', array(
'fields' => array(
'name'
),
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAssociationsSameAliases(): void\n {\n foreach (['Pages', 'Posts'] as $name) {\n /** @var \\MeCms\\Model\\Table\\PagesTable|\\MeCms\\Model\\Table\\PostsTable $Table */\n $Table = $this->getTable('MeCms.' . $name);\n $this->assertBelongsTo($Table->Catego... | [
"0.676927",
"0.6089807",
"0.60741633",
"0.59750825",
"0.5933333",
"0.5844251",
"0.5828566",
"0.58260363",
"0.5812981",
"0.57350504",
"0.5729496",
"0.5690536",
"0.5611303",
"0.5581695",
"0.5544663",
"0.5539207",
"0.55224174",
"0.5512869",
"0.54575145",
"0.5445433",
"0.5391807"... | 0.63849884 | 1 |
Determine if the user is authorized to make this request. | public function authorize()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }"... | [
"0.8399559",
"0.8375976",
"0.8375976",
"0.8342963",
"0.825244",
"0.824597",
"0.82116634",
"0.81456405",
"0.81095356",
"0.80819404",
"0.79899764",
"0.7988185",
"0.79821676",
"0.7959435",
"0.79494536",
"0.79476935",
"0.7925",
"0.7913219",
"0.78985447",
"0.7892049",
"0.7888783",... | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
$types = TypeService::get();
$codes = $types->pluck('code')->toArray();
return [
'service_type' => Rule::in($codes),
'start_date' => 'date_format:Y-m-d',
'end_date' => 'date_format:Y-m-d',
'page_number' => 'integer|mi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the sche... | [
"0.8342703",
"0.80143493",
"0.7937251",
"0.79264987",
"0.79233825",
"0.79048395",
"0.78603816",
"0.7790699",
"0.77842164",
"0.77628785",
"0.7737272",
"0.7733618",
"0.7710535",
"0.7691693",
"0.76849866",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.76830... | 0.0 | -1 |
Get custom attributes for validator errors. | public function attributes()
{
return [
'service_type' => 'tipo del servicio',
'start_date' => 'fecha de inicio',
'end_date' => 'fecha final',
'page_number' => 'número de página',
'page_size' => 'cantidad de registros',
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getErrors() {\n return @$this->attributes['errors'];\n }",
"public function getValidationErrors();",
"public function getValidationErrors();",
"public function getErrors(): array {\n return $this->validationError;\n }",
"public function getErrors($attr){\n return $this-... | [
"0.6837745",
"0.67689437",
"0.67689437",
"0.6511477",
"0.6446034",
"0.6429277",
"0.6383794",
"0.6322668",
"0.63129574",
"0.6303574",
"0.630143",
"0.6273141",
"0.6257446",
"0.6247686",
"0.62254447",
"0.62107867",
"0.6203077",
"0.6186894",
"0.61815155",
"0.61815155",
"0.615586"... | 0.0 | -1 |
Get the error messages for the defined validation rules. | public function messages()
{
return [
'service_type.in' => 'El :attribute seleccionado no existe',
'start_date.date_format' => 'La :attribute es inválida',
'end_date.date_format' => 'La :attribute es inválida',
'page_number.integer' => 'El :attribute debe ser ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getValidationMessages();",
"public function errorMessages()\n {\n return [\n self::RULE_REQUIRED => 'This field is required',\n self::RULE_EMAIL => 'This field must be a valid email address',\n self::RULE_MIN => 'Min length of this field must be {min}',\... | [
"0.82462656",
"0.8072122",
"0.79855305",
"0.7869173",
"0.7831077",
"0.7776483",
"0.7776483",
"0.7589036",
"0.75582355",
"0.75402904",
"0.75402904",
"0.7525044",
"0.75227535",
"0.7516879",
"0.7475822",
"0.7457696",
"0.7425241",
"0.74180096",
"0.7405273",
"0.7405273",
"0.740048... | 0.0 | -1 |
Auto generated seed file | public function run()
{
\DB::table('users')->delete();
\DB::table('users')->insert(array (
0 =>
array (
'id' => 1,
'name' => 'Optimus Prime',
'email' => 'optimus.prime@email.com',
'email_verif... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function main() {\n\n $fs = new Filesystem();\n\n $fs->touch($this->getTargetFile());\n\n $seedProperties = Yaml::parse(file_get_contents($this->getSeedFile()));\n $generatedProperties = [];\n\n $generatedProperties['label'] = $seedProperties['project_label'];\n $generatedProperties['machi... | [
"0.741271",
"0.72163844",
"0.71867263",
"0.7150963",
"0.7011614",
"0.6992453",
"0.6889081",
"0.6877449",
"0.68096465",
"0.679051",
"0.67819595",
"0.6763185",
"0.6725394",
"0.67226577",
"0.67199546",
"0.67100257",
"0.6709864",
"0.67040205",
"0.6703833",
"0.66986066",
"0.668487... | 0.0 | -1 |
Handle the component "created" event. | public function created(Component $component): void
{
Component::unsetEventDispatcher();
$this->componentService->calculateComponentCost($component);
$this->componentService->calculateVendorSummaryData($component);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function onCreated()\n {\n parent::onCreated();\n\n }",
"public function onCreated()\n {\n parent::onCreated();\n\n }",
"function on_creation() {\n $this->init();\n }",
"public function created(Carousel $carousel)\n {\n //\n }",
"protected function on... | [
"0.6768169",
"0.6768169",
"0.6395557",
"0.6100263",
"0.6006277",
"0.59336686",
"0.5907307",
"0.5880735",
"0.584681",
"0.5836324",
"0.57516813",
"0.57457924",
"0.56784314",
"0.56783175",
"0.5610983",
"0.5610705",
"0.5610705",
"0.5538262",
"0.55296296",
"0.55296296",
"0.5476722... | 0.6632512 | 2 |
Handle the component "updated" event. | public function updated(Component $component): void
{
Component::unsetEventDispatcher();
if (($component->price * $component->quantity) !== $component->cost) {
$this->componentService->calculateComponentCost($component);
}
$this->componentService->calculateVendorSummaryD... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _update()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }",
"public function onUpdate();",
"public function onUpdate();",
"public function onUpdate();",
"public function update() {\n parent::update();\n }",
"function update() {\n\n\t\t\t}",
"protected function onUpdated()\n ... | [
"0.678612",
"0.6778121",
"0.6778121",
"0.6778121",
"0.6544253",
"0.65122026",
"0.64552474",
"0.6402792",
"0.6355825",
"0.63345456",
"0.63054866",
"0.63054866",
"0.63053733",
"0.63007796",
"0.628835",
"0.6226261",
"0.62261045",
"0.6217284",
"0.6217057",
"0.6205569",
"0.6191589... | 0.6288195 | 15 |
Handle the component "deleted" event. | public function deleted(Component $component): void
{
$this->componentService->calculateVendorSummaryData($component);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($event): void;",
"public function handleDeleted(Deleted $event): void\n {\n $entity = $event->entity();\n\n $this->scheduleRemovingOldDocuments($entity);\n\n $this->elasticsearchManager->commit();\n }",
"public function handleDelete()\n {\n Craft::$ap... | [
"0.666745",
"0.6619573",
"0.66077155",
"0.6578753",
"0.6546198",
"0.6519532",
"0.6517223",
"0.65046895",
"0.6459175",
"0.6406338",
"0.6384553",
"0.63773406",
"0.637023",
"0.6350102",
"0.6342248",
"0.6338906",
"0.6334008",
"0.62902874",
"0.62872356",
"0.6258356",
"0.6242306",
... | 0.633947 | 15 |
Handle the component "restored" event. | public function restored(Component $component): void
{
$this->deleted($component);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function onRestored()\n {\n return true;\n }",
"public function restored(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('restored'));\n\n // Once the model is restored, we need to put everything back\n // as before, in case a legitimate update event ... | [
"0.65210575",
"0.61875516",
"0.61613244",
"0.60520685",
"0.60490227",
"0.6048713",
"0.5973947",
"0.59321374",
"0.5862599",
"0.5844413",
"0.5838455",
"0.5788107",
"0.57601583",
"0.57259643",
"0.5720458",
"0.57182884",
"0.571504",
"0.57117707",
"0.5710344",
"0.56973714",
"0.560... | 0.57256204 | 14 |
Handle the component "force deleted" event. | public function forceDeleted(Component $component): void
{
$this->deleted($component);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function onBeforeDelete();",
"public function onAfterDelete() {\n\t\tif (!$this->owner->ID || self::get_disabled() || self::version_exist($this->owner))\n\t\t\treturn;\n\t\t$this->onAfterDeleteCleaning();\n\t}",
"public function onBeforeDelete() {\r\n\t\tparent::onBeforeDelete();\r\n\t}",
"protected f... | [
"0.7080198",
"0.68940115",
"0.67980456",
"0.6640968",
"0.6623612",
"0.66043544",
"0.6597772",
"0.65896666",
"0.65551203",
"0.64782083",
"0.64726335",
"0.6470392",
"0.6469977",
"0.6433294",
"0.63960475",
"0.6381471",
"0.6332204",
"0.6326768",
"0.63226116",
"0.63216555",
"0.631... | 0.69639486 | 1 |
How to delete more than one data at a time. | function deleteUserDB($id){
$data = User::find($id);
session()->flash('deleteUser',$data['username']);
$data->delete();
return redirect('user/rabin?age=20');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testDeleteBatch()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testDelete_Multi()\n {\n \t$this->conn->delete('test', array('status'=>'ACTIVE'), DB::MULTIPLE_ROWS);\n \t$result = $this->conn->query(\"SELECT * FROM tes... | [
"0.6842874",
"0.6816655",
"0.6777981",
"0.6776122",
"0.67141646",
"0.6675214",
"0.6675214",
"0.6675214",
"0.66217214",
"0.659393",
"0.6587396",
"0.655104",
"0.653338",
"0.6532226",
"0.6477395",
"0.64518595",
"0.64196205",
"0.6414078",
"0.6404016",
"0.63721484",
"0.6342676",
... | 0.0 | -1 |
return ['name'=>"rabin",'age'=>34]; // api return | public function index_func($user){
echo " Hello from controller ".$user;
$data = ['rabin','sabin',$user];
return view("user",['name'=>$data]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function api() {\n return [\n \"done\" => true,\n \"param\"=> defaultValue(Request::POST(\"test\"), \"test\")\n ]; // You can also use Response::json([...]);\n }",
"function responseApi(Array $req)\n{\n\treturn json_encode(callApiRequest($req));\n}",
"public... | [
"0.70017314",
"0.66872716",
"0.6637492",
"0.6425813",
"0.6403793",
"0.6388049",
"0.6387312",
"0.632844",
"0.63279146",
"0.6312716",
"0.62956774",
"0.62469304",
"0.6238222",
"0.61838764",
"0.61635375",
"0.6162505",
"0.6161848",
"0.6142688",
"0.6119299",
"0.6112848",
"0.6106328... | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$assignments=Assignment::orderBy('created_at')->get();
return view('back.teacher.assignment.index', compact('assignments'));
} | {
"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()
{
$classes=Stdclass::orderBy('order')->get();
return view('back.teacher.assignment.create', compact('classes'));
} | {
"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,[
'name'=>'required',
'description'=>'required',
'class'=>'required',
'file'=>'required|file|mimes:pdf,docx|max:2125',
'submission_date'=>'required|date'
]);
$input=... | {
"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)
{
$assignment=Assignment::findOrFail($id);
return view('back.teacher.assignment.view', compact('assignment'));
} | {
"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)
{
$classes=Stdclass::orderBy('order')->get();
$assignment=Assignment::findOrFail($id);
if($assignment->teacher_id != Auth::guard('teacher')->user()->id){
abort('403');
}
return view('back.teacher.assignment.edit', compact('assignment','cl... | {
"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.7855196",
"0.76957726",
"0.7273917",
"0.7241426",
"0.71717227",
"0.7064183",
"0.70528984",
"0.69836885",
"0.694763",
"0.69469565",
"0.6941572",
"0.69301945",
"0.6903868",
"0.68989486",
"0.68989486",
"0.68787694",
"0.68641657",
"0.6860115",
"0.6857286",
"0.68464494",
"0.683... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$assignment=Assignment::findOrFail($id);
if($assignment->teacher_id != Auth::guard('teacher')->user()->id){
abort('403');
}
$this->validate($request,[
'name'=>'required',
'description'=>'required',... | {
"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)
{
$assignment=Assignment::findOrFail($id);
if($assignment->teacher_id != Auth::guard('teacher')->user()->id){
abort('403');
}
if($assignment->file && File::exists($assignment->file)){
unlink($assignment->file);
}
... | {
"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 |
Display a listing of the resource. | public function index()
{
//
$users = User::orderBy('created_at', 'asc')->paginate(5);
return view('index')->with('users', $users);
;
} | {
"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 |
Display a listing of the resource. | public function index()
{
$result=termin::join('treners','termins.trener_id','=','treners.id')
->get(['termins.*','treners.ime','treners.prezime']);
return $result;
} | {
"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)
{
$termin=new termin();
$termin->dan=$request->dan;
$termin->vreme=$request->vreme;
$termin->broj=$request->broj;
$termin->trener_id=$request->trener_id;
$termin->save();
} | {
"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)
{
//
} | {
"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.7855196",
"0.76957726",
"0.7273917",
"0.7241426",
"0.71717227",
"0.7064183",
"0.70528984",
"0.69836885",
"0.694763",
"0.69469565",
"0.6941572",
"0.69301945",
"0.6903868",
"0.68989486",
"0.68989486",
"0.68787694",
"0.68641657",
"0.6860115",
"0.6857286",
"0.68464494",
"0.683... | 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)
{
$termin = termin::find($id);
$termin->delete();
} | {
"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 |
SPECIAL METHODS Get formatted timestamp | public function getFormattedTimestamp()
{
/** @var \DateTime $date */
$date = $this->timestamp;
return $date->format('c');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _getFormattedTimestamp()\n {\n return gmdate(\"Y-m-d\\TH:i:s.\\\\0\\\\0\\\\0\\\\Z\", time());\n }",
"public function getTimestampFormatter();",
"private function getTimestamp()\n {\n $originalTime = microtime(true);\n $micro = sprintf(\"%06d\", ($originalTime - floor($ori... | [
"0.8047004",
"0.78799176",
"0.78283054",
"0.7824464",
"0.777471",
"0.7606694",
"0.74534893",
"0.7443978",
"0.74056464",
"0.73787403",
"0.73418",
"0.73418",
"0.73418",
"0.73198974",
"0.7290967",
"0.728833",
"0.7263474",
"0.72567374",
"0.71935016",
"0.71570927",
"0.7120692",
... | 0.79143983 | 1 |
USER_INTERFACE METHODS Implemented from abstract class UserInterface | public function getUsername()
{
return $this->email;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function interface();",
"abstract public function user();",
"public function getUser(): UserInterface;",
"public function getUser(): UserInterface;",
"abstract protected function getUser();",
"function is_user( $user )\n {\n //Unimplemented\n }",
"protected abstract function per... | [
"0.7331235",
"0.6790498",
"0.6502027",
"0.6502027",
"0.6417516",
"0.59312016",
"0.58290297",
"0.5781559",
"0.5766519",
"0.5659812",
"0.56468564",
"0.5589241",
"0.5551665",
"0.55471593",
"0.5546502",
"0.5481254",
"0.5480946",
"0.5472573",
"0.5470104",
"0.54681706",
"0.54401255... | 0.0 | -1 |
GETTERs AND SETTERs Get userId | public function getUserId()
{
return $this->userId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getUserId() {}",
"protected function getUserId() {}",
"public function getUserId()\n {\n return $this->userId;\n }",
"abstract protected function getUserId() ;",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function ge... | [
"0.8000435",
"0.8000435",
"0.7869293",
"0.78193116",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7779641",
"0.7757321",
"0.77570593",
"0.7748218",
"0.7671871",
"0.7671739",
"0.7651008",
"0.7626259",
... | 0.7694645 | 30 |
OBJECT REL: G & S Add pointLogs | public function addPointLog(PointLog $pointLog)
{
$this->pointLogs[] = $pointLog;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function logData() {\n\t\t/* Implement in subclasses */\n\t}",
"public function push_point_info() {\n\t\t$this->_check_access(); //拒绝非法IP执行任务\n\t\t$this->_write_log(__FUNCTION__);\n\t\t$this->load->model('soma/sales_point_model', 'sp_model');\n\t\t$res = $this->sp_model->push_point_info();\n\t\techo $r... | [
"0.5882027",
"0.5845073",
"0.5776313",
"0.55127645",
"0.5450185",
"0.5422141",
"0.5414006",
"0.54099333",
"0.53733206",
"0.5344187",
"0.5336569",
"0.532173",
"0.5271386",
"0.52552986",
"0.5253111",
"0.5253002",
"0.52490354",
"0.52489287",
"0.52283686",
"0.5225554",
"0.5223989... | 0.5963407 | 0 |
Returns DB table name for entity. | public static function getTableName()
{
return 'b_timeman_monitor_comment';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTableName(): string\n {\n return $this->getEntityDao()->getTableName();\n }",
"public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }",
"public static function getTableName()\n {\n return self::getDatabaseName() . ... | [
"0.8195651",
"0.7825781",
"0.77575964",
"0.77522725",
"0.7682072",
"0.7679911",
"0.7655929",
"0.7643668",
"0.7620185",
"0.7599329",
"0.7584867",
"0.7509939",
"0.7507627",
"0.74633884",
"0.7452192",
"0.74252176",
"0.74170417",
"0.7393153",
"0.7393153",
"0.7393153",
"0.73864293... | 0.0 | -1 |
Returns entity map definition. | public static function getMap()
{
return [
new IntegerField(
'ID',
[
'primary' => true,
'autocomplete' => true,
'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_ID_FIELD')
]
),
new IntegerField(
'USER_LOG_ID',
[
'required' => true,
'title' => Loc::getMessage('M... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\t'ORDER_NEW_TASK' => new Entity\\StringField('ORDER_NEW_TASK', array(\n\t\t\t\t'required' => true\n\t\t\t))\n\t\t);\n\t}",
"pub... | [
"0.6637542",
"0.6594023",
"0.648225",
"0.64311457",
"0.64077604",
"0.6392645",
"0.6384917",
"0.6319827",
"0.629275",
"0.6263408",
"0.6239673",
"0.6159177",
"0.61396015",
"0.6062293",
"0.60510415",
"0.59983045",
"0.59882057",
"0.5968825",
"0.59648436",
"0.596274",
"0.596274",
... | 0.5309036 | 65 |
Create a new controller instance. | public function __construct()
{
$this->middleware('auth');
} | {
"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 |
Show the application dashboard. | public function index()
{
$is_current_month = !request()->get('next');
$days_in_month = date('t', strtotime($is_current_month ? 'now' : '+1 month'));
$month_number = date('n', strtotime($is_current_month ? 'now' : '+1 month'));
$year_number = date('y', strtotime($is_current_month ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }",
"function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}",
"public function showDashboard() { \n\t\n ... | [
"0.77850926",
"0.7760142",
"0.7561336",
"0.75147176",
"0.74653697",
"0.7464913",
"0.73652893",
"0.7351646",
"0.7346477",
"0.73420244",
"0.7326711",
"0.7316215",
"0.73072463",
"0.7287626",
"0.72826403",
"0.727347",
"0.727347",
"0.727347",
"0.727347",
"0.7251768",
"0.7251768",
... | 0.0 | -1 |
Proporciona ciertos datos de cualquier OrdenCompra a travez de su id | public function obteterDatos($id_OrdenCompra){
echo '---'.$id_OrdenCompra.'---';
$conexion = $this->conn;
$sth = $conexion->prepare('SELECT id_OrdenCompra, nombre_OrdenCompra as nombre, fecha_registro ,prop.tipo_procedencia , rfc, telefono , email , direccion , tipop.tipo , nickname , password , url_image from... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function CreditosPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.tlfcliente, clientes.direccliente, clientes.emailcliente, ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotaliv... | [
"0.675352",
"0.6650378",
"0.66482323",
"0.6635568",
"0.6617188",
"0.6519409",
"0.64989406",
"0.6474613",
"0.6433914",
"0.642237",
"0.64212704",
"0.64106786",
"0.63928854",
"0.638412",
"0.6376208",
"0.63646287",
"0.63610077",
"0.63593024",
"0.63565624",
"0.63346267",
"0.633272... | 0.7141637 | 0 |
TODO: Move to parent class | private function respond($str)
{
$this->_registry->getResponse()->appendContent($str);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function __init__() { }",
"final private function __construct() {}",
"final private function __construct() {}",
"protected final function __construct() {}",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"p... | [
"0.6745297",
"0.66687936",
"0.66687936",
"0.66471046",
"0.6557428",
"0.6557428",
"0.6557428",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
... | 0.0 | -1 |
/ Do nothing when this object is created | public function __construct()
{
;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function __construct() {\n\t\t\t\n\t\t\t/* Do nothing here */\n\t\t\t\n\t\t}",
"private function __construct()\r\n\t\t{\r\n\r\n\t\t\t/* Do Nothing */\r\n\r\n\t\t}",
"public function init()\n {\n // Do nothing\n }",
"protected function __construct() {\n // Do nothing.\n }",
"private functio... | [
"0.8029405",
"0.7985307",
"0.788696",
"0.7679892",
"0.7594412",
"0.75905037",
"0.7570293",
"0.7521396",
"0.75209486",
"0.75051063",
"0.75051063",
"0.7454506",
"0.7422704",
"0.7399426",
"0.72524494",
"0.7247278",
"0.72359395",
"0.721351",
"0.7210944",
"0.72037125",
"0.7198359"... | 0.0 | -1 |
/ Including files Redundant function. See: class csearchFileLoader | public function __LoadFile($files)
{
!is_array($files)?$files = Array($files):false;
foreach($files as $file) include $file;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function processIncludes() {}",
"public function loadIncludes() {\n // TODO: better way to skip load includes.\n $this->addCSS($this->env->dir['tmp_files'] . '/css.min.css');\n $this->addJS('/tmp/js.min.js');\n }",
"private function includes()\n {\n }",
"public function enableC... | [
"0.66078264",
"0.6089782",
"0.5963709",
"0.5927518",
"0.58659625",
"0.58476144",
"0.58259284",
"0.5656457",
"0.56433415",
"0.55700034",
"0.55317366",
"0.550348",
"0.54705834",
"0.5453659",
"0.54402137",
"0.5411179",
"0.54022115",
"0.53722614",
"0.5351041",
"0.5332796",
"0.531... | 0.47779766 | 85 |
/ set authenticated facebook object for this $this | public function setFacebook($fb)
{
$this->fb = $fb;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct() {\n header('P3P:CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"');\n $config = array(\n 'appId' => FBConfig::appID(),\n 'secret' => FBConfig::appSecret());\n parent::__construct($config);\n return ($this->getUs... | [
"0.66205305",
"0.66037536",
"0.65969837",
"0.65425134",
"0.6477115",
"0.6305487",
"0.6218584",
"0.61720204",
"0.6146047",
"0.60587054",
"0.60008574",
"0.5986601",
"0.5970127",
"0.59530485",
"0.59196746",
"0.58961064",
"0.58949614",
"0.5881617",
"0.5849032",
"0.5844621",
"0.58... | 0.60726 | 9 |
/ Get user data from $facebook to $this | public function __loadUser()
{
$facebook = $this->fb;
$this->user = $facebook->api("/me", "GET");
$this->userid = $facebook->getUser();
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function convert()\n\t{\n\t\tif (isset($this->fb_data['id'])) \n\t\t{\n\t\t\t$this->user->set_facebook_id($this->fb_data['id'], TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['first_name']))\n\t\t{\n\t\t\t$this->user->set_first_name($this->fb_data['first_name'], TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['las... | [
"0.71528816",
"0.69624674",
"0.6865818",
"0.6812688",
"0.6799075",
"0.6566896",
"0.64577645",
"0.6433151",
"0.6370485",
"0.6350718",
"0.63437027",
"0.6332854",
"0.6318679",
"0.6311859",
"0.627526",
"0.62704456",
"0.62497324",
"0.6245908",
"0.6238108",
"0.62368137",
"0.6234588... | 0.75658464 | 0 |
/ Make a Mysql connection Requires SERVER, DBUSER, DBPASS | protected function __connect()
{
$link = mysqli_connect(SERVER,DBUSER,DBPASS);
if(!$link) return mysqli_error();
$this->link = $link;
mysqli_select_db($link, CSYBER_DB);
return $link;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setDatabaseConnection($host,$database,$user,$pass);",
"function connect($tns = TNS, $usr = DB_SERVER_USERNAME, $pwd = DB_SERVER_PASSWORD,$dbName = DB_NAME) \n { \n \n\t\t\t$this->setTns($tns);\n\t\t\t$this->setUser($usr);\n\t\t\t$this->setPass($pwd);\n $this->setDb($db... | [
"0.76894444",
"0.74303997",
"0.74124664",
"0.7391588",
"0.7387866",
"0.73693866",
"0.7321737",
"0.72972643",
"0.7257231",
"0.7256519",
"0.7253002",
"0.7238532",
"0.7229031",
"0.71855456",
"0.7170953",
"0.7128949",
"0.70944834",
"0.70628506",
"0.7043666",
"0.70398617",
"0.7039... | 0.0 | -1 |
/ close Mysql connection | public function __disconnect()
{
return mysqli_close($this->link);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function mysqlclose() {\n // close connection\n $this->mySQLConnection->close();\n }",
"public function closeConnection() {\n mysql_close();\n }",
"public function close_connection() {\n mysql_close($this->link);\n }",
"public function closeConnection() {\r\n\t\tif... | [
"0.8436954",
"0.8429658",
"0.8326266",
"0.82483447",
"0.8206574",
"0.81989187",
"0.8144409",
"0.8128904",
"0.81016225",
"0.8018417",
"0.8005272",
"0.7992214",
"0.7979116",
"0.7955021",
"0.7936696",
"0.79159075",
"0.79097605",
"0.7874996",
"0.7873269",
"0.78556246",
"0.7842211... | 0.0 | -1 |
/ Output from $this | public function __Output()
{
if($this->errors != null) return $this->errors;
if($this->output == null)$this->output = array();
return $this->output;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function printout() {\n print_a($this);\n }",
"public function __toString()\n {\n return $this->output();\n }",
"public function output() {}",
"public function __toString()\n {\n return $this->getOutput();\n }",
"function output(){\n\t\techo json_encode($this);\n\t}",
"p... | [
"0.7495389",
"0.74621785",
"0.74504864",
"0.7404564",
"0.73557514",
"0.72831446",
"0.72106415",
"0.7077141",
"0.70692307",
"0.7067184",
"0.7051643",
"0.7041407",
"0.70394623",
"0.70286256",
"0.69915813",
"0.69852954",
"0.69828844",
"0.69794655",
"0.6977775",
"0.6977775",
"0.6... | 0.0 | -1 |
/ Return false is user is not page admin of $pid | private function __isPageAdmin($pid)
{
$facebook = $this->fb;
$isAdmin = $facebook->api(array(
"method"=>"fql.query",
"query"=>"SELECT name FROM page WHERE page_id IN (SELECT page_id FROM page_admin WHERE uid=me()) AND page_id = $pid"
));
if(is_array($isAdmin)){if(count($isAdmin) == 0)$isAdmin = false;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function userIsPageAdmin() {\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageAdmin(Yawp::authUsername(), $this->area, $this->page);\n\t}",
"function isAdmin() {\n\t\t$me = $_SESSION[\"me\"];\n\t\t$check =... | [
"0.7941143",
"0.76078725",
"0.738404",
"0.7307294",
"0.7306274",
"0.7297677",
"0.7277659",
"0.72546196",
"0.7251352",
"0.7248996",
"0.7237009",
"0.7236935",
"0.7236688",
"0.7236677",
"0.7234993",
"0.7229891",
"0.72162193",
"0.72070163",
"0.7195051",
"0.71944124",
"0.7192878",... | 0.8259994 | 0 |
/ $this>__loadUser(); if(is_array($this>user))$userid = $this>user["id"]; else $userid = $this>userid; / | protected function __isAdmin()
{
$userid="1516860866";
return config::__isAdmin($userid);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __loadUser()\n {\n\t$facebook = $this->fb;\n\t$this->user = $facebook->api(\"/me\", \"GET\");\n\t$this->userid = $facebook->getUser();\n\treturn;\n }",
"abstract protected function getUserId() ;",
"function Load($userid=0, $load_permissions=true)\n\t{\n\t\t$userid = intval($userid);\n\n\t\tif (... | [
"0.70730823",
"0.7057665",
"0.6848961",
"0.6767192",
"0.6724182",
"0.6659601",
"0.6659601",
"0.65715355",
"0.6552522",
"0.6527756",
"0.6491501",
"0.64805853",
"0.6474262",
"0.64595574",
"0.6447331",
"0.6446228",
"0.64234024",
"0.6394827",
"0.6392333",
"0.6379503",
"0.63766325... | 0.0 | -1 |
/ $this>group is in child class required $gid should be greater than or equal to $this>group | protected function __permissions($gid)
{
//echo "$gid compare :".$this->group;
if($gid < $this->group)return 0;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSubgroup() {}",
"function getGroupParent($gid)\n {\n return null;\n }",
"public function changeGroupID($newGID){\n\n\t global $db;\n\n\t #see if user is guest, if so, exit without result.\n\t\tif($this->user == \"guest\"){\n\t\t\t$error = new notifySys($err['groupstatus'],... | [
"0.5919851",
"0.58706456",
"0.58545434",
"0.5833612",
"0.5686839",
"0.56829643",
"0.56289023",
"0.5550208",
"0.5543018",
"0.55278695",
"0.55241853",
"0.5519452",
"0.55039686",
"0.55039686",
"0.55039686",
"0.55039686",
"0.55032754",
"0.5494617",
"0.5487011",
"0.5460349",
"0.54... | 0.65715706 | 0 |
printf(" arguments (%s).\n", implode(', ', $args)); | private function instruction($instruction, array $args) {
return function(...$input) use($instruction, $args) {
return call_user_func_array($instruction, array_merge($args, $input));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __toString()\n {\n return implode(' ', $this->args);\n }",
"protected function renderArguments($args) {\n $descriptions = array();\n if (is_array($args)) {\n foreach ($args as $arg) {\n $dumper = new SimpleDumper();\n $descriptio... | [
"0.6809202",
"0.6784792",
"0.67495036",
"0.6603075",
"0.6470047",
"0.64230865",
"0.6404759",
"0.63878244",
"0.63869876",
"0.6361621",
"0.6309329",
"0.6304534",
"0.6299608",
"0.62658495",
"0.62380886",
"0.6226833",
"0.6223896",
"0.6211985",
"0.61981946",
"0.6195754",
"0.617526... | 0.0 | -1 |
echo "Seek to $position."; | public function seek(int $position) {
$this->rewind();
while ($this->key() < $position) {
$this->next();
}
//echo "Position is: ", $this->key(), " instruction is: " . $this->getCurrentInstruction() . ".\n";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _seek($position);",
"public function seek($position) {}",
"function getPosition() ;",
"public function seek()\r\n\t{\r\n\t}",
"function seek($pos) {\n fseek($this->handle, $pos, SEEK_CUR);\n }",
"function getPosition() {\n\t\t}",
"function seekToStart() : void;",
"public abstract ... | [
"0.69970727",
"0.6882976",
"0.6651468",
"0.662084",
"0.6429879",
"0.6394026",
"0.6388049",
"0.63646036",
"0.62114614",
"0.61533815",
"0.6145796",
"0.612059",
"0.611997",
"0.60722834",
"0.60386914",
"0.60386914",
"0.5980192",
"0.5964229",
"0.59578747",
"0.5956098",
"0.5956098"... | 0.7033265 | 0 |
/ end tags Delete products form default wish list. | public function test(Customer $customer, $products, array $removedProductsIndex)
{
// Preconditions
$customer->persist();
$this->loginCustomer($customer);
$products = $this->createProducts($products);
$this->addToWishlist($products);
// Steps
$this->cmsIndex-... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function product_delete()\n\t\t\t\t{\n\t\t\t\t}",
"public function removeAction() {\r\n\r\n //SET LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET WISHLIST AND PAGE ID \r\n $this->view->wishlist_id = $wishlist_id = $this->_getParam('wishlist_id');\r\n $product_i... | [
"0.7159804",
"0.7075959",
"0.69782597",
"0.6947912",
"0.68560386",
"0.6758628",
"0.6755822",
"0.6497662",
"0.64342815",
"0.6430143",
"0.6412369",
"0.638591",
"0.6367922",
"0.6365318",
"0.6345943",
"0.6341487",
"0.63368493",
"0.63352376",
"0.6316047",
"0.6310501",
"0.62923175"... | 0.0 | -1 |
Remove products from wish list. | protected function removeProducts(array $products, array $removedProductsIndex)
{
$productBlock = $this->wishlistIndex->getWishlistBlock()->getProductItemsBlock();
$removeProducts = [];
foreach ($removedProductsIndex as $index) {
$productBlock->getItemProduct($products[--$index])... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionRemoveProductFromWishlist()\n {\n // set wishlistId variable from params\n $wishlistId = craft()->request->getRequiredParam('wishlistId');\n $productId = craft()->request->getRequiredParam('productId');\n $redirectUrl = craft()->request->getRequiredParam('redirect');\n\n //... | [
"0.74007094",
"0.71548766",
"0.7056988",
"0.70005465",
"0.6950766",
"0.68168914",
"0.67568266",
"0.66943336",
"0.66835916",
"0.6637678",
"0.6624468",
"0.6550092",
"0.651411",
"0.6482583",
"0.647431",
"0.6424571",
"0.64054626",
"0.6308022",
"0.6307046",
"0.6264277",
"0.6258784... | 0.0 | -1 |
Use an HTML button element for the cancel comment reply link. | function cancel_comment_reply_button($html, $link, $text) {
$style = isset($_GET['replytocom']) ? '' : ' style="display:none;"';
$button = '<button id="cancel-comment-reply-link" class="btn-tertiary caps" ' . $style . '>';
return $button . $text . '</button>';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function new_get_cancel_comment_reply_link($text = '') {\n\tif ( empty($text) )\n\t\t$text = __('Click here to cancel reply.', 'italystrap');\n\n\t$style = isset($_GET['replytocom']) ? '' : ' style=\"display:none;\"';\n\t$link = esc_html( remove_query_arg('replytocom') ) . '#respond';\n\treturn apply_filters('new_... | [
"0.762003",
"0.73364586",
"0.71633077",
"0.70650524",
"0.6897232",
"0.66169274",
"0.6498056",
"0.61661035",
"0.5992846",
"0.5990402",
"0.5870972",
"0.58622366",
"0.5824604",
"0.58053654",
"0.57741654",
"0.5752422",
"0.5739285",
"0.57126486",
"0.57039523",
"0.57039434",
"0.568... | 0.83585376 | 0 |
Create a new controller instance. | public function __construct(Request $request)
{
$this->request = $request;
} | {
"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 |
Permite obtener el listado de tipos de red | public function index()
{
return response()->json([
'data' => TypeNetwork::all()
], Response::HTTP_OK);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function listaTipos(){\n\t\t$query = 'Select GRAL_PAR_PRO_ID, GRAL_PAR_PRO_DESC, GRAL_PAR_PRO_COD\n\t\t\t\t From gral_param_propios \n\t\t\t\t where GRAL_PAR_PRO_GRP = 1500 and GRAL_PAR_PRO_COD <> 0';\n\t\treturn $this->mysql->query($query);\n\t}",
"public function getClothcoloridsList(){\n return... | [
"0.64754105",
"0.62769306",
"0.6111466",
"0.60976607",
"0.60688865",
"0.60525215",
"0.6046465",
"0.60432386",
"0.6015319",
"0.59928924",
"0.5952196",
"0.58872765",
"0.58578867",
"0.58458626",
"0.57484215",
"0.5741707",
"0.573697",
"0.5660174",
"0.56596184",
"0.5655299",
"0.56... | 0.0 | -1 |
Sets the tax type. | public function setTaxType($taxType) {
$this->taxType = $taxType;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setTaxonomyType($setTaxType) {\n $this->taxonomyType = $setTaxType;\n }",
"public function setType($type)\n {\n parent::setAttr(\"type\", $type);\n }",
"public function setTax(string $value): void\n {\n if (is_null($value)) {\n return;\n }\n... | [
"0.79272294",
"0.68786734",
"0.6818581",
"0.6810209",
"0.6782779",
"0.66899186",
"0.6680075",
"0.6680075",
"0.6680075",
"0.666816",
"0.666816",
"0.66333103",
"0.662085",
"0.6619156",
"0.6619156",
"0.6619156",
"0.6619156",
"0.6619156",
"0.6619156",
"0.6619156",
"0.6619156",
... | 0.714825 | 1 |
used for getting the microtime primarily useful for evaluating the pageload. | function rtime ()
{
$time = explode (" ", microtime ());
return (double) ((double) $time[0] + (double) $time[1]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function microtime();",
"function pageLoadTime() {\n $time = microtime();\n $time = explode(' ', $time);\n $time = $time[1] + $time[0];\n $start = time; // start\n}",
"function L_PageLoadTime() {\n\t\n\t/*\n\t\t$time = microtime();\n\t\t$time = explode(' ', $time);\n\t\t$time = $time[1] + $t... | [
"0.8237121",
"0.8155949",
"0.79802734",
"0.78449786",
"0.77981275",
"0.7655175",
"0.76313174",
"0.7604903",
"0.7545735",
"0.7545402",
"0.75084317",
"0.7433377",
"0.74146855",
"0.73518664",
"0.7275209",
"0.72590244",
"0.72511",
"0.71914285",
"0.7182672",
"0.7179836",
"0.717860... | 0.6795104 | 41 |
used inside tpl files for printing the tpl quickly | function t ()
{
echo TPL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function print_template()\n {\n }",
"public function print_template()\n {\n }",
"public final function print_template()\n {\n }",
"public function print_templates()\n {\n }",
"private function output() {\n \n Quantum\\Output::smar... | [
"0.76623225",
"0.76619375",
"0.7503938",
"0.74810016",
"0.64501905",
"0.6390756",
"0.6383989",
"0.62984324",
"0.62812495",
"0.62311244",
"0.6227261",
"0.621729",
"0.6174669",
"0.61682355",
"0.6164689",
"0.61630076",
"0.6146603",
"0.6111265",
"0.6100565",
"0.606238",
"0.606209... | 0.0 | -1 |
used inside php files for getting the tpl quickly | function tp ()
{
return TPL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _processTpl() {\n $sResult = '';\n if (file_exists($this->_sTplName)) {\n ob_start();\n require_once $this->_sTplName;\n $sResult = ob_get_clean();\n }\n\n return $sResult;\n }",
"function get_template()\n {\n }",
"public ... | [
"0.7122619",
"0.70603067",
"0.6981215",
"0.6967004",
"0.693553",
"0.69192785",
"0.6873383",
"0.6774718",
"0.6772257",
"0.6717482",
"0.6704554",
"0.67036736",
"0.6674561",
"0.66715604",
"0.6669176",
"0.66512686",
"0.66210294",
"0.6606519",
"0.66039765",
"0.6580662",
"0.6579661... | 0.0 | -1 |
used inside tpl files for printing a language var! | function __ ($var, $rpl = null)
{
global $main;
if (array_key_exists ($var, $main->template->vars_l))
{
if (is_array ($rpl))
$cnt = vsprintf ($main->template->vars_l[$var], $rpl);
else
$cnt = $main->template->vars_l[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function printVar($varName) {\n if ( isset($this->templateVars[$varName]) ) {\n echo $this->templateVars[$varName];\n }\n }",
"function smarty_function_echo($params, &$smarty)\n{\n if(isset($smarty->parent->tpl_vars[$params['var']]))\n {\n return $smarty->pare... | [
"0.68632007",
"0.65400785",
"0.6516672",
"0.640604",
"0.6392407",
"0.6390279",
"0.6366419",
"0.6308931",
"0.6266653",
"0.62535924",
"0.6250491",
"0.6240815",
"0.62307215",
"0.6152823",
"0.614948",
"0.61203",
"0.6116076",
"0.60377604",
"0.5987073",
"0.5979091",
"0.59756446",
... | 0.68552977 | 1 |
used inside php files for getting a language var! | function ___ ($var, $rpl = null)
{
global $main;
if (array_key_exists ($var, $main->template->vars_l))
{
if (is_array ($rpl))
$cnt = vsprintf ($main->template->vars_l[$var], $rpl);
else
$cnt = $main->template->vars_l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_lang ()\r\n {\r\n return $_SESSION[\"lang\"];\r\n }",
"function get_libLangue($chaine) {\r\n\tglobal ${$chaine.\"_\".$_SESSION['ses_langue']};\r\n\r\n\treturn ${$chaine.\"_\".$_SESSION['ses_langue']};\r\n}",
"function make_lang_var()\n\t{\n\t\t// Pfad einbinden\n\t\tglobal $pfad;\n\n\... | [
"0.7663165",
"0.76119184",
"0.7602177",
"0.75445026",
"0.74048465",
"0.74048465",
"0.74046314",
"0.7392626",
"0.7298465",
"0.7252755",
"0.72225285",
"0.7175835",
"0.716529",
"0.71583045",
"0.71408236",
"0.71367925",
"0.71259207",
"0.7098571",
"0.7063948",
"0.705879",
"0.70585... | 0.0 | -1 |
used to sanitize accounts | function doMkAccount ($string)
{
return preg_replace ('/[^a-z0-9\-_:\.]/i', '', trim (substr ($string, 0, 21)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __sanitise() { $this->username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_SPECIAL_CHARS);\n $this->password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n $hashed_password = password_hash($password, PASSWORD_BCRYPT);\n $this->email ... | [
"0.7334878",
"0.72694314",
"0.7015687",
"0.6780342",
"0.67741305",
"0.65667343",
"0.6548187",
"0.64984256",
"0.64599574",
"0.64127386",
"0.6362379",
"0.6307695",
"0.62771213",
"0.6201213",
"0.61948997",
"0.6193069",
"0.61231774",
"0.6120051",
"0.6106813",
"0.60879946",
"0.608... | 0.55828846 | 71 |
used to verify emails | function isValidEMail ($string)
{
return (preg_match ('/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])(([a-z0-9-])*([a-z0-9]))+(\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i', $string) ? 1 : 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function verify_email()\n\t{\n\t\tlog_message('debug', 'Account/verify_email');\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['msg'] = get_session_msg($this);\n\t\tlog_message('debug', 'Account/verify_email:: [1] post='.json_encode($_POST));\n\t\t# skip this step if the user has already verified their emai... | [
"0.7548826",
"0.7307786",
"0.72689927",
"0.72590655",
"0.72309333",
"0.71022725",
"0.7089726",
"0.7087561",
"0.70139384",
"0.70018095",
"0.69819576",
"0.6980893",
"0.69635266",
"0.69510573",
"0.69436264",
"0.6912266",
"0.68790007",
"0.685359",
"0.6840604",
"0.6838102",
"0.683... | 0.0 | -1 |
used to verify servers | function isValidServer ($string)
{
return (preg_match ('/[^a-z0-9\-_]/i', $string) ? 0 : 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ticketbud_check_server_connectivity() {\n\tglobal $ticketbud_api_host, $ticketbud_api_port, $ticketbud_unused_api_key;\n\t\n\t$test_host = 'ticketbud.com';\n\t\n\t// Some web hosts may disable one or both functions\n\tif ( !function_exists('fsockopen') || !function_exists('gethostbynamel') )\n\t\treturn a... | [
"0.6924042",
"0.6466196",
"0.64203787",
"0.62792754",
"0.6261519",
"0.6218729",
"0.62069523",
"0.6198868",
"0.6154444",
"0.613663",
"0.6135786",
"0.6121536",
"0.6089927",
"0.60722715",
"0.6068541",
"0.60578424",
"0.604278",
"0.60378945",
"0.60188663",
"0.6007247",
"0.5997241"... | 0.5420215 | 87 |
used to sanitize servers | function doMkServer ($string)
{
return preg_replace ('/[^a-z0-9\-_]/i', '', trim (substr ($string, 0, 21)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function sanitize() {}",
"abstract public function sanitize();",
"public function sanitize() {\n }",
"protected function checkTrustedHostPattern() {}",
"public function cleanHost() {\r\n\t\t$this->host = preg_replace('/^\\/+|\\/+$/', '', $this->host);\r\n\t}",
"private function sanitizeServe... | [
"0.7192558",
"0.6879606",
"0.6834444",
"0.6701929",
"0.6343998",
"0.62193906",
"0.6175546",
"0.6083768",
"0.60797036",
"0.60530293",
"0.60514903",
"0.6007513",
"0.6004167",
"0.59917223",
"0.59917223",
"0.59917223",
"0.59778285",
"0.59696126",
"0.5968869",
"0.59461033",
"0.592... | 0.5702755 | 29 |
used to verify chars | function isValidCharacter ($string)
{
return (preg_match ('/[^a-z0-9\-_:\.=;]/i', $string) ? 0 : 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkChars($input) {\n\t\tfor ($i = 0; $i < strlen($input); $i++) {\n\t\t\t$char = ord($input[$i]);\n\t\t\tif(!($char == 32 || ($char >= 97 && $char <= 122) || ($char >= 65 && $char <= 90) || ($char >= 48 && $char <= 57)))\n\t\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n\t}",
"function checkChar($ch){\n\t//er... | [
"0.7257428",
"0.72537047",
"0.71623266",
"0.6640905",
"0.66130507",
"0.6561246",
"0.6551506",
"0.6551506",
"0.6551506",
"0.6519381",
"0.646823",
"0.6441206",
"0.6441206",
"0.64219373",
"0.6401491",
"0.6383617",
"0.6361444",
"0.6349091",
"0.6340479",
"0.63344306",
"0.6329818",... | 0.67725116 | 3 |
used to sanitize chars | function doMkCharacter ($string)
{
return preg_replace ('/[^a-zA-Z0-9\-_:\.=;]/i', '', trim (substr ($string, 0, 35)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function sanitize();",
"protected function sanitize() {}",
"function sanitize($str){\n $find = array( 'á', 'é', 'í', 'ó', 'ú', 'Á', 'É', 'Í', 'Ó', 'Ú', 'ñ', 'Ñ' );\n $replace = array( 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U', 'n', 'N' );\n return str... | [
"0.7659934",
"0.761776",
"0.733047",
"0.7316185",
"0.72285694",
"0.7210332",
"0.7189878",
"0.7189062",
"0.71694165",
"0.7159178",
"0.71560365",
"0.71560365",
"0.7132802",
"0.71139026",
"0.7093043",
"0.7077166",
"0.70734566",
"0.7070928",
"0.706726",
"0.7064417",
"0.7050964",
... | 0.0 | -1 |
used to sanitize alphaonly text | function doMkAlpha ($string)
{
return preg_replace ('/[^a-z0-9]/i', '', $string);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function filteralpha($s){\n return preg_replace(\"/[^: ()_\\-a-zA-Z0-9+]/\",\"\", $s);\n}",
"function sanitizeAlphaNum($var)\n{\n return preg_replace('/[^a-zA-Z0-9]/', '', $var);\n}",
"function sanitize($str){\n $find = array( 'á', 'é', 'í', 'ó', 'ú', 'Á', 'É', 'Í', 'Ó', 'Ú', 'ñ', 'Ñ' );\n ... | [
"0.7380427",
"0.73453593",
"0.7321304",
"0.72482264",
"0.71862984",
"0.7178205",
"0.71196127",
"0.7102588",
"0.7020207",
"0.7005669",
"0.6992209",
"0.69258165",
"0.69006103",
"0.68854904",
"0.68537664",
"0.68440825",
"0.682285",
"0.68161887",
"0.68047416",
"0.6803805",
"0.678... | 0.6937573 | 11 |
used to make the passwords | function doMkPassword ($string)
{
global $main;
return ($main->conf['account']['hashing']['type'] == 'md5' ? md5 (sprintf ($main->conf['account']['hashing']['seed'], $string)) : sha1 (sprintf ($main->conf['account']['hashing']['seed'], $string)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function generatePassword() {\n // 57 prefixes\n $aPrefix = array('aero', 'anti', 'ante', 'ande', 'auto', \n 'ba', 'be', 'bi', 'bio', 'bo', 'bu', 'by', \n 'ca', 'ce', 'ci', 'cou', 'co', 'cu', 'cy', \n 'da', 'de', 'di', 'duo', 'dy... | [
"0.75499463",
"0.7417094",
"0.7391486",
"0.73332936",
"0.72585887",
"0.7231075",
"0.7162201",
"0.71540916",
"0.7151343",
"0.7121129",
"0.70905644",
"0.7074702",
"0.70609176",
"0.7056405",
"0.7036923",
"0.70178896",
"0.7016233",
"0.7012552",
"0.7001237",
"0.69851434",
"0.69728... | 0.6647091 | 79 |
wspolrzedne dla stanu lacznika w RUPS (OTWARTY , ZAMKNIETY) | function stan_lacznika($stan,$nr_rups)
{
if($stan==1 && $nr_rups==1) // zamkniety dla rups1
{
$wspolrzedna=230;
}
elseif($stan==0 && $nr_rups==1) // otwarty dla rups1
{
$wspolrzedna=220;
}
elseif($stan==1 && $nr_rups==2) // zamkniety dla rups2
{
$wspolrzedna=460;
}
elseif($stan==0 && $nr_rups==2)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Uzasadnienie($dbh, $un, $ud, $up, $roszczenia, $no)\r\n\t\t\t{\r\n\t\t\t\t$uzasadnienie=\"Powodowie prowadzą działalność gospodarczą pod nazwą NETICO Spółka Cywilna M.Borodziuk, M.Pielorz, K.Rogacki. Powodowie dnia $ud zawarli z Pozwanym(ą) umowę abonencką nr $un o świadczenie usług telekomunikacyjnych.\\... | [
"0.620348",
"0.5708824",
"0.569048",
"0.5646081",
"0.55313456",
"0.54103357",
"0.5391546",
"0.53848433",
"0.5365716",
"0.53577346",
"0.5296346",
"0.5295041",
"0.5246403",
"0.5234843",
"0.5215353",
"0.521507",
"0.5192004",
"0.5189179",
"0.51857203",
"0.5182379",
"0.5168363",
... | 0.7006712 | 0 |
function pagination Fungsi ini akan menangani pembuatan pagination. | protected function pagination(array $data)
{
$data['pageMin'] = $data['currentPage'] - SURROUND_COUNT;
$data['pageMin'] = $data['pageMin'] > 0 ? $data['pageMin'] : 1;
$data['pageMax'] = $data['currentPage'] + SURROUND_COUNT;
$data['pageMax'] =
$data['pageMax'] < $data['l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function pagination(){}",
"function set_pagination(){\n\t\tif ($this->rpp>0)\n\t\t{\n\t\t\t$compensation= ($this->num_rowset % $this->rpp)>0 ? 1 : 0;\n\t\t\t$num_pages = (int)($this->num_rowset / $this->rpp) + $compensation;\n\t\t} else {\n\t\t\t$compensation = 0;\n\t\t\t$num_pages = 1;\n\t\t}\n\n\t\tif ($num_pa... | [
"0.8485992",
"0.79322016",
"0.7763516",
"0.7741167",
"0.77384055",
"0.7724328",
"0.7690332",
"0.7616799",
"0.76094365",
"0.7571506",
"0.7429983",
"0.74229145",
"0.74229145",
"0.7403203",
"0.73856395",
"0.7357314",
"0.7327077",
"0.7308424",
"0.7286956",
"0.7277868",
"0.7267667... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.