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 |
|---|---|---|---|---|---|---|
Store a newly created resource in storage. | public function store(Request $request)
{
if ($request->ajax()) {
$this->validate($request, Downpayment::$rules);
$down = new Downpayment;
// $down->str_down_name = trim(ucwords($request->str_down_name));
$down->int_down_percentage = trim($request->int_down_p... | {
"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)
{
$down = Downpayment::findOrFail($id);
return response()->json($down);
} | {
"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->ajax()) {
$down = Downpayment::findOrFail($id);
// $down ->str_down_name = trim($request->str_down_name);
$down ->int_down_percentage = trim($request->int_down_percentage);
$down->save();
... | {
"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(Request $request, $id)
{
if ($request->ajax()) {
$del = [];
$request->has('values') ? $del = $request->values : array_push($del, $id);
$down = Downpayment::destroy($del);
return response()->json($down);
} else {
ret... | {
"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 a new notification instance. | public function __construct(User $user, Book $book)
{
$this->user = $user;
$this->book = $book;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function create($notification){\n }",
"public static function createNotification($type, $eventid){\n\t\t$notification = new Notification; \n\t\t$notification->type = $type;\n\t\t$notification->eventid = $eventid;\n\t\t$notification->time = date('Y-m-d H:i:s');\n\t\t$notification->save();\n\t\tretu... | [
"0.8276063",
"0.72309536",
"0.7192113",
"0.71250874",
"0.7123231",
"0.70414555",
"0.6982398",
"0.6982398",
"0.6982398",
"0.69165224",
"0.6844303",
"0.68205667",
"0.6801263",
"0.6776018",
"0.6589725",
"0.6531073",
"0.6507233",
"0.65047646",
"0.6503655",
"0.64437956",
"0.641349... | 0.0 | -1 |
Get the notification's delivery channels. | public function via($notifiable)
{
return ['mail', 'nexmo', 'broadcast'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNotificationChannels()\n {\n if (array_key_exists(\"notificationChannels\", $this->_propDict)) {\n return $this->_propDict[\"notificationChannels\"];\n } else {\n return null;\n }\n }",
"public function getDistributionChannels();",
"public func... | [
"0.78077316",
"0.7333707",
"0.7127785",
"0.7089724",
"0.7087921",
"0.70300424",
"0.69931364",
"0.6973003",
"0.6951073",
"0.6927183",
"0.68472975",
"0.67785895",
"0.6697527",
"0.6530563",
"0.65100604",
"0.6496754",
"0.6474866",
"0.6446399",
"0.643471",
"0.6423392",
"0.64229727... | 0.0 | -1 |
Get the mail representation of the notification. | public function toMail($notifiable)
{
return (new MailMessage)
->subject('Seu livro foi exportado com sucesso')
->greeting("Olá {$this->user->name}!")
->line("o livro {$this->book->title}")
->action('Download', route('books.download', ['id' => $this->book->id]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNotificationEmail() {}",
"public function toMail($notifiable)\n {\n $mailMessage = (new MailMessage())\n ->error()\n ->subject($this->getMessageText())\n ->line($this->getMessageText());\n\n foreach ($this->getMonitorProperties() as $name => $v... | [
"0.7329682",
"0.73008144",
"0.7279281",
"0.72447264",
"0.7150932",
"0.713269",
"0.71279645",
"0.7124905",
"0.70436907",
"0.70436907",
"0.70436907",
"0.70436907",
"0.70169747",
"0.6981995",
"0.6965215",
"0.69630843",
"0.6962014",
"0.69318545",
"0.692679",
"0.6913696",
"0.69016... | 0.0 | -1 |
Get the array representation of the notification. | public function toArray($notifiable)
{
return [
'book' => $this->book->toArray()
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toArray()\n {\n return [\n 'on' => $this->on,\n 'message' => $this->message,\n 'remaining' => $this->remaining\n ];\n }",
"public function toArray($notifiable)\n {\n return $this->message;\n }",
"public function getAsArray() {\n ... | [
"0.76758885",
"0.76516277",
"0.75636953",
"0.74597746",
"0.7458128",
"0.734528",
"0.73423344",
"0.72810096",
"0.72445726",
"0.7225404",
"0.7216026",
"0.72065705",
"0.71766704",
"0.71498305",
"0.70820516",
"0.70820177",
"0.70782363",
"0.70270497",
"0.70252293",
"0.702143",
"0.... | 0.0 | -1 |
Test if can add to database | public function testDatabase()
{
self::$kernel = self::bootKernel();
// nothing should occur
$this->assertNull(AbstractUserFixture::createDatabase(self::$kernel));
// nothing should occur
$this->assertNull(AbstractUserFixture::createFixtures(self::$kernel,3));
//cr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function can_do_add() {\n return false;\n }",
"protected function canAdd()\n {\n return $this->hasStrategy(self::STRATEGY_ADD);\n }",
"function canAdd() {\r\n\t\t$user\t=& JFactory::getUser();\r\n\t\t$permission = FlexicontentHelperPerm::getPerm();\r\n\t\tif(!$permission->CanAdd) ... | [
"0.7333433",
"0.70328116",
"0.6890704",
"0.66786015",
"0.6654304",
"0.6633849",
"0.6594823",
"0.6594823",
"0.65634567",
"0.6561371",
"0.6534506",
"0.6488391",
"0.6452952",
"0.6389564",
"0.6336488",
"0.63193727",
"0.6255977",
"0.6242828",
"0.62135506",
"0.6197187",
"0.61844945... | 0.0 | -1 |
/ MAIN TEST Test if user last connexion has been set in database when login | public function testIfUserConnexionHasBeenSet()
{
// INIT
//-----
self::$kernel = self::bootKernel();
//create the entity manager
$this->entityManager = self::$kernel->getContainer()->get('doctrine.orm.entity_manager');
$this->enabledUser = $this->entityManager->ge... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLastLogin_always_returnCorrectly()\n {\n $this->assertEquals($this->user['last_login'], $this->entity->getLastLogin());\n }",
"private function checkFirstLogin() {\n\n $count = DB::table('users')->count();\n\n if ($count == 0) {\n\n $password = Hash::make('cciadmi... | [
"0.6748628",
"0.6693746",
"0.6586615",
"0.6553321",
"0.6342274",
"0.63329375",
"0.63032323",
"0.6264764",
"0.6164246",
"0.61606735",
"0.6132813",
"0.6087564",
"0.608483",
"0.60711855",
"0.6064786",
"0.6040252",
"0.5993316",
"0.5988169",
"0.5957285",
"0.5957012",
"0.59122956",... | 0.70082605 | 0 |
Test if user has cookie set when login | public function testIfUserCookieHasBeenSet()
{
// INIT
//-----
self::$kernel = self::bootKernel();
$response = new Response();
$filterResponseEvent = new FilterResponseEvent(
self::$kernel,
new Request(),
200,
$response
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }",
"public static function checkLoginCookie() {\n\t\tif (!LoginHandler::user... | [
"0.8176538",
"0.79107374",
"0.775627",
"0.7752137",
"0.77173555",
"0.76807106",
"0.7650918",
"0.76060295",
"0.75386465",
"0.7483977",
"0.7483977",
"0.74760866",
"0.74300855",
"0.7356519",
"0.7340229",
"0.73013216",
"0.7268567",
"0.7262862",
"0.72502995",
"0.72427845",
"0.7214... | 0.71354365 | 29 |
Test if not enabled user can login | public function testIfUserNotEnabledCanLogin()
{
// INIT
//-----
self::$kernel = self::bootKernel();
//create the entity manager
$this->entityManager = self::$kernel->getContainer()->get('doctrine.orm.entity_manager');
$this->disabledUser = $this->entityManager->g... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function isUserAllowedToLogin() {}",
"public static function loginEnabled()\n\t{\n\t\treturn FALSE;\n\t}",
"public static function loginEnabled()\n\t{\n\t\treturn FALSE;\n\t}",
"public static function loginEnabled()\n\t{\n\t\treturn FALSE;\n\t}",
"protected function require_login()\n {\n ... | [
"0.83531874",
"0.8156666",
"0.8156666",
"0.8156666",
"0.7622061",
"0.75875837",
"0.74940324",
"0.73918724",
"0.7308592",
"0.726971",
"0.72055775",
"0.715508",
"0.71542215",
"0.71542215",
"0.7119441",
"0.7031959",
"0.7029537",
"0.7005586",
"0.7000915",
"0.6994399",
"0.6987048"... | 0.7245015 | 10 |
Shorthand to get users created (ids) by some user | public static function getUsersCreated($userId = null)
{
$usersCreated = null;
$userId = ($userId == null) ? sfContext::getInstance()->getUser()->getGuardUser()->getId() : $userId;
$results = Doctrine::getTable('Profile')->findBy('created_by_user_id', $userId)->toArray();
foreach ($results ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getIds($user = null) {\n return DB::executeFirstColumn('SELECT user_id FROM ' . TABLE_PREFIX . 'project_users WHERE project_id = ?', $this->object->getId());\n }",
"public function users_to_query()\n\t{\n\t\treturn array($this->get_data('from_user_id'));\n\t}",
"private function getAloneUsers(... | [
"0.671354",
"0.65344656",
"0.65299064",
"0.6501897",
"0.64083284",
"0.63440585",
"0.62645733",
"0.62260914",
"0.6160807",
"0.6154778",
"0.6147036",
"0.6139507",
"0.6132743",
"0.6050128",
"0.6038289",
"0.6037984",
"0.6001504",
"0.59886426",
"0.59665525",
"0.59665525",
"0.59665... | 0.7065867 | 0 |
to set an expiration date which is different from default you need to specify the domain | function cookiesEnabled(){
//localhost won't work -> setcookie("test", "1", 0, "/", FALSE);
setcookie("test", "1");
if (!isset($_REQUEST["cookies"])) {
header("Location: ". $_SERVER['PHP_SELF']."?cookies=1".$_SESSION['params']);
}
if (!isset($_COOKIE["test"]) || (isset($_COOKIE["test"]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setExpirationDate(int $expiration_date);",
"public function expiryDate();",
"public function getExpirationDate();",
"function xl_set_expiration($id, $timestamp) {\n\n\t$date = date('m/d/Y', $timestamp);\n\n $formatted_date = DateTime::createFromFormat('m/d/Y', $date);\n\n $month = int... | [
"0.7160665",
"0.69765425",
"0.69184184",
"0.6795113",
"0.67647207",
"0.6674056",
"0.6580375",
"0.65661",
"0.65661",
"0.655451",
"0.65016955",
"0.64979005",
"0.64899516",
"0.64486164",
"0.64066714",
"0.640416",
"0.6391075",
"0.6366508",
"0.635288",
"0.6313316",
"0.6313065",
... | 0.0 | -1 |
Parse provided string, throw an exception if invalid, otherwise return parsed content as a keyvalue array. | public static function fromString($string, array $defaults = []) {
// Instanciate Dotenv parser.
$parser = new \Bgaze\Dotenv\Parser();
// Parse the string and throw an exception on failure.
if (!$parser->parseString($string)) {
$count = count($parser->errors());
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function parse(string $string): array;",
"public function parse($string)\n {\n return [];\n }",
"public static function parse(string $content): array\n {\n $lines = explode(\"\\n\", $content);\n\n $object = [];\n\n foreach ($lines as $line) {\n if (preg_ma... | [
"0.74228954",
"0.6840394",
"0.66638166",
"0.6661972",
"0.6629498",
"0.6559424",
"0.6307699",
"0.62899274",
"0.6191404",
"0.61463886",
"0.60850084",
"0.5985353",
"0.5962642",
"0.5949897",
"0.5945245",
"0.59077656",
"0.58763105",
"0.58610934",
"0.5838706",
"0.57813215",
"0.5772... | 0.0 | -1 |
Parse provided file, throw an exception if invalid, otherwise return parsed content as a keyvalue array. | public static function fromFile($path, array $defaults = []) {
// Check that provided file exists.
if (!file_exists($path)) {
throw new \InvalidArgumentException("Dotenv file doesn't exists: $path");
}
// Return content.
return self::fromString(file_get_contents($pat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function read(string $file): array\n {\n $contents = F::read($file);\n if ($contents === false) {\n throw new Exception('The file \"' . $file . '\" does not exist');\n }\n\n return static::decode($contents);\n }",
"function parse_file($file) {\n\n ... | [
"0.6475337",
"0.6359262",
"0.6203235",
"0.62018555",
"0.6086603",
"0.60572326",
"0.60509497",
"0.60509497",
"0.6019194",
"0.60147196",
"0.6009643",
"0.5996173",
"0.5951267",
"0.595034",
"0.59176093",
"0.5888556",
"0.58408004",
"0.5835176",
"0.5779827",
"0.5769702",
"0.5760531... | 0.0 | -1 |
Run the database seeds. | public function run()
{
$visit_types = collect(['CONSULTATION', 'DELIVERY', 'EMERGENCY', 'OTHERS']);
for ($i = 0; $i < 25; $i++) {
$type = $visit_types->random();
if ($type == 'DELIVERY') {
DB::table('visits')->insert([
'user_id' => 1,
... | {
"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 |
Display a listing of the resource. | public function index()
{
$pemesanan = Pemesanan::all();
$data['pemesanan'] = $pemesanan;
return view('pemesanan.index', $data);
} | {
"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()
{
$barang = barang::all();
$data['barang'] = $barang;
$data['action'] = 'pemesanan.store';
return view('pemesanan.form', $data);
} | {
"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)
{
$pemesanan = new pemesanan();
$pemesanan -> nama_barang = $request->nama_barang;
$pemesanan-> jumlah = $request->jumlah;
$pemesanan-> harga = $request->harga;
$pemesanan-> tanggal_order = $request->tanggal_order;
$pemesanan-> ... | {
"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(Pemesanan $pemesanan)
{
//
} | {
"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 = "")
{
$pemesanan = Pemesanan::find($id);
$data['pemesanan'] = $pemesanan;
$data['action'] = 'pemesanan/update';
return view('pemesanan.form',$data);
} | {
"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)
{
$pemesanan = Pemesanan::find($request->id);
$pemesanan->nama_barang = $request->nama_barang;
$pemesanan->jumlah = $request->jumlah;
$pemesanan->harga = $request->harga;
$pemesanan->tanggal_order = $request->tanggal_order;
$pe... | {
"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(Pemesanan $pemesanan)
{
//
} | {
"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 an incoming request. | public function handle(Request $request, Closure $next)
{
/** @var User $user */
$user = Auth::user();
if (!$user->hasRole($this->getRoleToVerify())) {
return redirect('/');
}
return $next($request);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function handle_request();",
"public function handleRequest();",
"public function handleRequest();",
"public function handleRequest();",
"protected abstract function handleRequest();",
"abstract public function handleRequest($request);",
"abstract public function handleRequest(Request $... | [
"0.8299201",
"0.8147294",
"0.8147294",
"0.8147294",
"0.8127764",
"0.7993589",
"0.7927201",
"0.7912899",
"0.7899075",
"0.76317674",
"0.75089735",
"0.7485808",
"0.74074036",
"0.7377414",
"0.736802",
"0.7294553",
"0.72389543",
"0.7230166",
"0.72108",
"0.71808434",
"0.7170364",
... | 0.0 | -1 |
Do not allow cloning. Only one connection per configuration should exist. | public final function __clone()
{
throw new Db_Exception('Cloning of Db_Connection instances are not allowed.');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function addConnectionsToConfig(): void\n {\n Config::set('database.connections.c1', (array) $this->schema->connections->from);\n Config::set('database.connections.c2', (array) $this->schema->connections->to);\n }",
"function instance_allow_config() {\n //allow instances to h... | [
"0.6298726",
"0.5933346",
"0.5889505",
"0.5682595",
"0.56775826",
"0.56560457",
"0.56115204",
"0.5593766",
"0.5583949",
"0.55422294",
"0.55190986",
"0.55184734",
"0.551622",
"0.546734",
"0.546299",
"0.54113436",
"0.53890073",
"0.53820276",
"0.5375168",
"0.5371804",
"0.5369788... | 0.6215526 | 1 |
Do not allow serialization. | public final function __sleep()
{
throw new Db_Exception('Serialization of Db_Connection objects are not allowed.');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function jsonSerialize():mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }",
"abstract public function serialize();",
"abstract public function serialize();",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
... | [
"0.6932199",
"0.68793714",
"0.68793714",
"0.6878344",
"0.6878344",
"0.6877147",
"0.6877147",
"0.6877147",
"0.6877147",
"0.6877147",
"0.6877147",
"0.6825898",
"0.67604613",
"0.67604613",
"0.67194974",
"0.6642853",
"0.6605702",
"0.6575297",
"0.6575297",
"0.6575297",
"0.6575297"... | 0.0 | -1 |
Do not allow unserialization. | public final function __wakeup()
{
throw new Db_Exception('Unserialization of Db_Connection objects are not allowed.');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function unSerializeData();",
"function maybe_unserialize($data)\n {\n }",
"public function __wakeup() {\n\t\t\t_doing_it_wrong( __FUNCTION__, __( 'Unserializing is forbidden!', 'be-table-ship' ), '4.0' );\n\t\t}",
"public function __wakeup() {\r\n\t\t_doing_it_wrong( __FUNCTION__, e... | [
"0.72044355",
"0.7128155",
"0.70108914",
"0.692889",
"0.6885448",
"0.6693677",
"0.6602266",
"0.6583335",
"0.654091",
"0.6533039",
"0.65010756",
"0.6451513",
"0.6451513",
"0.64498246",
"0.64498246",
"0.64498246",
"0.64498246",
"0.64498246",
"0.64498246",
"0.6425714",
"0.642571... | 0.0 | -1 |
Returns the name of the configuration used to configure this connection object. | public function getName()
{
return $this->name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_configuration_name() {\n\t\treturn $this->configuration_name;\n\t}",
"public function getConfigurationName(){\n\t\tif( empty( $this->_configuration_name ) ){\n\t\t\t$this->_configuration_name = self::CONFIGURATION_DEFAULT;\n\t\t}\n\t\treturn $this->_configuration_name;\n\t}",
"public functi... | [
"0.8155795",
"0.7796088",
"0.749983",
"0.740632",
"0.7342051",
"0.7239606",
"0.720046",
"0.71548676",
"0.70887023",
"0.7073876",
"0.703759",
"0.7034095",
"0.70077485",
"0.69973576",
"0.69544667",
"0.6912047",
"0.6907344",
"0.68869215",
"0.68625957",
"0.68625957",
"0.6844215",... | 0.0 | -1 |
Initializes the database handle. | public function initDbh()
{
if(is_null($this->dbh))
{
// not set, connect
$this->dbh = $this->connect();
// just in case
if( ! $this->dbh)
{
// failed connection, report
throw new Db_ConnectionException($this->error());
}
$this->setCharset($this->char_set, $this->dbcollat);
}... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function init()\n {\n $this->_db = Instance::ensure($this->_db, Connection::class);\n }",
"private function initDatabase() {\n \n \n \n }",
"public static function init() {\n\t\tself::$_db = Storage::get('objects.database');\n\t}",
"function dbInit()\n {\n ... | [
"0.82228285",
"0.78961664",
"0.76025844",
"0.758668",
"0.7551538",
"0.75213546",
"0.7487076",
"0.74467164",
"0.7393761",
"0.73540205",
"0.7325785",
"0.73119",
"0.7310729",
"0.7270737",
"0.7222747",
"0.7213148",
"0.7167324",
"0.7165485",
"0.7121169",
"0.7100054",
"0.70976174",... | 0.65363926 | 87 |
Runs the query and returns the result object. | public function query($sql, $binds = array())
{
if(empty($sql))
{
throw new Db_QueryException('Invalid query, the query is empty');
}
if( ! empty($binds))
{
$sql = $this->replaceBinds($sql, $binds);
}
$is_write = $this->isWriteQuery($sql);
// write query redirection
if($this->redirect_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run(){\n $sql = $this->sql();\n return $this->query($sql,$this->args);\n }",
"public function execute()\n\t{\n\t\t// Use cached results if found (previous count() or other internal call)\n\t\tif($this->activeQueryResults) {\n\t\t\t$results = $this->activeQueryResults;\n\t\t} else... | [
"0.76487905",
"0.73799455",
"0.7364169",
"0.7255567",
"0.72362214",
"0.71845144",
"0.711135",
"0.7110543",
"0.7110543",
"0.7110543",
"0.703726",
"0.69927007",
"0.69883573",
"0.69883573",
"0.6958207",
"0.6926837",
"0.6907376",
"0.6886187",
"0.6868117",
"0.6866045",
"0.68306625... | 0.0 | -1 |
SQLBUILDER INTERFACING METHODS Creates a SELECT query object. | public function select($columns = false)
{
$q = new Db_Query_Select($this, false);
if($columns)
{
$q->column($columns);
}
return $q;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static function buildSelectionQuery() \n {\n return Query::select()->\n from(self::getTableName());\n }",
"public function createSelectSql(): \\Hx\\Db\\Sql\\SelectInterface;",
"protected function getSelect() {\n $oSql = new SqlSelect();\n $oSql->setEntity($this->... | [
"0.75143063",
"0.7367018",
"0.7236357",
"0.7064339",
"0.6959519",
"0.68911064",
"0.6874126",
"0.6865642",
"0.6794552",
"0.6789747",
"0.67683846",
"0.6767811",
"0.675273",
"0.674597",
"0.67172503",
"0.67172503",
"0.6685698",
"0.666958",
"0.66568166",
"0.6638531",
"0.6638531",
... | 0.0 | -1 |
Inserts data into the database, returns a query object if no data is supplied. | public function insert($table, $data = false)
{
$ret = new Db_Query_Insert($this, $table);
// if we have data, perform the insert
if($data)
{
$ret->set($data);
return $ret->execute();
}
else
{
return $ret;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function insert($data)\n {\n return $this->db->insert($this->name, $data);\n }",
"public function insert() {\n\t\t\t\n\t\t\t$insert_array = $this->buildInsertFields();\n\t\t\t$query = \"INSERT INTO \" . $this->table_name . \" (\" . $insert_array['insert_statement'] . \") VALUES (\" . \n\t\t\t... | [
"0.7115981",
"0.69601935",
"0.6724027",
"0.6683662",
"0.66617984",
"0.6651555",
"0.66447645",
"0.660771",
"0.65867186",
"0.65184546",
"0.6518225",
"0.64590424",
"0.6422764",
"0.64108425",
"0.6377795",
"0.63517624",
"0.6349784",
"0.63473827",
"0.6327641",
"0.6323209",
"0.63147... | 0.695539 | 2 |
Updates data in the database, returns a query object if no conditions are supplied. | public function update($table, $data = false, $conditions = false)
{
$ret = new Db_Query_Update($this, $table);
if($data)
{
$ret->set($data);
}
if($conditions)
{
$ret->where($conditions);
return $ret->execute();
}
else
{
return $ret;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function update()\n {\n return new QueryProxy('update', $this);\n }",
"abstract function update (\\Database\\Query\\Query $query);",
"public function update() {\n $Sql = \"UPDATE \" . $this->tableName[0] . \" SET \";\n foreach ($this->fieldListArray as $Key_ => $Value_) {\n ... | [
"0.68653035",
"0.6748633",
"0.6685254",
"0.6607288",
"0.6595529",
"0.6529637",
"0.643109",
"0.6402614",
"0.63960993",
"0.63922554",
"0.63687676",
"0.63676673",
"0.6352497",
"0.6337003",
"0.63058287",
"0.6298464",
"0.62855536",
"0.6285401",
"0.62753195",
"0.62752974",
"0.62674... | 0.65638167 | 5 |
Deletes data in the database, returns a query object if no conditions are supplied. | public function delete($table, $conditions = false)
{
$ret = new Db_Query_Delete($this, $table);
if($conditions)
{
$ret->where($conditions);
return $ret->execute();
}
else
{
return $ret;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete() \n {\n $this->_data['query'] = 'DELETE';\n $this->_data['from'] = ' FROM '.$this->_data['from'];\n $this->_data['query'] .= $this->_data['from'];\n if (func_num_args() > 0) {\n $this->where(func_get_args());\n }\n return $this;\n }... | [
"0.7482866",
"0.73742163",
"0.7078866",
"0.7018141",
"0.69646114",
"0.6850219",
"0.6820215",
"0.67858964",
"0.67414534",
"0.6738654",
"0.67377985",
"0.6720946",
"0.67124474",
"0.67096734",
"0.67091",
"0.6636948",
"0.66090494",
"0.6589385",
"0.65773255",
"0.6535435",
"0.648025... | 0.61536777 | 55 |
SQL UTILITY METHODS Escapes the supplied value for usage in SQL queries. | public function escape($value)
{
switch(gettype($value))
{
case 'NULL':
$value = 'NULL';
break;
case 'boolean':
$value = $this->escapeBoolean($value);
break;
case 'integer':
case 'double':
break;
default:
$value = '\''.$this->escapeStr($value).'\'';
break;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function escape($value)\n {\n // SQL standard is to use single-quotes for all values\n return \"'$value'\";\n }",
"public function escapeValue($value): string {\n\t\treturn $this->sqlAdapter->escapeValue($value);\n\t}",
"public static function escape($value) {}",
"public static fun... | [
"0.834221",
"0.8261219",
"0.8255578",
"0.8240682",
"0.81055045",
"0.81055045",
"0.7972686",
"0.7868556",
"0.784684",
"0.78198326",
"0.7791371",
"0.77435446",
"0.7704005",
"0.76732135",
"0.7662215",
"0.76491386",
"0.75140977",
"0.7423931",
"0.7423137",
"0.731796",
"0.7307191",... | 0.7705336 | 12 |
Protects all identifiers (ie. all words) in the supplied string. | public function protectIdentifiers($item)
{
return trim(preg_replace('/([\w-\$]+)/', $this->IDENT_CHAR.'$1'.$this->IDENT_CHAR, $item));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function protect(&$string)\n\t{\n\t\tRLProtect::protectForm($string, $this->src_params->protected_tags);\n\t}",
"function protect($string) {\n\t$protection = htmlspecialchars(trim($string), ENT_QUOTES);\n\treturn $protection;\n}",
"public function checkString($string)\n {\n $forbiddenList = $this->_m... | [
"0.6882256",
"0.666295",
"0.64720184",
"0.6401205",
"0.637982",
"0.63797563",
"0.6363123",
"0.6131809",
"0.60740006",
"0.60551155",
"0.6036669",
"0.5974882",
"0.5942364",
"0.5908555",
"0.58477354",
"0.58030766",
"0.5736333",
"0.5689247",
"0.5646134",
"0.56450456",
"0.5637931"... | 0.51648223 | 68 |
Prefixes the received string with the database prefix. | public function prefix($str = '')
{
return $this->dbprefix . $str;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPrefixFromDB(){\n foreach($this->getTables() as $table){\n $prefix = explode('_', $table);\n if(isset($prefix[1])){\n if($this->prefix==$prefix[0]) break;\n else $this->prefix = $prefix[0];\n }\n }\n }",
"protected... | [
"0.72928554",
"0.6971976",
"0.6709892",
"0.65874255",
"0.65150875",
"0.6259322",
"0.6228376",
"0.62179565",
"0.62154824",
"0.6181691",
"0.6165695",
"0.61318046",
"0.60671395",
"0.6029406",
"0.6022031",
"0.5945402",
"0.5922754",
"0.5883344",
"0.58778167",
"0.58213323",
"0.5821... | 0.7688645 | 0 |
Determines if the query is a write query. | public function isWriteQuery($sql)
{
if( ! preg_match('/^\s*"?(INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD DATA|SET|COPY|ALTER|GRANT|REVOKE|LOCK|UNLOCK)\s+/i', $sql))
{
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isQueryWrite($sql)\n {\n $operations = Config::inst()->get(static::class, 'write_operations');\n return $this->isQueryType($sql, $operations);\n }",
"public function isWriteQuery( $sql ) {\n\t\treturn !preg_match( '/^(?:SELECT|BEGIN|ROLLBACK|COMMIT|SET|SHOW|EXPLAIN|\\(SELECT)\... | [
"0.79041547",
"0.77385694",
"0.66181827",
"0.65128297",
"0.6283752",
"0.6283752",
"0.6282928",
"0.6282928",
"0.62821645",
"0.62351453",
"0.6111483",
"0.6108087",
"0.6066234",
"0.6062989",
"0.6055615",
"0.6007751",
"0.5934007",
"0.5928537",
"0.5918185",
"0.5913448",
"0.5909968... | 0.7707936 | 2 |
Replaces all the bound parameters with the values in the bind array. ! ATTENTION !: Identifiers will not be protected in bound statement! Only the bound data will be escaped! Escaping of values for LIKE condition does not escape % and _ ! | public function replaceBinds($sql, $binds = array())
{
$binds = (Array) $binds;
// named binds
if(preg_match_all('/:([\w]+)(?=\s|$)/', $sql, $matches))
{
$result = '';
// replace the named binds
foreach($matches[1] as $id)
{
if( ! isset($binds[$id]))
{
throw new Db_Connection_Mi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bindAllValues($statement, $params){\n\n\t\tforeach($params as $param => $value) {\n\n if (startsWith($value, 'C')) {\n $aux = explode(\" \", $value);\n $result = \"\";\n foreach($aux as $value){\n if ($value == \"C\") {\n $result .= \"C/\";\n } else {... | [
"0.70859736",
"0.6979648",
"0.6853562",
"0.67661196",
"0.6753702",
"0.6604251",
"0.65908355",
"0.65449053",
"0.64834356",
"0.63999945",
"0.62715924",
"0.62674147",
"0.6196167",
"0.6168405",
"0.6152807",
"0.61424315",
"0.6130481",
"0.60820204",
"0.60412604",
"0.603405",
"0.602... | 0.6979376 | 2 |
CACHING METHODS Activates caching. | public function cacheOn()
{
$this->cache_on = true;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function enableCaching(): void\n {\n static::$caching = true;\n }",
"public function enableCaching()\n {\n $this->cache = true;\n }",
"public function setCaching($cache);",
"public function startCache() {}",
"public function setUpCache();",
"public function isCache... | [
"0.75793654",
"0.7470199",
"0.72897583",
"0.72074914",
"0.7047709",
"0.7027391",
"0.7014667",
"0.7006018",
"0.6991231",
"0.6953769",
"0.69054294",
"0.6895004",
"0.68936753",
"0.68936753",
"0.6861695",
"0.6766153",
"0.67399466",
"0.6739524",
"0.67180043",
"0.6713805",
"0.67068... | 0.68934137 | 14 |
Returns the cache object. | public function getCache()
{
if( ! $this->cache_on)
{
return false;
}
if(isset($this->cache_obj))
{
return $this->cache_obj;
}
$class = 'Db_Cache_'.$this->cachedrv;
$this->cache_obj = new $class($this->cacheopt);
return $this->cache_obj;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function cache(): object\n {\n return $this->baseApp($this)->loadCache();\n }",
"protected function getObject()\n\t{\n\t\tif( !isset( $this->object ) ) {\n\t\t\t$this->object = \\Aimeos\\MAdmin\\Cache\\Manager\\Factory::createManager( $this->context )->getCache();\n\t\t}\n\n\t\treturn $this->... | [
"0.8491063",
"0.8272435",
"0.8230588",
"0.815635",
"0.8081522",
"0.8027498",
"0.800863",
"0.7936503",
"0.78997594",
"0.78183204",
"0.77996975",
"0.7795254",
"0.77855825",
"0.7785039",
"0.7757579",
"0.7753224",
"0.77438504",
"0.77414757",
"0.77256286",
"0.77256286",
"0.7725628... | 0.7856681 | 9 |
Sets a caching object to use. | public function setCache(Db_Cache $cache_object)
{
$this->cache_obj = $cache_object;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCaching($cache);",
"public static function setCache($cache) {}",
"public static function setCache($caching)\n{\nself::$caching=$caching;\n}",
"public function setCache()\n\t{\n\t\treturn CacheBot::set($this->getCacheKey(), $this->getDataToCache(), self::$objectCacheLife);\n\t}",
"public ... | [
"0.7662689",
"0.7478994",
"0.72115475",
"0.7096587",
"0.7034508",
"0.6900784",
"0.680661",
"0.67533296",
"0.67366606",
"0.6707785",
"0.6707785",
"0.6707785",
"0.6707785",
"0.6707785",
"0.6638134",
"0.66143817",
"0.65812594",
"0.6570968",
"0.6562576",
"0.6511428",
"0.6503321",... | 0.73034406 | 2 |
ABSTRACT METHODS Connects to the database, using settings specified as properties in this object. Properties normally used: hostname username password pconnect (persistent connection? true/false) database (which database to select) | abstract protected function connect(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseUsername($this->dbUsername);\r\r\n\t\t$... | [
"0.789758",
"0.76268613",
"0.7626547",
"0.76214695",
"0.75966525",
"0.7516994",
"0.750593",
"0.7496189",
"0.748107",
"0.74631685",
"0.74467826",
"0.7324395",
"0.7302324",
"0.72985274",
"0.7291788",
"0.72747153",
"0.7268512",
"0.7245078",
"0.7235361",
"0.72144794",
"0.72024393... | 0.0 | -1 |
Closes the database connection. Is it really needed? because PHP autocloses the connection | abstract protected function setCharset($charset, $collation); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function closeDbConnection() {\n global $objDb;\n\n if (isset($objDb)) {\n @$objDb->Close();\n }\n }",
"function closedbconnection() {\r\n\t\t\r\n\t\t\r\n #if ($this->dbconnection = TRUE) {\r\n mysql_close($this->dbconnection);\r\n #}\r\n ... | [
"0.81842554",
"0.81042075",
"0.8056975",
"0.80195385",
"0.8010923",
"0.79844046",
"0.7979044",
"0.7956947",
"0.7939995",
"0.7910962",
"0.7888054",
"0.78641534",
"0.78637654",
"0.7858161",
"0.7855475",
"0.78457433",
"0.7831084",
"0.78214204",
"0.7814151",
"0.7796552",
"0.77944... | 0.0 | -1 |
Returns the database version. Uses a database query to check which database version is run. | abstract public function version(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function GetDatabaseVersion()\n\t{\n\t\tif ($this->database_version == -1) {\n\t\t\t$this->CheckCron();\n\t\t}\n\t\treturn $this->database_version;\n\t}",
"static function get_db_version()\n {\n global $db;\n \n $query = mysqli_query($db, \"SELECT `version` FROM `version`\");\n $versio... | [
"0.8347302",
"0.78702044",
"0.7634763",
"0.7573163",
"0.7154362",
"0.6998963",
"0.6947804",
"0.6900708",
"0.68813026",
"0.6851996",
"0.6825088",
"0.676316",
"0.67397285",
"0.66502994",
"0.6628457",
"0.66239125",
"0.6590142",
"0.6584175",
"0.6551495",
"0.65430105",
"0.6534691"... | 0.0 | -1 |
Executes a chunk of SQL. $this>dbh is loaded. | abstract protected function executeSql($sql); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function execute() {\n\t\t\t$connection = \\Leap\\Core\\DB\\Connection\\Pool::instance()->get_connection($this->data_source);\n\t\t\tif ($this->before !== NULL) {\n\t\t\t\tcall_user_func_array($this->before, array($connection));\n\t\t\t}\n\t\t\t$connection->execute($this->command());\n\t\t\tif ($this->after... | [
"0.6725172",
"0.65746903",
"0.65746903",
"0.65633637",
"0.65164983",
"0.64945835",
"0.6491507",
"0.64711785",
"0.6433531",
"0.6383885",
"0.62406033",
"0.62304485",
"0.61990815",
"0.61860704",
"0.6184613",
"0.61836565",
"0.6171756",
"0.61414635",
"0.61197805",
"0.6119561",
"0.... | 0.63399416 | 10 |
Returns the error number and error message from the latest error. $this>dbh may not be loaded. FORMAT: err_num: message | abstract public function error(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _getErrorMessage()\n {\n return pg_last_error($this->conn_id);\n }",
"public function get_error() {\n \t$error = oci_error($this->resource);\n \treturn $error[ 'code' ] . ': ' . $error[ 'message' ];\n }",
"public function getLastError() {\n\t\tif (null !== $... | [
"0.74100536",
"0.73485994",
"0.7312255",
"0.73044777",
"0.7247133",
"0.7172576",
"0.7166925",
"0.7141961",
"0.7121696",
"0.7121404",
"0.70846266",
"0.7042191",
"0.70184034",
"0.69942987",
"0.69863224",
"0.69792",
"0.6968251",
"0.6959922",
"0.6911082",
"0.6902845",
"0.6900922"... | 0.0 | -1 |
Returns the id created by the Auto Increment column. $this>dbh may not be loaded. | abstract public function insertId(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAutoIncrementID()\n {\n $this->sql_query->query(\"SELECT LAST_INSERT_ID()\");\n $result = $this->sql_query->getSingleResult();\n return $result[0];\n }",
"public function get_auto_increment()\n {\n return $this->db()->get_auto_increment($this->name);\n }",
"pu... | [
"0.8193189",
"0.78873616",
"0.78583926",
"0.7767518",
"0.7732206",
"0.77043444",
"0.7686252",
"0.7670427",
"0.7664641",
"0.7652321",
"0.76334506",
"0.76309705",
"0.7616304",
"0.76135385",
"0.75964075",
"0.7592829",
"0.7586996",
"0.75865406",
"0.75860506",
"0.7577515",
"0.7537... | 0.0 | -1 |
Returns the number of rows affected by the last query. $this>dbh may not be loaded. | abstract public function affectedRows(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function GetLastAffectedCount()\r\n\t{\r\n\t\tif ($this->IsConnected())\r\n\t\t{\r\n\t\t\treturn $this->_db->affected_rows;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}",
"public function getAffectedRows() {\n\t\treturn $this->last_sth->rowCount();\n\t}",
"public function lastAffecte... | [
"0.8240866",
"0.77067477",
"0.76640457",
"0.75426877",
"0.7446946",
"0.7444784",
"0.742676",
"0.7407418",
"0.74022186",
"0.73942596",
"0.7394053",
"0.7371102",
"0.7351128",
"0.7329465",
"0.7307685",
"0.7288702",
"0.72807366",
"0.7274158",
"0.7263043",
"0.72197133",
"0.7191395... | 0.0 | -1 |
Escapes a string for value usage in SQL. $this>dbh may not be loaded. | abstract public function escapeStr($str, $like = false); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function escape($value) {}",
"public abstract function escapeString($value);",
"abstract public function escapeString($value);",
"public static function escape($value) {\n return slDatabaseManager::getConnection()->escape($value);\n }",
"public function escape($value);",
"public f... | [
"0.76288754",
"0.76190734",
"0.75712895",
"0.7536677",
"0.75162303",
"0.75162303",
"0.7460285",
"0.7412365",
"0.74092454",
"0.73708284",
"0.7362784",
"0.73319685",
"0.73201686",
"0.7305129",
"0.7305129",
"0.72941864",
"0.7272463",
"0.7266917",
"0.72575444",
"0.7249092",
"0.72... | 0.0 | -1 |
Returns a query which fetches the tables in the database. Preferably return the tables in the column TABLE_NAME. If the listing of tables isn't supported on this database, return an empty string. | abstract protected function _listTables(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function qsGetDbTables()\n {\n $sql = 'show tables';\n $d = $this->qExecPluck($sql);\n\n return $d;\n }",
"public function getAllTables()\n {\n return $this->fetchColumn(\"SHOW TABLES\");\n }",
"public function list_tables(){\n\t\treturn $this->fetch_all(\"SHOW ... | [
"0.7635658",
"0.74808294",
"0.7302287",
"0.7244729",
"0.722477",
"0.72061694",
"0.71937984",
"0.7164325",
"0.7144741",
"0.71406645",
"0.7110024",
"0.70985925",
"0.7070991",
"0.7065147",
"0.70560986",
"0.69394463",
"0.6929332",
"0.69254905",
"0.68828875",
"0.68619084",
"0.6853... | 0.6161686 | 80 |
Creates the unique limit string for this driver. | abstract public function _limit($str, $limit, $offset = false); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function uniqueCode($limit = \"25\")\n {\n return substr(base_convert(sha1(uniqid(mt_rand())), 16, 36), 0, $limit);\n }",
"public static function build_limit( $limit ) {\n if ( empty( $limit ) ) {\n return '';\n }\n\n return ' LIMIT ' . absint( $limit ) . ' ';\n }"... | [
"0.7083062",
"0.68144065",
"0.68141955",
"0.67697394",
"0.6429254",
"0.63821024",
"0.6316173",
"0.6226816",
"0.59858936",
"0.5975246",
"0.59384465",
"0.59353095",
"0.5887231",
"0.58769006",
"0.5873603",
"0.5854253",
"0.58468366",
"0.5844282",
"0.58264494",
"0.5804904",
"0.578... | 0.0 | -1 |
Returns the SQL keyword for random ordering. | abstract public function getRandomKeyword(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getQueryOrderby() {\n return '`'.$this->name.'`';\n }",
"public function getRandomQuote(): string\n {\n return (string)$this->getAllQuotes()->random();\n }",
"function getOrderingAndPlaygroundQuery()\n\t{\n\t\treturn 'SELECT ordering AS value,name AS text FROM #__joomleag... | [
"0.61386317",
"0.6116469",
"0.6021833",
"0.58818126",
"0.586873",
"0.586873",
"0.5844745",
"0.5822076",
"0.5771558",
"0.5745871",
"0.5741764",
"0.571816",
"0.5662071",
"0.56508577",
"0.56201947",
"0.5547192",
"0.5538365",
"0.5505804",
"0.5505804",
"0.54847544",
"0.545872",
... | 0.68166715 | 0 |
Converts a PHP boolean to a database specific boolean. | abstract public function escapeBoolean($bool); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function pdo_bool($value) {\n\tif (is_bool($value)) {\n\t\t$value = (int)$value;\n\t}\n\treturn $value;\n}",
"function sqlBool($b, $db){\n\t$b = $db->real_escape_string($b);\n\tif ($b) return '1';\n\telse return '0';\n}",
"function to_boolean($val);",
"public function convertToSqlBoolean(bool $value)\n {\... | [
"0.7679464",
"0.7489117",
"0.73954034",
"0.72404546",
"0.72106194",
"0.71101743",
"0.70285153",
"0.69535285",
"0.6910177",
"0.68636686",
"0.6848418",
"0.68333775",
"0.682822",
"0.68271154",
"0.6815878",
"0.6804394",
"0.68000895",
"0.6772343",
"0.6768834",
"0.67341536",
"0.669... | 0.7289584 | 3 |
Converts a database boolean to a PHP boolean. | abstract public function unescapeBoolean($bool); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function pdo_bool($value) {\n\tif (is_bool($value)) {\n\t\t$value = (int)$value;\n\t}\n\treturn $value;\n}",
"function to_boolean($val);",
"function sqlBool($b, $db){\n\t$b = $db->real_escape_string($b);\n\tif ($b) return '1';\n\telse return '0';\n}",
"public function toBool() : bool\n {\n return b... | [
"0.76987666",
"0.7666189",
"0.74469936",
"0.74380076",
"0.73818576",
"0.73509306",
"0.7331626",
"0.73213124",
"0.72369504",
"0.71789324",
"0.71378005",
"0.71255237",
"0.710767",
"0.70884067",
"0.706089",
"0.70386016",
"0.6901595",
"0.6900293",
"0.69002867",
"0.68966776",
"0.6... | 0.68006104 | 23 |
Execute the console command. | public function handle(UpdateRaidMonsters $updateRaidMonsters) {
$events = Event::whereNotNull('raid_id')->get();
foreach ($events as $event) {
$raidBoss = RaidBoss::where('raid_boss_id', $event->raid->raid_boss_id)->first();
$raidBoss->update([
'boss_c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() meth... | [
"0.6469962",
"0.6463639",
"0.64271367",
"0.635053",
"0.63190264",
"0.62747604",
"0.6261977",
"0.6261908",
"0.6235821",
"0.62248456",
"0.62217945",
"0.6214421",
"0.6193356",
"0.61916095",
"0.6183878",
"0.6177804",
"0.61763877",
"0.6172579",
"0.61497146",
"0.6148907",
"0.614841... | 0.0 | -1 |
Using the MySQLi functions to access MySQL database servers. | function dbConnect(){
$host = "localhost"; // for uta.cloud server, "localhost" is the host name. Do not edit.
$user = "egsutacl_egs3925"; // put your own user name here.
$pwd = "Es*2802*"; // put your own database password here
$database = "egsutacl_4350"; // put your database name here
$port = "3306"; // server-... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cacti_db_connect($options)\n{\n $dbh = mysql_connect($options['server'], $options['username'],\n $options['password']);\n \n if (!$dbh) {\n trigger_error(\"Failed to connect to MySQL server '{$options['server']}' as '{$options['username']}'\",\n E_USER_ERROR);\n }\n ... | [
"0.701183",
"0.693801",
"0.6867594",
"0.68623334",
"0.6845898",
"0.68156064",
"0.67980814",
"0.6768744",
"0.6711326",
"0.67072535",
"0.6703584",
"0.6700471",
"0.66929203",
"0.66929203",
"0.66929203",
"0.6598441",
"0.65944046",
"0.658942",
"0.6549009",
"0.6541208",
"0.6531626"... | 0.6278708 | 70 |
Finds user by username | public static function findByUsername($username)
{
return self::findOne(['login_funcionario' => $username,'status_funcionario' => self::TIPO_STATUS_ATIVO]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findUserByUsername($username);",
"public function findUserByUsername($username);",
"public function findUserByUsername($username);",
"public function fetchUserByUserName($username);",
"public function getUserWithUsername($username);",
"private static function _FindUserByUsername(string $u... | [
"0.81629914",
"0.81629914",
"0.81629914",
"0.77969915",
"0.7698677",
"0.76939535",
"0.7664263",
"0.7611634",
"0.7537061",
"0.7513544",
"0.7408734",
"0.7398313",
"0.73971575",
"0.7397111",
"0.7388775",
"0.73147464",
"0.7293778",
"0.7248267",
"0.7241161",
"0.7216566",
"0.721332... | 0.0 | -1 |
Returns the Room element matching the roomTypeCode and rateCode | public function getRoom($roomTypeCode, $rateCode)
{
foreach ($this->data['Rooms'] as $room) {
$roomCode = isset($room['roomTypeCode']) ? $room['roomTypeCode'] : $room['RoomType']['roomCode'];
if ($room['rateCode'] == $rateCode && $roomCode == $roomTypeCode) {
return $... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRoomTypeCode()\n {\n return $this->roomTypeCode;\n }",
"public function fetchRoomRate($hotelCode, $systemCode)\n {\n $request = $this->requestBuilder->buildFetchRoomRateRequest($hotelCode, $systemCode);\n\n try {\n\n $this->soapClient->__soapCall(\"OTA_... | [
"0.616171",
"0.5976768",
"0.58063036",
"0.57969284",
"0.55680305",
"0.54355675",
"0.54233027",
"0.53818005",
"0.5322931",
"0.528244",
"0.528244",
"0.5169281",
"0.504992",
"0.49295795",
"0.49226284",
"0.4877125",
"0.48680547",
"0.4850828",
"0.48302957",
"0.47880512",
"0.477541... | 0.7992203 | 0 |
Returns parameters from a RoomAvailability response used in a PostReservation request | public function getReservationParameters($roomTypeCode, $rateCode)
{
$room = $this->getRoom($roomTypeCode, $rateCode);
if ($room['supplierType'] == 'E') {
$chargeableRate = $room['RateInfos'][0]['ChargeableRateInfo']['total'];
} else {
$chargeableRate = $room['RateIn... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function availabilityRoom($data)\n {\n $response = self::send('apartamentos/listar_disponibles/'.$data['reserva_id'], [],2);\n\n return $response;\n }",
"public function reserve_process($reserve_post_data)\n\t{\n\t\t$villaName = $reserve_post_data['hidVillaName'];\n\t\t$params['... | [
"0.5806621",
"0.5695397",
"0.5692484",
"0.54107344",
"0.5400307",
"0.53964657",
"0.5313365",
"0.5277829",
"0.5276042",
"0.52537525",
"0.5247322",
"0.52364796",
"0.5208493",
"0.51574385",
"0.5140364",
"0.5124888",
"0.5112833",
"0.5103807",
"0.5099823",
"0.50813675",
"0.5072628... | 0.0 | -1 |
Compare two image to chec similarity | public function compare($inputImg, $scrapeImg) {
if (!$this->validImage($this->folder."/local/".$inputImg)) {
return false;
}
// Compared to cryptographic hash functions like MD5 and SHA1 between two image
if ($this->compareHash($inputImg, $scrapeImg)) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkGraphicSimilarity()\r\n\t{\r\n\t\t// check if images are identical, graphica-wise (upto a given tolerance) \r\n\t\t$tmpFile = tempnam(dirname(__FILE__), 'imageComperingTmp');\r\n\t\t$convert = dirname(kConf::get('bin_path_imagemagick')) . '\\compare';\r\n\t\t$options = '-metric RMSE';\r\n\t\t$... | [
"0.7046916",
"0.68682003",
"0.6214628",
"0.6116575",
"0.58857757",
"0.5684953",
"0.5592639",
"0.548754",
"0.54823476",
"0.5390604",
"0.5389533",
"0.53583",
"0.53527266",
"0.5290543",
"0.52869695",
"0.52434343",
"0.5211531",
"0.51578885",
"0.49723974",
"0.49654257",
"0.4931891... | 0.68278134 | 2 |
Compared to cryptographic hash functions like MD5 and SHA1 between two image With cryptographic hashes, the hash values are random. The data used to generate the hash acts like a random seed, so the same data will generate the same result, but different data will create different results. Comparing two SHA1 hash values... | public function compareHash($inputImg, $scrapeImg) {
$inputImgSha1Hash = sha1_file($this->folder."/local/".$inputImg);
$inputImgMd5Hash = md5_file($this->folder."/local/".$inputImg);
//$scrapeImgContent = file_get_contents($scrapeImg);
$scrapeImgSha1Hash = sha1_file($scrapeImg);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hashEquals($a,$b){\n\tif(!val('s',$a,$b))return false;\n\t$m=microtime();\n\t$str1 = sha1($a.$m.$b);\n\t$str2 = sha1($b.$m.$a);\n\treturn hash_equals($str1, $str2);\n}",
"public function hash();",
"public function compare($a,$b)\n\t{\n\t\t$i1 = $this->createImage($a);\n\t\t$i2 = $this->createImage($b)... | [
"0.63146394",
"0.62967885",
"0.6232752",
"0.6197959",
"0.60261554",
"0.59724563",
"0.593902",
"0.5862954",
"0.58219916",
"0.5738497",
"0.5714879",
"0.5705021",
"0.5650003",
"0.56445163",
"0.56280637",
"0.55894434",
"0.5580505",
"0.55524045",
"0.5502134",
"0.5481811",
"0.54647... | 0.6308485 | 1 |
Calculate Hamming Distance between two image Compare two image similarity perceptual hashes can be compared giving you a sense of similarity between the two data sets Reference: Reference: Though the library is under development, it's work fine | public function hammingDistance($inputImg, $scrapeImg) {
$hasher = new \Jenssegers\ImageHash\ImageHash();
/*$distance = $hasher->compare($inputImg, $scrapeImg);*/
$hash1 = $hasher->hash($this->folder."/local/".$inputImg);
$hash2 = $hasher->hash($scrapeImg);
$distance = $hasher-... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hamDist($a ,$b) {\n\n $dist = 0;\n\n $a = str_split($a);\n $b = str_split($b);\n\n for ($i = 0; $i < count($a); $i++) {\n\n if (isset($a[$i]) && isset($b[$i])) { # While this won't give errors if the inputs aren't of the same length this function doesn't work properly for such use cases... | [
"0.6737578",
"0.66912234",
"0.6161101",
"0.6073096",
"0.5798081",
"0.5694681",
"0.56911635",
"0.55996567",
"0.55986834",
"0.5581779",
"0.55033344",
"0.5458709",
"0.54105705",
"0.53245574",
"0.5322463",
"0.53208417",
"0.5263463",
"0.52036214",
"0.51555103",
"0.5131655",
"0.511... | 0.6571414 | 2 |
Display a listing of the resource. | public function index()
{
//PERMISO DE ACCESO
if (!Auth::user()->can('Almacen | Acceso') || !Auth::user()->can('Almacen - Histórico | Acceso')) {
return redirect()->route('home');
}
$entradas = Entrada::where("tipo_mov", "E")->with('proveedor')->get();
$data = a... | {
"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 |
/ SQL USER /////////////////////////////////////////////////////////////////////////////////// | public function getUser($pseudo) {
$pdoStat = PdoMedProjet::$conn->prepare('SELECT * FROM users WHERE login = :id');
$pdoStat->bindParam(':id', $pseudo, PDO::PARAM_STR);
$pdoStat->execute();
return $pdoStat->fetch();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSQLUsers() {\n\t return sprintf(\"SELECT user AS user_name FROM mysql.user ORDER BY user ASC\");\n\t}",
"abstract public function user();",
"static function storeUser() : string\n {\n return \"INSERT INTO users(nickname, password, type, mail)\n VALUES (:nickname, ... | [
"0.6706693",
"0.66285866",
"0.6505375",
"0.6441005",
"0.6377338",
"0.63278186",
"0.62634355",
"0.62634355",
"0.62634355",
"0.62634355",
"0.62634355",
"0.62634355",
"0.62634355",
"0.62634355",
"0.6246909",
"0.623891",
"0.61936",
"0.6046961",
"0.6046451",
"0.60266423",
"0.60240... | 0.0 | -1 |
/ SQL LIVRE /////////////////////////////////////////////////////////////////////////////////////////// | public function getLivre($genre, $format, $support, $search) {
$pdo = PdoMedProjet::$conn;
$requete = 'SELECT media.id_media, media.titre, media.prix, media.etat, media.stock, media.id_support'
. ' FROM media JOIN media_livre ON media.id_media = media_livre.id_media';
if ($genre ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract function getSQL();",
"public function getSQL();",
"public function fetchSqlString();",
"public function get_sql()\n {\n }",
"public function getSql();",
"public function getSql();",
"abstract protected function _getSQL(): String;",
"abstract protected function buildSQL(): strin... | [
"0.7725019",
"0.75228715",
"0.7292834",
"0.7153759",
"0.713137",
"0.713137",
"0.7111799",
"0.69673157",
"0.66237867",
"0.66168255",
"0.65852493",
"0.65822273",
"0.6534659",
"0.6524141",
"0.65061516",
"0.64945364",
"0.63929254",
"0.6387077",
"0.63738596",
"0.6319936",
"0.63178... | 0.0 | -1 |
/ SQL MUSIQUE /////////////////////////////////////////////////////////////////////////////////////////// | public function getMusique($genre, $format, $support, $search) {
$pdo = PdoMedProjet::$conn;
$requete = 'SELECT media.id_media, media.titre, media.prix, media.etat, media.stock, media.id_support'
. ' FROM media JOIN media_audio ON media.id_media = media_audio.id_media';
if ($genr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract function getSQL();",
"public function getSQL();",
"public function traerDatos(Sql $sql);",
"public function make_sql()\n\t{\n\t\ttry{\n\t\t\t$metot = $this->metot;\n\t\t\t$metot = strtolower($metot);\n\t\t\t\n\t\t\tif($metot == \"select\") /* Select için sql oluşturma*/\n\t\t\t{\n\t\t\t\tif ((count(... | [
"0.6355496",
"0.6060027",
"0.5904847",
"0.589693",
"0.58355045",
"0.57739013",
"0.57435495",
"0.5739616",
"0.57227117",
"0.567536",
"0.5654594",
"0.5592998",
"0.55823994",
"0.55538446",
"0.5522174",
"0.5522174",
"0.5512845",
"0.54933256",
"0.54627615",
"0.54588217",
"0.545528... | 0.0 | -1 |
/ SQL FILM /////////////////////////////////////////////////////////////////////////////////////////// | public function getFilm($genre, $format, $support, $search) {
$pdo = PdoMedProjet::$conn;
$requete = 'SELECT media.id_media, media.titre, media.prix, media.etat, media.stock, media.id_support'
. ' FROM media JOIN media_film ON media.id_media = media_film.id_media';
if ($genre != ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function pathToSQLFile();",
"abstract function getSQL();",
"public function getFile($conn){\n\t\t//preparo lo statement che mi ricava tutte le informazioni \n\t\t//dalla tabella Filmato_Presentazione.\n\t\t$sth = $conn->prepare(\"select * from Filmato_Presentazione\");\n\t\t$sth->execute();\n\t\treturn ... | [
"0.7029785",
"0.63752156",
"0.62914366",
"0.6243827",
"0.6201272",
"0.59421134",
"0.5891471",
"0.58682835",
"0.5860103",
"0.5850381",
"0.58491397",
"0.5847336",
"0.58404255",
"0.5837731",
"0.5836504",
"0.5809016",
"0.5801029",
"0.57959086",
"0.57759255",
"0.5761552",
"0.57615... | 0.0 | -1 |
/ SQL LIVRE MUSIQUE FILM //////////////////////////////////////////////////////////// | public function getSupport() {
$pdoStat = PdoMedProjet::$conn->prepare('SELECT * FROM supports');
$pdoStat->execute();
return $pdoStat->fetchAll();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFilial(){\n $query = $this->connect->prepare(\"SELECT B.FILIAL FILIALORIGEM, \n C.FILIAL FILIALDESTINO\n FROM OP_VIAGEM A\n LEFT JOIN OP_VI... | [
"0.64792776",
"0.632532",
"0.62680805",
"0.6256387",
"0.6230629",
"0.6040971",
"0.60142213",
"0.5954998",
"0.594001",
"0.5902566",
"0.589391",
"0.5887652",
"0.58666587",
"0.5854593",
"0.5848923",
"0.576138",
"0.5745126",
"0.568662",
"0.56618637",
"0.5652466",
"0.5647507",
"... | 0.0 | -1 |
/ SQL MEDIA ////////////////////////////////////////////////////////////////////// | public function getUnMedia($id) {
$pdoStat = PdoMedProjet::$conn->prepare('SELECT * FROM media WHERE media.id_media = :id');
$pdoStat->bindParam(':id', $id, PDO::PARAM_INT);
$pdoStat->execute();
return $pdoStat->fetch();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function media();",
"function insertMedia(){\n\t\n\t\t $itemType = \"media\";\n\t\t $host = OpenContext_OCConfig::get_host_config();\n\t\t //$tableSize = $this->get_table_size($itemType);\n\t\t $tableSize = 209899;\n\t\t $fetchSize = 1000;\n\t\t $numFetches = round($tableSize / $fetchSize, 0)+1;\n\t... | [
"0.6809875",
"0.65092033",
"0.6320514",
"0.62574834",
"0.61909205",
"0.61493146",
"0.59817743",
"0.59628433",
"0.58461493",
"0.58419013",
"0.576814",
"0.5725433",
"0.5721663",
"0.56981725",
"0.5688481",
"0.5685587",
"0.56821394",
"0.56628793",
"0.565605",
"0.56383926",
"0.561... | 0.0 | -1 |
/ SQL COMMANDE ////////////////////////////////////////////////////////////////////// | public function addCommande() {
try {
$pdo = PdoMedProjet::$conn;
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$isUser = $_SESSION['compte']->getId();
$pdoStat = $pdo->prepare('INSERT INTO commande (id_user) VALUES (:id)');
$pdoStat->... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function commit() ;",
"public function commit()\n{\n\t$this->query('COMMIT');\n}",
"function commit() {\n\t\t\tself::$db->commit();\n\t\t\t$this->begin_executed = false;\n\t\t}",
"function commit();",
"function commit() {\n\t\tif (!$this->error) return OciCommit($this->conn);\n\t}",
"public function comm... | [
"0.7290686",
"0.6949992",
"0.6911484",
"0.6883414",
"0.6764025",
"0.66508436",
"0.66485506",
"0.66260564",
"0.6555834",
"0.65554136",
"0.65554136",
"0.65554136",
"0.65554136",
"0.65554136",
"0.6525784",
"0.6499336",
"0.6445885",
"0.6414622",
"0.63992923",
"0.6342298",
"0.6306... | 0.0 | -1 |
/ SQL STATS ////////////////////////////////////////////////////////////////////// | public function getLivreStat() {
$requete = 'SELECT SUM(commande_ligne.qtx) AS nbLivre FROM commande
JOIN commande_ligne ON commande_ligne.id_commande = commande.id_commande
JOIN media_livre ON media_livre.id_media = commande_ligne.id_media
WHERE year(CURRENT_DATE) = year(com... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function sql_stat($dbh=NULL)\n {\n //not implemented\n global $SQL_DBH;\n if (is_null($dbh))\n return '';\n else\n return '';\n }",
"function getSqlArrayForStats()\r\n\t{\r\n\t\tglobal $langs;\r\n\t\t$langs->load(\"users\");\r\n\r\n\t\t$statssql=array();\r\... | [
"0.647894",
"0.6358067",
"0.62286085",
"0.61349404",
"0.6079623",
"0.6005772",
"0.5993842",
"0.59072757",
"0.5854771",
"0.5787762",
"0.57010174",
"0.56998605",
"0.5664986",
"0.55959547",
"0.5579909",
"0.55767125",
"0.5511207",
"0.5501529",
"0.5501029",
"0.54874825",
"0.547641... | 0.0 | -1 |
Tests the rendered output and form output of a view element. | public function testViewElement() {
/** @var \Drupal\Core\Render\RendererInterface $renderer */
$renderer = $this->container->get('renderer');
$view = Views::getView('test_view_embed');
// Get the render array, #embed must be FALSE since this is the default
// display.
$render = $view->buildRen... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAddViewCheckRenderData()\n {\n $view = new View();\n $template = function ($data) {\n $str1 = $data[\"str1\"] ?? null;\n $str2 = $data[\"str2\"] ?? null;\n return \"$str1, $str2:\";\n };\n $view->set($template, [\"str1\" => \"str1\... | [
"0.68735725",
"0.6658313",
"0.63597697",
"0.6332892",
"0.62104124",
"0.60417074",
"0.602989",
"0.6016337",
"0.599019",
"0.59613544",
"0.5894255",
"0.58565694",
"0.58322227",
"0.5801372",
"0.5799887",
"0.57878375",
"0.5773308",
"0.57650477",
"0.57318866",
"0.5722924",
"0.56871... | 0.6673864 | 1 |
Tests the rendered output and form output of a view element, using the embed display plugin. | public function testViewElementEmbed() {
/** @var \Drupal\Core\Render\RendererInterface $renderer */
$renderer = $this->container->get('renderer');
$view = Views::getView('test_view_embed');
// Get the render array, #embed must be TRUE since this is an embed display.
$render = $view->buildRenderabl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testViewElement() {\n /** @var \\Drupal\\Core\\Render\\RendererInterface $renderer */\n $renderer = $this->container->get('renderer');\n $view = Views::getView('test_view_embed');\n\n // Get the render array, #embed must be FALSE since this is the default\n // display.\n $render =... | [
"0.7263963",
"0.65028906",
"0.58429575",
"0.5795715",
"0.57481295",
"0.5730318",
"0.5721338",
"0.5700863",
"0.556776",
"0.55454886",
"0.55210614",
"0.5463038",
"0.54495907",
"0.54444337",
"0.54443365",
"0.5403202",
"0.5388845",
"0.53888136",
"0.5376761",
"0.5359124",
"0.53468... | 0.7669745 | 0 |
Tests that an exception is thrown when an invalid View is passed. | public function testInvalidView() {
$renderer = $this->container->get('renderer');
$render_element = [
'#type' => 'view',
'#name' => 'invalid_view_name',
'#embed' => FALSE,
];
$this->expectException(ViewRenderElementException::class);
$this->expectExceptionMessage("Invalid View nam... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testViewWithBadTemplate()\n {\n $this->assertInstanceOf(BadTemplateView::class, new BadTemplateView(new CalculatorModel(), 'badTemplate'));\n }",
"public function testView() {\n\t\t$result = $this->CreditNote->view('creditnote-1');\n\t\t$this->assertTrue(isset($result['CreditNote']))... | [
"0.7145142",
"0.6943469",
"0.693128",
"0.6763396",
"0.67167914",
"0.6693515",
"0.65973866",
"0.65676624",
"0.65010494",
"0.64482534",
"0.6381933",
"0.63629955",
"0.61882293",
"0.61436385",
"0.6082546",
"0.60660946",
"0.60490143",
"0.6031803",
"0.6024824",
"0.60231495",
"0.597... | 0.8040539 | 0 |
Auto generated seed file | public function run()
{
\DB::table('orchardpools_footer')->delete();
\DB::table('orchardpools_footer')->insert(array (
0 =>
array (
'id' => 1,
'content' => '<p>susu sapi Lorem ipsum dolor sit amet, consectetur adipiscing eli... | {
"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 |
Show the form for creating a new resource. | public function create(Request $request)
{
return view('topics.create')->with(['section_id' => $request->input('section_id')]);
} | {
"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(CreateTopic $request)
{
$topic = new Topic();
$topic->section_id = $request->input('section_id');
$topic->title = $request->title;
$topic->save();
$post = new Post();
$post->user_id = Auth::user()->id;
$post->topic_id = $topic->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(Topic $topic)
{
if (!$topic)
return redirect('/forums')->with('error', 'Does not exists this topic');
$posts = $topic->posts()->with('user', 'likes')->paginate(20);
$i = 1 + $posts->perPage() * $posts->currentPage() - $posts->perPage();
foreach ($post... | {
"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(Topic $topic)
{
return view('topics.edit', compact('topic'));
} | {
"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 |
/ Methods that return a style array | public function getImageStyleAttrsArray(array $attrs = null, array $style = null) {
if (!isset($attrs['arria-hidden'])) {
$attrs['aria-hidden'] = 'true';
}
if (!isset($attrs['alt'])) {
$attrs['alt'] = '';
}
if (!isset($attrs['border'])) {
$attrs['border'] = '0';
}
if (!isset($attrs['a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_styles() {\n\t\treturn [];\n\t}",
"public function get_styles () {\r\n\t\treturn empty($this->_data[self::STYLES])\r\n\t\t\t? array()\r\n\t\t\t: $this->_data[self::STYLES]\r\n\t\t;\r\n\t}",
"public function getStyle();",
"public function getStyle() {}",
"function getStyle() {return $... | [
"0.779875",
"0.75016963",
"0.7260258",
"0.7171905",
"0.7089798",
"0.7015235",
"0.68779504",
"0.6795403",
"0.6754218",
"0.6651563",
"0.6648271",
"0.6551561",
"0.6551561",
"0.65168315",
"0.65060556",
"0.6481847",
"0.6480442",
"0.64659077",
"0.6465528",
"0.64504534",
"0.6409334"... | 0.5707983 | 93 |
/ Style Helper Classes | protected function getFluidImageStyle(array $style = null) {
// get basic styles for image
$style = $this->getImageStyle($style);
if (!isset($style['width'])) {
$style['width'] = '100%';
}
if (!isset($style['max-width'])) {
$style['max-width'] = self::EMAIL_WIDTH . 'px';
}
return $style... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function helper()\n\t{\n\t\n\t}",
"public function css();",
"function getStyle() {return $this->readstyle();}",
"public static function css();",
"public function getStyle() {}",
"function _style_fix()\n {\n }",
"function style ( $arguments = \"\" ) {\n $arguments = func_get_arg... | [
"0.63485223",
"0.6144873",
"0.5940594",
"0.5827143",
"0.5791518",
"0.57510906",
"0.5747677",
"0.57288873",
"0.5683121",
"0.56576395",
"0.5656837",
"0.5654311",
"0.5548428",
"0.5544685",
"0.552792",
"0.55235004",
"0.5522116",
"0.55002433",
"0.54782814",
"0.5477375",
"0.5476863... | 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()
{
return view('benefits.non_saudi.initial_study');
} | {
"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',
'national_id' => 'required',
'region' => 'required',
'age' => 'required',
]);
$result = '';
$nonSaudi = new NonSaudi();
// dd($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.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(NonSaudi $nonSaudi)
{
//
} | {
"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.8233183",
"0.81894475",
"0.6830127",
"0.6498529",
"0.6496276",
"0.6469191",
"0.64627224",
"0.63619924",
"0.6308743",
"0.62809277",
"0.6218707",
"0.61915004",
"0.617914",
"0.6172935",
"0.6137578",
"0.6118736",
"0.6107122",
"0.6106576",
"0.60931313",
"0.60798067",
"0.6046669... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit(NonSaudi $nonSaudi)
{
//
} | {
"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, NonSaudi $nonSaudi)
{
//
} | {
"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(NonSaudi $nonSaudi)
{
//
} | {
"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 |
/print_r(json_encode(array( array('Cycling', 20), array('Boomeranging', 10), array('Running', 30), array('Uncomplete', 50) ))); | function goal($name, $progress, $goal){
return array(
"name"=>$name,
"progress"=>($progress*100)."%",
"goal" => $goal
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkActiveStatus($json){\t\r\n\t// initiate\r\n\t$counter = 0;\r\n\t$counterActive = 0;\t\r\n\t//loop array\r\n\tforeach ($json as $key => $value){\t\r\n\t\tforeach ($value['fields'] as $key2 => $value2){\r\n\t\t\t// check if status is active\r\n\t\t\tif($value['active'] === true){\r\n\t\t\t\t// add to c... | [
"0.6012206",
"0.5691215",
"0.54721653",
"0.53899837",
"0.5388184",
"0.53238994",
"0.5311103",
"0.5309129",
"0.5294054",
"0.5292289",
"0.52913266",
"0.52859926",
"0.52644247",
"0.52612907",
"0.52456856",
"0.5215666",
"0.5207158",
"0.51993036",
"0.51982903",
"0.51875037",
"0.51... | 0.48209006 | 92 |
Display a listing of the resource. | public function index(Request $request)
{
//分类
$cates = getcatesbypid(0);
//获取所有数据
// $data=DB::table('link')->get();
//获取数据总条数
$count=DB::table('link')->where('status','=',1)->count();
//设置每页显示数据条数
$rev=20;
//获取最大有多少页
$maxpage=ceil($co... | {
"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(Request $Request)
{
//分类
$cates = getcatesbypid(0);
// echo 111;
// dd($Request->all());
//获取所有数据
$data=$Request->all();
//得到相应的数据
$name=$data['name'];
$email=$data['email'];
$url=$data['url'];
//status默认为... | {
"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.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.8233183",
"0.81894475",
"0.6830127",
"0.6498529",
"0.6496276",
"0.6469191",
"0.64627224",
"0.63619924",
"0.6308743",
"0.62809277",
"0.6218707",
"0.61915004",
"0.617914",
"0.6172935",
"0.6137578",
"0.6118736",
"0.6107122",
"0.6106576",
"0.60931313",
"0.60798067",
"0.6046669... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.6833... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ... | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n ... | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897... | 0.0 | -1 |
Render a label widget. | public function render(array $data, ContextInterface $context)
{
$data['class'] = 'col-sm-2 control-label';
return parent::render($data, $context);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function renderLabel(){\n $row = '';\n $row .= \"<div class=\\\"$this->div_class\\\">\";\n $row .= \"<label for=\\\"$this->id\\\" class=\\\"$this->label_class\\\">$this->label</label>\";\n return $row;\n }",
"function render_label() {\n return xFormTemplate::apply($th... | [
"0.744716",
"0.7366209",
"0.7088494",
"0.69584584",
"0.68050456",
"0.667217",
"0.6447861",
"0.6447665",
"0.64040786",
"0.6376109",
"0.637124",
"0.6334178",
"0.6277037",
"0.6254971",
"0.6254971",
"0.6229469",
"0.61883426",
"0.6170137",
"0.6155838",
"0.6079296",
"0.5981395",
... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.