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
Returns an array of tokens this test wants to listen for.
final public function register() { return [ T_ARRAY, T_OPEN_SHORT_ARRAY, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTokens(): array\n {\n return $this->tokens;\n }", "public function getAvailableTokens()\n {\n return array_keys( $this->tokens );\n }", "public function getTokens() {\n\t\treturn array_keys($this->tokens);\n\t}", "public function get_tokens()\n\t{\n\t\treturn $thi...
[ "0.68133146", "0.6487653", "0.6397045", "0.6326093", "0.627041", "0.6262117", "0.6258998", "0.6237562", "0.6207032", "0.6150431", "0.6053098", "0.5986526", "0.5863179", "0.5846821", "0.5831157", "0.5811848", "0.5811663", "0.5777088", "0.57391036", "0.57198495", "0.57187", "...
0.5449075
40
end register() Processes this sniff, when one of its tokens is encountered.
public function process(File $phpcsFile, $stackPtr) { $tokens = $phpcsFile->getTokens(); if ($tokens[$stackPtr]['code'] === T_ARRAY) { $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'no'); $arrayStart = $tokens[$stackPtr]['parenthesis_opener']; i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register() {\n\t\t// Nothing to do here, we're after the (de)activation hook.\n\t}", "public function register()\n\t{\n\t\t// @noop\n\t}", "abstract public function register ( );", "abstract public function register();", "abstract public function register();", "abstract public function re...
[ "0.6339625", "0.6269645", "0.6247827", "0.6196842", "0.6196842", "0.6196842", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0...
0.0
-1
end process() Processes a singleline array definition.
abstract protected function processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices);", "private function returnPlainArray($line) {\n\t//--\n\treturn $this->_toType($line);\n\t//--\n}", "abstract public function definition(): array;", "public function process(array $event);", "abstrac...
[ "0.5833234", "0.578845", "0.5637359", "0.54452986", "0.5385143", "0.5385143", "0.5385143", "0.5385143", "0.5369", "0.53541183", "0.53541183", "0.5309428", "0.5309428", "0.5309428", "0.5281433", "0.525203", "0.5249123", "0.5181106", "0.5166805", "0.5131105", "0.5131105", "0....
0.65887547
0
Processes a multiline array definition.
abstract protected function processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices);", "public function testMultiline()\n {\n $doc = <<<DOC\n/**\n * Summery should be ignored.\n *\n * General description\n * spanning a few lines\n * of doc-comment. Should be ignored.\n *\n * @...
[ "0.6517206", "0.54502034", "0.5444431", "0.5438063", "0.54275566", "0.54160976", "0.5408537", "0.53047884", "0.5280753", "0.52607656", "0.51509815", "0.5137147", "0.50036913", "0.49824205", "0.49154153", "0.49138665", "0.49121988", "0.48910573", "0.48597828", "0.47841817", "0...
0.7126296
0
Constructor for the class parser
public function __construct() { $this->links = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this->parser = Parser::create();\n\n parent::__construct();\n }", "function __construct() {\n\t\t// This is a hacky approach, elaborate on that\n\t\tif (isset(\\PHPParser_NodeAbstract::$reservedProperties['ignorables'])) {\n\t\t\tunset(\\PHPParser_NodeAbst...
[ "0.7394894", "0.72628075", "0.6819975", "0.6819975", "0.6763667", "0.67584085", "0.6607774", "0.658792", "0.6538309", "0.6522356", "0.65198874", "0.65045226", "0.6496189", "0.6471273", "0.6457216", "0.64302635", "0.64244646", "0.64195293", "0.64192843", "0.6404202", "0.639532...
0.0
-1
Callback function, berechnet die eingabe von Links
private function rep_links_callback($match) { $query = substr($match[0],2,-2); $db_Article = Article::getArticle()->select($query); if($db_Article != FALSE) { $query = ' <a href="' . urlencode($query) . '">' . $query . '</a> '; $this->links[$this->linkCount] = $db_Article; $this->linkCou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addLinks()\n {\n }", "public function getLinkFun() {}", "private static function links()\n {\n $files = ['Link'];\n $folder = static::$root.'Http/Links'.'/';\n\n self::call($files, $folder);\n\n $files = ['LinkKeyNotFoundException'];\n $folder = st...
[ "0.7269679", "0.7185538", "0.68854636", "0.6841672", "0.67582935", "0.6750871", "0.67384475", "0.67384475", "0.67361623", "0.6686169", "0.66398823", "0.66398823", "0.66368014", "0.66105616", "0.6588183", "0.6555275", "0.6547349", "0.6538612", "0.6515774", "0.65001607", "0.649...
0.6383457
25
Callback function, berechnet die eingabe von Titeln
private function rep_title_callback($match) { $query = substr($match[0],3,-3); $title = '<h2>'.$query.'</h2>'; return $title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function callback();", "abstract protected function registerCallback();", "function completeCallback()\r\n { }", "private function onCompletion()\n {\n }", "function handle_callback() {\r\n }", "function callback_text(array $args)\n {\n }", "public function getDefau...
[ "0.71250165", "0.6251414", "0.59976673", "0.5967255", "0.59317905", "0.58461964", "0.5845245", "0.5803567", "0.5783698", "0.5783698", "0.5783554", "0.5783554", "0.5783543", "0.57716006", "0.57363135", "0.56781137", "0.56378245", "0.5530718", "0.55252326", "0.5490038", "0.5467...
0.0
-1
Retrieve all navigation menus for that website.
public function getNavigation() { $search = $this->search(); $menuObjects = $search->getRecords(); $result = array(); $fields = $this->definition->fields(); $menuItemField = FieldService::instance()->getFieldByName($fields, "menuItems"); //$search->getRe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMenus() {}", "function api_list_menus() {\n\t\t$menus = array();\n\t\tforeach ( get_nav_menu_locations() as $menu_slug => $menu_id ) {\n\n\t\t\t$menu = $menu_id?self::get_menu_object($menu_id):false;\n\t\t\t$menus[ $menu_slug ] = $menu;\n\t\t}\n\n\t\treturn $menus;\n\t}", "public static func...
[ "0.73089737", "0.7088451", "0.69841474", "0.6957719", "0.69031924", "0.6885977", "0.68505716", "0.6834121", "0.6721595", "0.67091465", "0.6613587", "0.6611821", "0.6611394", "0.6567057", "0.65570587", "0.6545959", "0.6545266", "0.6481662", "0.6478773", "0.6465719", "0.6457324...
0.6286168
27
get user data from client
public function oAuthSuccess($client) { $userAttributes = $client->getUserAttributes(); //var_dump($userAttributes); //exit(); if(empty($userAttributes['email'])){ Yii::$app->session->setFlash('error', 'กรุณากด Allow Access ใน Facebook เพื่อใช้งาน Facebook Login'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserData() { \n // \"functions.php\";\n\n $response = $this->getRequest(\"me\");\n\n // Return an object of the JSON response\n return json_decode($response->getBody()->getContents());\n }", "public static function get_user_data()\n {\n }", "public func...
[ "0.76285887", "0.7554394", "0.7270594", "0.7270594", "0.7270594", "0.7270594", "0.7270594", "0.7270594", "0.7270594", "0.72628796", "0.7258839", "0.7235287", "0.7152189", "0.7125053", "0.70627064", "0.7009472", "0.6996983", "0.69771475", "0.6970739", "0.6926695", "0.6908921",...
0.0
-1
Run the database seeds.
public function run() { $this->fakeSelections(); }
{ "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(Request $request) { $storeproducts = StoreProduct::paginate(25); // if(auth()->user()->store==null){ // return redirect()->route('stores.create'); // } // if (auth()->user()->role->name=='admin'){ // $storeproducts=StoreProduct::where('st...
{ "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() { $storeproducts = StoreProduct::all(); $products = Product::paginate(25); $stores = Store::all(); $brand = Brand::all(); $units = Unit::all(); $seacrh = null; $show = 0; $bcategories = BCategory::all(); if (auth()->...
{ "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) { if (!$request->keyword) { if (auth()->user()->role->name == 'super admin') { for ($i = 0; $i < count($request->product_ids); $i++) { $va = explode(' ', $request->product_ids[$i]); StoreProduct:...
{ "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) { $storeproduct = StoreProduct::find($id); return view('admin.store_product.show', compact('storeproduct')); }
{ "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) { $storeproduct = StoreProduct::find($id); $products = Product::all(); $stores = Store::all(); $brands = Brand::all(); $units = Unit::all(); return view('admin.store_product.edit', compact('products', 'stores', 'brands', 'units', 'storeprodu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.683...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { if (auth()->user()->role->name == 'super admin') { $storeproduct = StoreProduct::find($id); $storeproduct->update($request->all()); } return redirect()->route('storeproducts.index'); }
{ "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) { if (auth()->user()->email == 'chhattofficial@chhatt.com') { $item = StoreProduct::find($id); $item->delete(); } return redirect()->back(); }
{ "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
Get the user that owns the card
public function user() { return $this->belongsTo( User::class ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOwner() {\n // no need to check whether exist because of database constrain\n return User::getUserById($this->owner_id);\n }", "public function user()\n {\n if (!is_null($this->user)) {\n return $this->user;\n }\n $user = null;\n try {...
[ "0.7173041", "0.6776359", "0.6720594", "0.6657766", "0.6639163", "0.65901184", "0.65805435", "0.6572616", "0.6529385", "0.65027726", "0.6443207", "0.6437094", "0.6430424", "0.64030737", "0.6376713", "0.63748497", "0.635282", "0.63424075", "0.6306452", "0.630007", "0.6270625",...
0.0
-1
Getters and Setters Get the Monograph
function &getMonograph() { return $this->_monograph; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMonograph() {\n\t\t$monographDao =& DAORegistry::getDAO('MonographDAO');\n\t\treturn $monographDao->getMonograph($this->_monographId);\n\t}", "public function getMilage()\n {\n }", "public function getMuscle() {\n return $this->_muscle;\n }", "public function getMarca(){ return $this->m...
[ "0.6973", "0.66966915", "0.6026542", "0.59726137", "0.5963439", "0.59013295", "0.5890213", "0.5831762", "0.5793854", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57...
0.76305884
0
Get the Stage Id
function getStageId() { return $this->_stageId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStageId()\n {\n return $this->get(self::_STAGE_ID);\n }", "public function getStageId()\n {\n return $this->get(self::_STAGE_ID);\n }", "public function getStageId()\n {\n return $this->get(self::_STAGE_ID);\n }", "function getStageId() {\n\t\treturn ...
[ "0.8962569", "0.8962569", "0.8962569", "0.87752014", "0.80998963", "0.7069984", "0.6996967", "0.69835126", "0.66017115", "0.64304286", "0.641301", "0.6329982", "0.63270277", "0.6326695", "0.6296777", "0.62374985", "0.6222931", "0.6205347", "0.6188066", "0.61791974", "0.615260...
0.84340346
4
Get the extra form parameters.
function getFormParams() { return $this->_formParams; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExtra()\n {\n return $this->getParameter('extra');\n }", "public function getFormParameters()\n {\n return $this->form_parameters;\n }", "public function getExtraFields()\n {\n $extraFields = new FieldList();\n\n $token = $this->getSecurityToken();\...
[ "0.7636835", "0.7294869", "0.7219707", "0.72065485", "0.7067698", "0.7051456", "0.70209813", "0.6743102", "0.6726132", "0.66934544", "0.66843635", "0.66764", "0.66731155", "0.66509604", "0.6623037", "0.66126716", "0.6506721", "0.64680296", "0.6462069", "0.6429144", "0.6427468...
0.71637976
4
Overridden template methods Get the names of fields for which data should be localized
function getLocaleFieldNames() { $this->_metadataFormImplem->getLocaleFieldNames(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_fields_to_translate()\n {\n }", "function getLocaleFieldNames() {\n\t\treturn array('name', 'description', \"applicationForm\", \"survey\");\n\t}", "function getLocaleFieldNames() {\n\t\treturn parent::getLocaleFieldNames() + array('title');\n\t}", "public function ge...
[ "0.7309508", "0.7211084", "0.7108568", "0.70771533", "0.70442444", "0.7015629", "0.69354904", "0.6898855", "0.68696564", "0.68696564", "0.68346024", "0.68207115", "0.6721629", "0.659491", "0.65418035", "0.64503086", "0.64497286", "0.6444157", "0.64334935", "0.6324973", "0.632...
0.7300844
1
Initialize form data with the author name and the monograph id.
function initData($args, &$request) { AppLocale::requireComponents( LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_OMP_SUBMISSION ); $this->_metadataFormImplem->initData($this->getMonograph()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function form_init_data()\r\n {\r\n $this->set_element_value(\"Swimmers\", FT_CREATE) ;\r\n $this->set_element_value(\"Swim Meets\", FT_CREATE) ;\r\n $this->set_element_value(\"Swim Teams\", FT_CREATE) ;\r\n }", "function form_init_data()\r\n {\r\n // Initialize the form fie...
[ "0.62404805", "0.6132263", "0.61175406", "0.602076", "0.60145986", "0.5936124", "0.59313405", "0.5924571", "0.5913857", "0.5869718", "0.5832021", "0.58299154", "0.57957864", "0.5788336", "0.57775086", "0.5772947", "0.57420415", "0.5727815", "0.5714158", "0.5701122", "0.569506...
0.6128536
2
Fetch the HTML contents of the form.
function fetch(&$request) { $monograph =& $this->getMonograph(); $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('monographId', $monograph->getId()); $templateMgr->assign('stageId', $this->getStageId()); $templateMgr->assign('formParams', $this->getFormParams()); $templateMgr->assign('i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormContent()\n {\n return $this->form->getContent();\n }", "public function getForm(): string\n {\n return $this->html;\n }", "public function fetchHTML()\n {\n return $this->fetch();\n }", "public function getForm();", "public function fetch() {\n...
[ "0.7091561", "0.6864406", "0.6534885", "0.6534065", "0.6502957", "0.6501864", "0.6388598", "0.637359", "0.6339673", "0.6317922", "0.63150704", "0.6309774", "0.62057114", "0.61872786", "0.61733866", "0.6149249", "0.610224", "0.60740715", "0.6070079", "0.60296714", "0.6011487",...
0.0
-1
Assign form data to usersubmitted data.
function readInputData() { $this->_metadataFormImplem->readInputData(); $this->readUserVars(array('categories', 'seriesId', 'seriesPosition')); ListbuilderHandler::unpack($request, $this->getData('categories')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setSubmittedValues()\n {\n if ( $this->setFundraiserId() ) {\n $this->setFundraiserProfile(); \n }\n\n $this->setAmount();\n \n $this->setFirstName();\n $this->setLastName();\n $this->setEmail();\n $this->setTelephone();\n ...
[ "0.6879008", "0.67440283", "0.6742243", "0.67021453", "0.66969603", "0.666315", "0.6487733", "0.6458788", "0.63520545", "0.63301873", "0.63288194", "0.62586707", "0.6256629", "0.62461996", "0.624598", "0.6236322", "0.6232091", "0.61999315", "0.6168742", "0.616817", "0.61649",...
0.0
-1
Save changes to monograph.
function execute($request) { $monograph =& $this->getMonograph(); $monographDao =& DAORegistry::getDAO('MonographDAO'); // Clean any new release or feature object that may // exist associated with the current monograph series. $newReleaseDao =& DAORegistry::getDAO('NewReleaseDAO'); /* @var $newReleaseDao New...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final function save() {\n }", "public final function save()\n {\n }", "function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }", "protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRule...
[ "0.74158", "0.73081094", "0.72422874", "0.69941837", "0.6932125", "0.6916212", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", ...
0.0
-1
Associate a category with a monograph.
function insertEntry(&$request, $newRowId) { $application =& PKPApplication::getApplication(); $request =& $application->getRequest(); $categoryId = $newRowId['name']; $categoryDao =& DAORegistry::getDAO('CategoryDAO'); $monographDao =& DAORegistry::getDAO('MonographDAO'); $press =& $request->getPress(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCategory($monographId, $categoryId) {\n\t\t$this->update(\n\t\t\t'INSERT INTO submission_categories\n\t\t\t\t(submission_id, category_id)\n\t\t\tVALUES\n\t\t\t\t(?, ?)',\n\t\t\tarray(\n\t\t\t\t(int) $monographId,\n\t\t\t\t(int) $categoryId\n\t\t\t)\n\t\t);\n\t}", "public function addCategoryToGroupBy...
[ "0.6738484", "0.66203797", "0.65558666", "0.63031536", "0.6238169", "0.62294567", "0.60964334", "0.6037472", "0.590923", "0.5875892", "0.5875404", "0.586617", "0.5851523", "0.58497566", "0.5722964", "0.5667861", "0.5605701", "0.55817026", "0.557679", "0.55412143", "0.5508311"...
0.0
-1
Delete a category association.
function deleteEntry(&$request, $rowId) { if ($rowId) { $categoryDao =& DAORegistry::getDAO('CategoryDAO'); $monographDao =& DAORegistry::getDAO('MonographDAO'); $category =& $categoryDao->getById($rowId); if (!is_a($category, 'Category')) { assert(false); return false; } $monograph =& $this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() {\n $sql = sprintf(\"DELETE FROM category WHERE id=%d\", $this->id);\n self::$connection->execute($sql);\n }", "public function delete_category()\r\n\t\t{\r\n\t\t\t$this->errno = DB_OK;\r\n\t\t\t\r\n\t\t\tif ( $this->cat_id == -1 )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//...
[ "0.6824324", "0.6768495", "0.6755866", "0.672524", "0.6712552", "0.66933185", "0.66933185", "0.66933185", "0.66933185", "0.6661299", "0.6613275", "0.6604824", "0.6550935", "0.65170544", "0.648374", "0.6474441", "0.6474441", "0.6474441", "0.6474441", "0.6474441", "0.6474441", ...
0.0
-1
Update a category association.
function updateEntry($request, $rowId, $newRowId) { $this->deleteEntry($request, $rowId); $this->insertEntry($request, $newRowId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\n ]);\n }", "public function updated(Category $cat...
[ "0.73359996", "0.69551426", "0.687674", "0.6817189", "0.6790592", "0.6757311", "0.66078854", "0.6603828", "0.658919", "0.654784", "0.6508207", "0.64690024", "0.6459317", "0.64557177", "0.6437808", "0.6435639", "0.6425056", "0.64239365", "0.64109033", "0.6409327", "0.63971496"...
0.0
-1
set up the connection
public function open_connection() { $this->connection = new mysqli(DB_SERVER, DB_USER, DB_USR_PASS, DB_NAME); if (mysqli_connect_errno()) { exit('Connect failed: '. mysqli_connect_error()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function connect() {}", "private function connect()\n\t{\n\t\t$connectionData = $this->app->file->requireFile('config.php');\n\t\t\n\t\textract($connectionData);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tstatic::$connection = new PDO('mysql:host=' . $server . ';dbname=' . $dbname, $dbuser, $dbpass);\n\t\t\t\n\t\t\t...
[ "0.73242897", "0.7243904", "0.7220168", "0.72162056", "0.720581", "0.7178778", "0.71708375", "0.71683156", "0.7163123", "0.7135812", "0.7112959", "0.71115744", "0.7106947", "0.71022946", "0.7092474", "0.7073704", "0.70734805", "0.7063474", "0.7053471", "0.70516145", "0.703916...
0.0
-1
do general queries could use some work to make it more secure (figure out a way to do prepared statements)
public function query($sql) { // settype($sql, string); $result = $this->connection->query($sql); $this->confirm_query($result); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function _query($sql);", "abstract protected function doQuery( $sql );", "abstract public function query($sql);", "abstract public function query($sql, $execute =FALSE);", "function query() {\r\n\t\t\t$args = func_get_args();\r\n\t\t\t$sql = array_shift($args);\r\n\t\t\tforeach ($args as...
[ "0.727776", "0.7207666", "0.7022217", "0.6750099", "0.6684724", "0.6612367", "0.6580364", "0.654905", "0.654905", "0.654905", "0.654905", "0.6546919", "0.6536867", "0.6527944", "0.6520951", "0.6515992", "0.65128535", "0.6503257", "0.6484793", "0.6484117", "0.6479988", "0.64...
0.0
-1
prepare the values for use in the database could use some work to make itmore secure (add some type of sanitation)
public function database_prep($value) { $value = $this->connection->escape_string($value); return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareForDb() {\n $this->description = sql_escape($this->description);\n $this->postsHeader = sql_escape($this->postsHeader);\n $this->postBody = sql_escape($this->postBody);\n $this->postsFooter = sql_escape($this->postsFooter);\n $this->formLogged = sql_escape($this->formLogged);\n ...
[ "0.696646", "0.6576932", "0.65470254", "0.654405", "0.65187263", "0.64911646", "0.6406387", "0.6348825", "0.63153535", "0.6283605", "0.62646216", "0.62606996", "0.61720127", "0.61602646", "0.615262", "0.61425775", "0.61281264", "0.61190873", "0.6099726", "0.60993445", "0.6082...
0.0
-1
get the number of rows effected
public function num_rows($result) { return mysqli_num_rows($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNumRowsAffected(){\n\t\treturn $this->instance->getNumRowsAffected();\n\t}", "function getNumAffectedRows() {\r\n\t\t\treturn($this->privateVars['affectedrows']);\r\n\t\t}", "public function getNumAffectedRows()\n {\n \treturn $this->connections[$this->activeConnection]->affected_rows;...
[ "0.81607217", "0.81477815", "0.79739535", "0.794796", "0.769695", "0.7660528", "0.76161826", "0.75886214", "0.75542426", "0.75450855", "0.7537448", "0.7532377", "0.7523018", "0.74400747", "0.74341184", "0.74175", "0.74134773", "0.741347", "0.7413226", "0.74126375", "0.7411813...
0.0
-1
returns the last auto generated id
public function insert_id() { return mysqli_insert_id($this->connection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getLastID()\n {\n return $this->driver->getInsertId();\n }", "public function getLastId()\n {\n return $this->adodb->insert_Id();\n }", "public function lastId();", "function get_last_id()\n {\n // TODO: Implement get_last_id() method.\n }", "public...
[ "0.8669435", "0.8664125", "0.85991955", "0.85081035", "0.85065204", "0.84682345", "0.84682345", "0.8441129", "0.84272724", "0.84209627", "0.84083253", "0.8397421", "0.8397421", "0.8397421", "0.8387966", "0.8387966", "0.8387966", "0.83781326", "0.8355932", "0.835185", "0.83250...
0.0
-1
returns the number of effected rows on the last query
public function affected_rows() { return mysqli_affected_rows($this->connection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNumRowsAffected(){\n\t\treturn $this->instance->getNumRowsAffected();\n\t}", "public function rows_affected() {\n\t\tif ($this->q) {\n\t\t\treturn $this->q->numrows();\n\t\t}\n\n\t\treturn 0;\n\t}", "function getNumAffectedRows() {\r\n\t\t\treturn($this->privateVars['affectedrows']);\r\n\t\t...
[ "0.7499812", "0.749392", "0.74622834", "0.74519736", "0.7378824", "0.737828", "0.7336636", "0.73179305", "0.730054", "0.7287956", "0.7278766", "0.7198497", "0.7196491", "0.7195291", "0.71715146", "0.7161452", "0.713207", "0.71221864", "0.71221864", "0.7118341", "0.7083316", ...
0.66449004
83
returns the results in an array object
public function fetch_array($results) { return mysqli_fetch_array($results); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function results(): array;", "public function result() : array;", "public function getResult(): array;", "public function getResult(): array;", "public function resultToArray() {\n $array = array();\n\n if (is_array($this->_result)) {\n foreach ($this->_result as $res) {\n ...
[ "0.85386854", "0.8094445", "0.7960147", "0.7960147", "0.7736405", "0.77341837", "0.7731637", "0.7723116", "0.7711215", "0.7566526", "0.7496674", "0.74563175", "0.7449519", "0.74096084", "0.7371655", "0.7347912", "0.7288262", "0.728137", "0.7226118", "0.72102714", "0.71984553"...
0.0
-1
does the query and returns the top of the stack of returns
public function query_and_fetch_one($sql="") { $rows = $this->query_and_fetch($sql); return ($rows) ? array_shift($rows) : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function top();", "public function get_top($args) {\n $payload = [];\n if (isset($args['q'])) $payload = $this->queries->get_query($args['q'], $payload);\n if (isset($args['sources'])) $payload = $this->queries->get_sources($args['sources'], $payload);\n if (isset($args['language'])) $payload ...
[ "0.62136656", "0.59463894", "0.5537124", "0.55353594", "0.5529779", "0.55255455", "0.5511396", "0.5504911", "0.54848653", "0.5481586", "0.5451717", "0.54491377", "0.54491377", "0.5430048", "0.5422491", "0.5422491", "0.53855056", "0.53740525", "0.53571564", "0.53394157", "0.53...
0.0
-1
does the query and returns all of the rows returned
public function query_and_fetch($sql="") { $results = $this->query($sql); $rows = array(); while ($row = $this->fetch_array($results)) { $rows[] = $row; } return ($rows) ? $rows : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function queryAll() {\r\n $sql = \"SELECT * FROM $this->table\";\r\n $stmt = ConnectionFactory::prepare($sql);\r\n $stmt->execute();\r\n return $stmt->fetchAll();\r\n }", "public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter)...
[ "0.8268262", "0.77189904", "0.7698051", "0.76956666", "0.76696205", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", ...
0.0
-1
does the query and returns the rows returned in form of an std object
public function query_and_fetch_obj($sql="") { $results = $this->query($sql); $rows = array(); while ($object = $results->fetch_object()) { $rows[] = $object; } return ($rows) ? $rows : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resultSet(){\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }", "public function resultSet(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function resultSet()\n\t{\n\t\t$this->execute();\n\t\treturn $this-...
[ "0.73988134", "0.7305839", "0.72928053", "0.7228977", "0.72263503", "0.70772344", "0.7074983", "0.7039261", "0.7036826", "0.6973914", "0.69605076", "0.6955435", "0.69418496", "0.69280523", "0.6915921", "0.6904987", "0.68473095", "0.6803712", "0.67959136", "0.679169", "0.67503...
0.6657652
29
returns true or false if the row exists or not
public function query_and_count($sql) { $exists = array_shift($this->query_and_fetch_one($sql)); return ($exists > 0) ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function hasRow();", "public function exists()\r\n {\r\n $sql = $this->builder->exists($this);\r\n\r\n $rs = $this->db->select_one($sql, $this->get_binds_values());\r\n\r\n $row = (array) $rs;\r\n\r\n return (bool) $row['exist'];\r\n }", "public function exists...
[ "0.7958596", "0.7773271", "0.7614724", "0.75973517", "0.75940245", "0.753846", "0.75078905", "0.74876904", "0.74408644", "0.74222624", "0.7421657", "0.7387881", "0.7387881", "0.7387881", "0.7387102", "0.73818314", "0.736933", "0.73478866", "0.7272259", "0.7270323", "0.7242152...
0.0
-1
kills the process and lets the admin/user know that there was an error with the database comunication.
private function confirm_query($result) { if(!$result) { // if (mysqli_connect_errno()) // { // echo 'Connect failed: '. mysqli_connect_error(); // } die("Database Query Failed: " . mysqli_error($connection)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function killProcess($pid)\n{\n $mapper = systemToolkit::getInstance()->getMapper('process', 'process');\n $process = $mapper->searchOneByField('pid', $pid);\n if($process) {\n $mapper->delete($process);\n }\n}", "function kill_Process()\n {\n $this->set_kill_Command();\n ...
[ "0.6326109", "0.6316993", "0.6275521", "0.62620145", "0.6206211", "0.6044775", "0.60399026", "0.6006221", "0.59997934", "0.595228", "0.5950814", "0.5854195", "0.5829255", "0.5809293", "0.5759796", "0.57533145", "0.57218564", "0.57056826", "0.5704565", "0.5685869", "0.5674553"...
0.0
-1
Display a listing of the resource.
public function index() { $data = Product::where('status', 1)->orderBy('id')->paginate(10); $resource = $this->resource; return view('dashboard.views.'.$this->resources.'.index',compact('data', 'resource')); }
{ "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 editing the specified resource.
public function edit($lang, $id) { $resource = $this->resource; $resource['action'] = 'Approve'; $item = Product::findOrFail($id); return view('dashboard.views.' .$this->resources. '.edit', compact('item', 'resource')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.683...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $lang, $id) { $rules = [ "status" => "required" ]; $validator = Validator::make($request->all(), $rules); if($validator->fails()) { flashy()->error($validator->errors()->all()[0]); return back(); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Display 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
Remove the specified resource from storage.
public function destroy($lang, $id) { $item = Product::findOrFail($id); if (strpos($item->image, '/uploads/') !== false) { $image = str_replace( asset('').'storage/', '', $item->image); Storage::disk('public')->delete($image); } $item->delete(); App::s...
{ "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
Get list of servers associated with the admin account
public function servers(bool $returnRaw = false, bool $forceRefresh = false) : array { $servers = $this->sendGetXmlRequest($this->resolvePlexResource('servers.xml', 'pms'), function(array $response) : array { $servers = []; if (array_key_exists('@attributes', $response['Server'])) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getServers();", "public function getServers() {}", "function os2forms_server_communication_get_servers() {\n $query = db_select('os2forms_server_communication_servers_list', 's');\n $query->fields('s', array('id', 'server_name', 'url', 'username', 'psw'));\n $servers = $query->execute()\n ...
[ "0.7237663", "0.720549", "0.6968165", "0.6932481", "0.6798923", "0.6792014", "0.6764747", "0.67101324", "0.66769236", "0.6612525", "0.6548842", "0.6469633", "0.6412341", "0.64070034", "0.63250595", "0.6276801", "0.62728703", "0.6271383", "0.62145567", "0.6210817", "0.61397845...
0.5693794
55
Check if the first passed user is the canonical one
protected function isFirstUserTheCanonicalOne(array $first, array $second) : bool { $nullsInFirst = 0; $nullsInSecond = 0; // TODO: can be better, will be like this for now foreach ($first as $value) { if ($value === null) { $nullsInFirst++; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isAuthor() {\n return $this->getSocialUser() &&\n $this->getSocialUser()->ID === (int)$this->connectObj->CreatedBySocialUser->ID;\n }", "protected function wasActualUser()\n {\n return ($this->wrappedObject->user_id == $this->wrappedObject->revisionable_id || ...
[ "0.6429183", "0.6042985", "0.59825176", "0.59238917", "0.5915856", "0.5915366", "0.59137887", "0.59085375", "0.5889447", "0.5875282", "0.5866044", "0.58559334", "0.5796066", "0.5782625", "0.5766003", "0.57419294", "0.57372266", "0.5734353", "0.5733266", "0.57233024", "0.56799...
0.6217719
1
Get users associated with Plex
public function users(bool $returnRaw = false, bool $forceRefresh = false) : array { $data = $this->sendGetJsonRequest($this->buildPlexApiUrl('home/users'), function(array $response) { $users = $response['users']; $returnArray = []; foreach ($users as $user) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUsers();", "public function getUsers();", "public function getUsers();", "private function getUsers()\n {\n $url = $this->base_uri.'user/assignable/multiProjectSearch?projectKeys='.$this->project;\n $users = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n ...
[ "0.68712664", "0.68712664", "0.68712664", "0.6707063", "0.661418", "0.6522499", "0.6509594", "0.64517987", "0.64517987", "0.64278215", "0.6398266", "0.6373744", "0.6371929", "0.636559", "0.6362294", "0.6344742", "0.63366055", "0.63366055", "0.6329207", "0.6322432", "0.6316886...
0.0
-1
Fetch list of friend from the Plex API
public function friends(bool $returnRaw = false, bool $forceRefresh = false) : array { $data = $this->sendGetXmlRequest($this->buildPlexApiUrl('friends/all', true), function(array $response) : array { $usersArray = $response['User']; $users = []; foreach ($usersArray as $user...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function fetchFriends() {\n $url = $this->getBaseUrl() . '/friends?xml=1';\n\n $this->friends = array();\n $friendsData = new SimpleXMLElement(file_get_contents($url));\n foreach($friendsData->friends->friend as $friend) {\n $this->friends[] = SteamId::create((string...
[ "0.7434253", "0.7287989", "0.7063303", "0.69608206", "0.69092226", "0.6873318", "0.68594867", "0.6778718", "0.67316717", "0.6681015", "0.6647477", "0.6630587", "0.66120636", "0.65712434", "0.6533916", "0.6455171", "0.63870674", "0.6369462", "0.6364792", "0.6313489", "0.630238...
0.59602106
45
Get users with whom we are sharing the libraries
public function sharedWithUsers(bool $forceRefresh = false) : array { $mainServers = $this->servers(true, $forceRefresh); $sharedWith = []; foreach ($mainServers as $server) { $serverID = $server['id']; $data = $this->sendGetXmlRequest($this->buildPlexApiUrl(sprintf('serv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSharedWith()\n {\n return $this->getProperty(\"SharedWith\", new PlannerUserIds());\n }", "public function getFriendableForCurrentProvider(): array;", "function userJoins() { \n $model = config('auth.model');\n return $model::data();\n }", "static function g...
[ "0.6264269", "0.6241255", "0.6113772", "0.59961766", "0.59888643", "0.59765667", "0.59763193", "0.59760886", "0.59412926", "0.59223", "0.5917161", "0.5860496", "0.585691", "0.5848999", "0.5848185", "0.5845932", "0.5840974", "0.5828297", "0.5776771", "0.5739086", "0.57324857",...
0.0
-1
Get categories from all servers
public function categories(bool $returnRaw = false, bool $forceRefresh = false) : array { $servers = $this->servers(true, $forceRefresh); $libraries = []; foreach ($servers as $server) { try { $request = $this->client->get(sprintf('%s/sections', $server['api'])); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getServerCategories($filter=\"\"){\n $category = new Category;\n return $category->get();\n }", "public function getCategories(){\n\t\t// preapres the request\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: ' . TOKEN));\n\t\tcurl_setopt($ch, CURLOPT_...
[ "0.7468132", "0.7317743", "0.72089076", "0.71063226", "0.7078547", "0.6948711", "0.69218475", "0.6876321", "0.6876321", "0.6858868", "0.68375504", "0.6805039", "0.67740864", "0.67634755", "0.6715097", "0.66956204", "0.6682136", "0.6648266", "0.6640491", "0.6631615", "0.659579...
0.0
-1
Get contents for servers
public function contents(bool $returnRaw = false, bool $forceRefresh = false) : array { $contents = []; foreach ($this->categories(true, $forceRefresh) as $server => $categories) { foreach ($categories as $category => $categoryData) { if ($categoryData['type'] === 'artist') {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getContents()\n {\n return $this->engine->get($this->path, $this->gatherData());\n }", "public function getServers();", "public function getServers() {}", "function getcontent($server, $port, $file) {\r\n\t\t$cont = \"\";\r\n\t\t$ip = gethostbyname($server);\r\n\t\t$fp = fsock...
[ "0.6905607", "0.683333", "0.6822117", "0.6642864", "0.6441526", "0.6441086", "0.6441086", "0.6441086", "0.6441086", "0.6404616", "0.637617", "0.6369179", "0.62881863", "0.62881863", "0.62881863", "0.62881863", "0.62881863", "0.62741184", "0.6268848", "0.6207721", "0.6189181",...
0.61271715
23
Build Plex "normal" API url
public function buildPlexApiUrl(string $path, bool $excludeVersion = false) : string { if ($excludeVersion) { return sprintf('%s/%s', str_replace('/v%s/', '', $this->apiUrl), $path); } return sprintf('%s/%s', rtrim(sprintf($this->apiUrl, $this->apiVersion), '/'), $path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate_api_url(){\n\t\t$parameters = array(\n\t\t\t'uid' \t\t => $this->uid,\n\t\t\t'pswd' \t\t => $this->pswd,\n\t\t\t'api' \t\t => $this->api,\n\t\t\t'apiversion' => $this->apiversion\t\t\t\n\t\t);\n\t\t\n\t\tif(!empty($this->sid) && !empty($this->encrypted_pswd)){\n\t\t\t$parameters['sid'] = $this->s...
[ "0.7545874", "0.7199508", "0.7085859", "0.7075699", "0.70015424", "0.6949134", "0.6838835", "0.6820748", "0.6725363", "0.6719301", "0.66193885", "0.6617015", "0.66094345", "0.6607621", "0.65911394", "0.65835834", "0.6570218", "0.6563002", "0.6515957", "0.6488813", "0.6481942"...
0.6314589
31
Send GET Json request
public function sendGetJsonRequest(string $url, Closure $processor) : array { try { $request = $this->client->get($url); $response = json_decode($request->getBody()->getContents(), true); } catch (ClientException $exception) { $response = $exception->getResponse(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get() {\n // $this->isAdmin();\n\n $data = \"This is a test\";\n\n $this->sendHeaders();\n \n $resBody = (object) array();\n $resBody->status = \"200\";\n $resBody->message = \"valid request\";\n $resBody->data = \"This is the data\";\n ...
[ "0.6919637", "0.688027", "0.66382873", "0.66120857", "0.65673506", "0.65315884", "0.6307242", "0.6287321", "0.62028724", "0.6152314", "0.61515194", "0.6105195", "0.6097106", "0.6076148", "0.60695827", "0.60517395", "0.6044399", "0.60437113", "0.60333556", "0.60071135", "0.600...
0.0
-1
Register any application services.
public function register() { $this->app->singleton(UserTokenService::class, function() { return new UserTokenService(new User()); }); $this->app->singleton('BookService', function() { return new BookServices(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n ...
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647",...
0.0
-1
Bootstrap any application services.
public function boot() { Book::observe(BookObserver::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public func...
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.689659...
0.0
-1
Handle an incoming request.
public function handle($request, Closure $next) { //左側 Menu::make('left', function (Builder $menu) { }); Menu::make('right', function (Builder $menu) { if (auth()->check()) { /** @var User $user */ $user = auth()->user(); /...
{ "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
Create Icon From Original
public function delete($filename) { $sessionVideo = Video::where('file_name', 'like', $filename)->first(); if (empty($sessionVideo)) { $sessionVideo = Video::where('display_name', 'like', $filename)->first(); if (empty($sessionVideo)) { return Response::json(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIcon() {}", "public function getIcon();", "public function getIcon();", "public function icon(): string;", "public function getIcon()\n {\n }", "protected function establish_icon() {\n\t\t$this->icon = \"<i class='sw swp_{$this->key}_icon'></i>\";\n\t}", "public function icon($...
[ "0.7376265", "0.73347664", "0.73347664", "0.7043662", "0.6994336", "0.6948517", "0.6934703", "0.6879293", "0.68766904", "0.68766904", "0.6814825", "0.68137974", "0.68137974", "0.6812595", "0.6812595", "0.6737506", "0.6670323", "0.6650333", "0.6632902", "0.66207975", "0.658775...
0.0
-1
public : the property or method can be accessed from everywhere. This is default public $week; Inheritance in OOP = When a class derives from another class. Constructor with DB The __construct() function creates a new SimpleXMLElement object
public function __construct($db) { $this->conn = $db; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWeek()\n {\n return $this->week;\n }", "public function getWeek()\n {\n return $this->hasOne(WeekDay::className(), ['id' => 'week_id']);\n }", "public function init()\n {\n $dt = new DateTime();\n if ($dt->format(\"N\") != '1')\n $dt = $d...
[ "0.65216744", "0.6418595", "0.62591124", "0.62128115", "0.60180724", "0.5860398", "0.5697918", "0.56706524", "0.561442", "0.560381", "0.5587381", "0.5576971", "0.5576769", "0.5560737", "0.54876673", "0.5471796", "0.54644704", "0.54605985", "0.5443513", "0.5393592", "0.5380490...
0.0
-1
Read Pocasi by Date
public function readByDate($start = '2001-07-13', $end = '2012-08-22', $orderBy = 'datum', $sort = 'DESC'){ // Create query $query = "SELECT * FROM $this->table WHERE date >= '$start' AND date <= '$end' order by $orderBy $sort"; // Prepare statement // A prepared stateme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testReadByDate()\n {\n $today = date('Y-m-d');\n $tomorrow = date('Y-m-d', strtotime('tomorrow'));\n\n $result = $this->_leads->getDate($today, $tomorrow);\n $this->assertTrue(is_array($result));\n }", "public function getDataWithTypeDate() {}", "public functio...
[ "0.64640725", "0.59494734", "0.5899336", "0.5812199", "0.5776837", "0.5759736", "0.5756507", "0.56664944", "0.56230074", "0.5556188", "0.5553224", "0.5506", "0.5458098", "0.5418239", "0.54096645", "0.5405431", "0.54050046", "0.54050046", "0.53446907", "0.5337182", "0.5335507"...
0.53612274
18
Convert huge number to given units format
function format_unit( $value, $base = 1024, $units = ['', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], $precision = 2 ) { if ($value < 0) { return '-' . format_unit(abs($value), $units, $precision); } if ($value < 1) { return $value . ' ' . $units[0]; } $power =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convert($size)\n {\n $unit=array('b','kb','mb','gb','tb','pb');\n return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n }", "function iu_format_number($input){\n\t$suffixes = array('', 'k', 'M', 'B');\n\t$suffixIndex = 0;\n\n\twhile(abs($input) >= 1000 && $suf...
[ "0.6879596", "0.6768327", "0.6676596", "0.65416396", "0.65198535", "0.649551", "0.6478991", "0.6467862", "0.64666617", "0.6454937", "0.6412401", "0.6366919", "0.6365933", "0.63396466", "0.63339", "0.63155466", "0.62889093", "0.6283369", "0.6255441", "0.6254536", "0.62318295",...
0.6804817
1
Run the database seeds.
public function run() { // $this->seedTestForms($faker); }
{ "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
/ Gestion des Joueurs
function insertJoueurs ($tab) { $con = connexion (); if($con != null) { $requete = "insert into joueurs values (null,'".$tab['nom']."','".$tab['prenom']."','".$tab['age']."');"; mysqli_query($con, $requete); deconnexion($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function affectation()\n {\n session_start();\n $bdd = new PDO('mysql:host=localhost;dbname=projet', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n $allmsg = $bdd->query('SELECT * FROM role ORDER BY ordre ASC ');\n //on va devoir ajouter une colonne dans la...
[ "0.59918356", "0.5946393", "0.570071", "0.56989753", "0.56896883", "0.56631994", "0.5563768", "0.5560532", "0.5554846", "0.5501207", "0.54922605", "0.5421884", "0.5414745", "0.54125726", "0.53983384", "0.53915596", "0.53859836", "0.53797066", "0.5373463", "0.5357785", "0.5353...
0.54715157
11
/ Gestion des Coach
function insertCoach ($tab) { $con = connexion (); if($con != null) { $requete = "insert into coach values (null,'".$tab['nom']."','".$tab['prenom']."','".$tab['adresse']."','".$tab['email']."','".$tab['tel']."');"; mysqli_query($con, $requete); deconnexion($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function contarInventario(){\n\t}", "public function videPanier()\n {\n $this->CollProduit->vider();\n }", "public function echarlemagne(){\n //on inclut les scripts pour la recuperation des experiences et google maps pour l'autocomplete des lieux\n \t$this->set('jsIncludes',array('http://ma...
[ "0.57076097", "0.5683702", "0.5318259", "0.5260537", "0.5228624", "0.5226578", "0.52167356", "0.5189296", "0.51364887", "0.5119117", "0.51111794", "0.50954944", "0.5090329", "0.50768757", "0.5048197", "0.5048058", "0.5023218", "0.50165045", "0.50155425", "0.50132036", "0.5002...
0.0
-1
/ Gestion des Maillots
function insertMaillot ($tab) { $con = connexion (); if($con != null) { $requete = "insert into maillot values (null,'".$tab['nom']."','".$tab['prenom']."','".$tab['numero']."','".$tab['couleur']."');"; mysqli_query($con, $requete); deconnexion($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mail()\n\t{\n $this->load->model('mailsjabloon_model');\n $this->load->model('gebruiker_model');\n $data['titel'] = 'Send mails';\n $data['auteur'] = \"<u>Lorenzo M.</u>| Arne V.D.P. | Kim M. | Eloy B. | Sander J.\";\n $data['gebruiker'] = $th...
[ "0.6490101", "0.6184721", "0.61243", "0.60292226", "0.60062337", "0.5996507", "0.5986808", "0.5965648", "0.5888242", "0.58308923", "0.5782423", "0.57776356", "0.57763666", "0.5753894", "0.57513946", "0.573998", "0.57354623", "0.57199585", "0.57161903", "0.5694261", "0.5667150...
0.0
-1
/ Gestion des Equipes
function insertEquipe ($tab) { $con = connexion (); if($con != null) { $requete = "insert into equipe values (null,'".$tab['nomE']."','".$tab['nomC']."','".$tab['prenomC']."','".$tab['numeroC']."','".$tab['idcoach']."');"; mysqli_query($con, $requete); deconnexion($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRender(){\n /*\n * adiciona os listeners de comportamento padrão do componente\n */\n \n //ação que executa ao clicar sobre algum evento, abre a tela com as informações carregadas\n $sFuncao = \"eventWindow.show(record, el);\";\n $this->addListe...
[ "0.5566882", "0.5496649", "0.54746664", "0.5375615", "0.5344453", "0.5328371", "0.5321867", "0.52935296", "0.5274244", "0.5267512", "0.5235252", "0.52338487", "0.52092093", "0.5199769", "0.5146239", "0.51418406", "0.51378053", "0.51377666", "0.51308686", "0.5085394", "0.50536...
0.0
-1
/ Gestion des Stades
function insertStade ($tab) { $con = connexion (); if($con != null) { $requete = "insert into stade values (null,'".$tab['nom']."','".$tab['ville']."','".$tab['idequipe']."');"; mysqli_query($con, $requete); deconnexion($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg =...
[ "0.6088418", "0.59856385", "0.59390795", "0.5922934", "0.59163976", "0.58754456", "0.58735627", "0.5851471", "0.58136463", "0.5777737", "0.57670605", "0.57542133", "0.5744032", "0.57317495", "0.57314897", "0.56779456", "0.5669929", "0.56697184", "0.5630645", "0.5625856", "0.5...
0.5323718
91
/ Gestion des Matchs
function insertMatch ($tab) { $con = connexion (); if($con != null) { $requete = "insert into matchs values (null,'".$tab['nomdom']."','".$tab['nomext']."','".$tab['dateM']."','".$tab['stadeM']."','".$tab['idequipe']."');"; mysqli_query($con, $requete); deconnexion($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateMatch(){\n\t\t\n\t\t}", "public function getMatch();", "function show_round()\n{\n $bdd = DB_connect();\n\n // On récupère de la table matches les informations sur la partie\n $req_match = $bdd->query('SELECT * FROM matches WHERE id = \\''.$_SESSION['match']['id'].'\\'');\n $d...
[ "0.6381805", "0.62410885", "0.62015074", "0.61641365", "0.61583906", "0.60638374", "0.59246963", "0.58398557", "0.56489766", "0.5626429", "0.5597815", "0.55602515", "0.55069107", "0.5481473", "0.54458046", "0.54458046", "0.54273987", "0.541721", "0.53878736", "0.5385514", "0....
0.5071929
44
Display a listing of the resource.
public function index() { $bibliografias = Bibliografia::paginate(5); return view('bibliografia.listabibliografia',compact('bibliografias')); }
{ "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() { $cursos = Curso::all(); $disciplinas = Disciplina::all(); return view('bibliografia.create_bibliografia',compact('cursos','disciplinas')); }
{ "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,[ 'ano' =>'required|integer', 'titulo' =>'required', 'autor' =>'required', 'isbn' ...
{ "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) { $cursos = Curso::all(); $disciplinas = Disciplina::all(); $bibliografia = Bibliografia::findOrFail($id); return view('bibliografia.edit_bibliografia',compact('bibliografia','cursos','disciplinas')); }
{ "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) { $bibliografia = $request->all(); $id = Bibliografia::findOrFail($id); $id->update($bibliografia); echo "<script language=JavaScript>"; echo "alert('Operação realizada com sucesso!');"; echo "window.location='/listabibli...
{ "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) { $deleta_bibliografia = Bibliografia::findOrFail($id); $deleta_bibliografia -> delete($id); echo "<script language=JavaScript>"; echo "alert('Operação realizada com sucesso!');"; echo "window.location='/listabibliografia';"; echo "</scrip...
{ "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
Creates a HTML representation of the cart
public function getCartHTML() { $productLines = $this->cart->getProductLines(); $sum = $this->cart->getSumSEK(); $html = "<ul>"; foreach ($productLines as $productLine) { $product = $productLine->getProduct(); $name = $product->getName(); $costSEK = $product->getCostSEK(); $amount = $productLin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCartHtml()\n\t{\n\t\t$cart = $this->cart->contents();\n\t\t$cart['cnt_items'] = count($cart['products']);\n\t\t\n\t\t$user = $this->data['user'];\n\t\t\n\t\t$total = 0;\n\t\t\n\t\t$html = '';\n\t\tif ( ! count($cart['products'])){\n\t\t\t$html .= '\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=...
[ "0.736701", "0.7174151", "0.68823636", "0.68808746", "0.6793349", "0.6767283", "0.6711893", "0.6693496", "0.66721725", "0.6641056", "0.66335607", "0.66295105", "0.660527", "0.6555112", "0.6535464", "0.6517875", "0.6504102", "0.6500157", "0.6485095", "0.64806217", "0.64734703"...
0.79317546
0
Create item and insert to database.
public function create( &$args ) { global $wpdb; $section = $this->parse( $args ); $section = stripslashes_deep( $section ); $section['section_order'] = $this->get_last_number_order( $section['section_course_id'] ) + 1; $insert_data = array( 'section_course_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->newItemEntry();\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $this->getEntry()->setItemType($this->_getItemType());\n $entry = $service->in...
[ "0.7539195", "0.75069106", "0.7464451", "0.74273485", "0.7137917", "0.7101741", "0.7052292", "0.68731165", "0.6766768", "0.6743298", "0.6723123", "0.6721574", "0.6721331", "0.6665712", "0.66564", "0.6620478", "0.65321815", "0.65267277", "0.6512981", "0.64876956", "0.64641845"...
0.0
-1
Update data into database.
public function update( &$args ) { $section = $this->parse( $args ); if ( empty( $section['section_id'] ) ) { return $this->create( $args ); } $section_id = $section['section_id']; $update_data = array( 'section_name' => $section['section_name'], 'section_course_id' => $section['section_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function db_update() {}", "public function update($data) {}", "public function update($data) {}", "private function update()\n {\n $queryString = 'UPDATE ' . $this->table . ' SET ';\n foreach ($this->data as $column => $value) {\n if ($column != self::ID) {\n ...
[ "0.7739455", "0.76965857", "0.76965857", "0.762034", "0.75970054", "0.7423975", "0.7334283", "0.72561514", "0.72561514", "0.72561514", "0.72561514", "0.7219041", "0.7219041", "0.7219041", "0.7180245", "0.71515995", "0.7119131", "0.71007794", "0.70431554", "0.70412374", "0.701...
0.0
-1
Delete section data from database.
public function delete( &$id ) { global $wpdb; // allow hook do_action( 'learn-press/before-delete-section', $this->course_id, $id ); // Remove section items. $wpdb->delete( $wpdb->learnpress_section_items, array( 'section_id' => $id ) ); learn_press_reset_auto_increment( 'learnpress_section_items' ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function deleteSection() {\n $courseID = $_POST['courseID'];\n $sectionID = $_POST['sectionID'];\n\n $this->openConn();\n\n $sql = \"DELETE FROM Section WHERE courseID= :courseID and sectionID = :sectionID\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(array(':cours...
[ "0.73761266", "0.6953956", "0.6879618", "0.68073994", "0.6785122", "0.673039", "0.67299855", "0.6727538", "0.6663893", "0.6547913", "0.65443105", "0.64983666", "0.6485585", "0.6461823", "0.6450848", "0.64467424", "0.6434468", "0.6431587", "0.6359967", "0.63415474", "0.6257271...
0.5930918
57
TODO: Implement duplicate() method.
public function duplicate( &$section, $args = array() ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function duplicate()\n {\n }", "public function createDuplicate();", "public function duplicate(){\n\t\treturn self::cloneObject($this);\n\t}", "function duplicate($p_archive)\n {\n }", "public function check_duplicate()\n {\n }", "public function testDuplicate()\n {\n...
[ "0.8443669", "0.81615627", "0.781679", "0.71740675", "0.7066397", "0.70564103", "0.7034084", "0.69258046", "0.6913501", "0.6899205", "0.682961", "0.68092525", "0.68092525", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67...
0.0
-1
Remove all items from each section and delete course's sections.
public function clear() { $sections_ids = LP_Object_Cache::get( 'course-' . $this->course_id, 'learn-press/course-sections-ids' ); if ( ! $sections_ids ) { return false; } global $wpdb; do_action( 'learn-press/before-clear-section', $this->course_id ); // Remove all items in course's sections $wpd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function remove_empty_section_branches() {\n global $PAGE;\n $cache = new navigation_cache('navigation');\n $course = &$PAGE->navigation->find_active_node(navigation_node::TYPE_COURSE);\n if ($course===false || !$cache->cached('modinfo'.$course->key) || !$cache->cached('course...
[ "0.66487914", "0.6321584", "0.62720186", "0.6240877", "0.61194444", "0.59751457", "0.5709541", "0.56693435", "0.5663348", "0.5634714", "0.55936664", "0.55871207", "0.55744594", "0.553696", "0.5524178", "0.551769", "0.5479681", "0.5475769", "0.54636735", "0.5419111", "0.540106...
0.7258376
0
Load data from database.
public function load( &$object ) { // TODO: Implement load() method. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load()\n {\n $pdo = $this->getDbConnection();\n $query = \"SELECT * FROM {$this->dbTable}\";\n $data = $pdo->query($query)->fetchAll(\\PDO::FETCH_ASSOC);\n\n foreach ($data as ['key' => $key, 'value' => $value]) {\n $this->setData($key, $value);\n }\...
[ "0.8267042", "0.7571787", "0.73001933", "0.7213787", "0.7183212", "0.7155459", "0.7127596", "0.70964694", "0.7095224", "0.70246226", "0.69239914", "0.6905577", "0.6827652", "0.6752483", "0.6698043", "0.65772843", "0.6571402", "0.65293396", "0.6520576", "0.6507463", "0.6505651...
0.0
-1
Get course sections ids and set data to cache.
public function read_sections_ids() { // Get course's sections id data from cache $ids = LP_Object_Cache::get( 'course-' . $this->course_id, 'learn-press/course-sections-ids' ); if ( ! $ids ) { global $wpdb; // get sections id $ids = $wpdb->get_col( $wpdb->prepare( "SELECT section_id FROM {$wpdb->prefi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cps_sections($course, $where=null) {\n global $CFG;\n\n $sql = \"SELECT s.*, c.department, c.course_number\n FROM {$CFG->prefix}block_courseprefs_sections s,\n {$CFG->prefix}block_courseprefs_courses c\n WHERE s.coursesid = c.id\n A...
[ "0.59357667", "0.59320796", "0.5871032", "0.57993835", "0.5718446", "0.55946755", "0.5591114", "0.55224067", "0.54742247", "0.5418272", "0.53859776", "0.53786755", "0.5375423", "0.53107166", "0.5306244", "0.5278273", "0.5261577", "0.52611536", "0.5258073", "0.52108526", "0.51...
0.7451631
0
Read all items from DB
public function read_items( $section_id ) { global $wpdb; $query = $wpdb->prepare( " SELECT item_id id FROM {$wpdb->learnpress_section_items} si INNER JOIN {$wpdb->learnpress_sections} s ON si.section_id = s.section_id INNER JOIN {$wpdb->posts} c ON c.ID = s.section_course_id INNER JOIN {$wpdb->p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readAll(){\n $rq = \"SELECT * FROM Objets\";\n $stmt = $this->pdo->prepare($rq);\n $data = array();\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n return $result = $stmt->fetchAll();\n }", "public function read...
[ "0.7575424", "0.7401428", "0.7333486", "0.7299486", "0.7276709", "0.7237937", "0.7162551", "0.7152545", "0.71513945", "0.7086844", "0.7081333", "0.69926614", "0.69513094", "0.6946167", "0.6897857", "0.68818337", "0.6875963", "0.686948", "0.6834118", "0.6809249", "0.68037647",...
0.0
-1
Get list items of section.
public function get_section_items( $section_id ) { $course = learn_press_get_course( $this->course_id ); $sections = $course->get_curriculum_raw(); $return = array(); if ( ! empty( $sections ) ) { foreach ( $sections as $section ) { if ( $section['id'] == $section_id ) { if ( isset( $section['ite...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getList(){\n $sections = $this->Section->find('list', array('fields'=>array('id','NOM'),'order'=>array('NOM'=>'asc'),'recursive'=>-1));\n return $sections;\n }", "public function getSections(): iterable;", "public function getItems();", "public function getItems();", "publi...
[ "0.7256286", "0.7229692", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.6961299", "0.68529665", "0.68529665", "0.6802857", "0.6723238", "...
0.631695
33
Create new section item and add to course.
public function new_item( $section_id, $item ) { // course author, for case co-instructor add new items. $author_id = get_current_user_id(); if ( ! $author_id ) { $author_id = get_post_field( 'post_author', $this->course_id ) ? get_post_field( 'post_author', $this->course_id ) : learn_press_get_current_user_i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create( &$args ) {\n\n\t\tglobal $wpdb;\n\n\t\t$section = $this->parse( $args );\n\t\t$section = stripslashes_deep( $section );\n\t\t$section['section_order'] = $this->get_last_number_order( $section['section_course_id'] ) + 1;\n\t\t$insert_data = arra...
[ "0.67035383", "0.6679118", "0.64909226", "0.6433807", "0.6403132", "0.63927436", "0.62755406", "0.6270302", "0.62680274", "0.6252667", "0.62281173", "0.61910504", "0.61681443", "0.6112842", "0.60703045", "0.60674065", "0.6058572", "0.6055943", "0.6049221", "0.6023801", "0.597...
0.7669505
0
Add list new items to section.
public function add_items_section( $section_id, $items = array() ) { $order = 1; $current_items = $this->get_section_items( $section_id ); // allow hook do_action( 'learn-press/before-add-items-section', $items, $section_id, $this->course_id ); global $wpdb; $all_items = array_merge( $current_item...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_sections()\n {\n }", "function add_sections_and_fields(): void {}", "public function add( EchoContainmentList $list ) {\n\t\t$this->lists[] = $list;\n\t}", "public function append($items);", "public function addItems(array $items);", "protected function setupListOperation()\n {\n...
[ "0.6659867", "0.6456882", "0.5959395", "0.59136796", "0.5868306", "0.5815828", "0.5779685", "0.5767449", "0.57223123", "0.57215476", "0.5599624", "0.5575782", "0.55415595", "0.55338484", "0.55134887", "0.55125314", "0.5466961", "0.5464491", "0.54484403", "0.5446306", "0.54362...
0.6392661
2
Check item was been added to any section.
private function item_section_exist( $section_id, $item_id ) { global $wpdb; $section_id = intval( $section_id ); $item_id = intval( $item_id ); $query = $wpdb->prepare( "SELECT * FROM {$wpdb->learnpress_section_items} WHERE section_id = %d AND item_id = %d", $section_id, $item_id ); $item = $wpdb->get_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function has_items()\n {\n }", "private function check_section() {\n $cond = NULL;\n if($this->type_post != 'add') {\n $cond = \"AND sec_id != {$this->get_id}\";\n }\n $ch = $this->select(\"*\", \"jops_sections\", \"WHERE sec_unique = ? {$cond}\");\n $ch->execute(array($t...
[ "0.6467023", "0.645058", "0.6362975", "0.62200546", "0.61986405", "0.6197742", "0.6118817", "0.60529804", "0.60240585", "0.5936071", "0.5839833", "0.58279955", "0.58043236", "0.57904124", "0.5747971", "0.5701757", "0.5679746", "0.56732225", "0.5617492", "0.56058437", "0.55880...
0.6294859
3
Get section id of lesson, quiz id in curriculum.
public function get_item_section( $item_id ) { global $wpdb; $query = $wpdb->prepare( "SELECT section_id, item_order FROM {$wpdb->learnpress_section_items} WHERE item_id = %d", $item_id ); $section = $wpdb->get_row( $query, ARRAY_A ); return $section; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sectionID()\r\n {\r\n return $this->SectionID;\r\n }", "function getId() {\n\t\treturn $this->getData('sectionDecisionId');\r\n\t}", "protected function getSectionId():int\n {\n $secRes = SectionTable::getList([\n \"filter\" => [\n \"IBLOCK_ID\" => $thi...
[ "0.68471014", "0.6746336", "0.66994053", "0.63214576", "0.6187719", "0.61064863", "0.6083496", "0.6075507", "0.60102105", "0.59768546", "0.59669816", "0.5866749", "0.5864128", "0.5857779", "0.5850432", "0.5797648", "0.5759276", "0.5749922", "0.57216275", "0.5686985", "0.56743...
0.51770705
66
Update course final item.
public function update_final_item() { $sections = LP_Course_Utils::get_cached_db_sections( $this->course_id ); if ( ! $sections ) { return false; } $last_section = end( $sections ); $section_id = $last_section->section_id; // get last section items $section_items = LP_Object_Cache::get( 'course-' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update() {\n\n // Does the course object have an ID?\n if ( is_null( $this->courseId ) ) trigger_error ( \"Course::update(): Attempt to update Course object that does not have its ID property set.\", E_USER_ERROR );\n\n // Update the course\n $conn = new PDO( DB_DSN, DB_...
[ "0.65942097", "0.633441", "0.60304403", "0.5981425", "0.59797126", "0.5925986", "0.5919792", "0.591921", "0.58530146", "0.5831924", "0.58284324", "0.5807357", "0.57999897", "0.57665515", "0.5750476", "0.5733329", "0.56901264", "0.56895787", "0.56552625", "0.5654612", "0.56520...
0.63948256
1
Update lesson, quiz title in admin course editor.
public function update_item( $item ) { $item = wp_parse_args( $item, array( 'id' => '', 'title' => '', ) ); wp_update_post( array( 'ID' => $item['id'], 'post_title' => $item['title'], ) ); if ( isset( $item['preview'] ) && $item['preview'] ) { update_post_meta( $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($lesson_id, $chapter_id, $course_id)\n {\n\n\n }", "public function editQuiz() {\n global $tpl, $ilTabs;\n $ilTabs->activateTab(\"editQuiz\");\n iljQueryUtil::initjQuery();\n\n $tpl->setContent($this->initQuestionAndAnswersTable());\n }", "public func...
[ "0.6517717", "0.6437367", "0.6374597", "0.6374597", "0.6374597", "0.6206146", "0.60336053", "0.60052645", "0.59138924", "0.58348805", "0.581416", "0.57803893", "0.5777231", "0.5777231", "0.5763792", "0.5763792", "0.5763019", "0.57467586", "0.5729217", "0.5702625", "0.5666488"...
0.0
-1
Get accounts ordered by position
public function findByGameId($gameId) { // if (!$this->user) { // throw new \Exception('You did not set the user'); // } $user = $this->user; $qb = $this->createQueryBuilder('d') ->where("d.gameId = :gameId") ->setParameter('gameId', $gameId); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccounts();", "public function findAccounts() {\n\t\t\n\t}", "public function getAccounts(){\n $accounts = [];\n foreach ($this->data['Items'] as $account) {\n $newAccount = [];\n $newAccount['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('UID...
[ "0.61701393", "0.5898968", "0.5844862", "0.57869124", "0.5745591", "0.5713065", "0.56691056", "0.5657736", "0.5657662", "0.5632259", "0.561801", "0.55344164", "0.54164755", "0.5407869", "0.53913414", "0.536682", "0.536682", "0.536682", "0.536682", "0.536682", "0.536682", "0...
0.0
-1
........................ topics ..!!.. topics ..!!.. topics ..!!.. topics ..!!..
public function saveTopic($data, $id = null){ if (!isset($data['name']) || !isset($data['alias'])){ return false; } $id = (int)$id; $name = $this->db->escape($data['name']); $alias = $this->db->escape($data['alias']); $is_published = isset($data['is_published...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTopic() {}", "public function getTopics()\n {\n return [\n 'topicName' => 1\n ];\n }", "public function getTopic();", "public function getTopic();", "function ftopics()\n{\n global $db;\n\n $qry = db(\"SELECT s1.*,s2.kattopic,s2.id AS subid FROM \" . ...
[ "0.69561565", "0.6738864", "0.6687202", "0.6687202", "0.6578154", "0.65399116", "0.65029234", "0.6488846", "0.6430863", "0.6428687", "0.6420914", "0.6385512", "0.6360359", "0.6331386", "0.63292307", "0.6300964", "0.6296997", "0.628375", "0.62771624", "0.62447846", "0.61966157...
0.0
-1
........................ discussions ..!!.. discussions ..!!.. discussions ..!!.. discussions ..!!..
public static function getLastDiscussions(){ $sql = "select * from discussions ORDER BY `id` DESC LIMIT 5"; return App::$db->query($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function thediscussion() {\n\tglobal $discussions_index, $discussion, $discussions, $discussion_title;\n\t$discussion = $discussions[$discussions_index - 1];\n\treturn $discussion;\n}", "public function getDiscussions($id_user=null){\n // $id_user correspon à l'id de l'utilisateur\n // retourne un tableau ...
[ "0.682397", "0.68030304", "0.655425", "0.6408482", "0.6391527", "0.6326928", "0.6306945", "0.62996197", "0.62706053", "0.615329", "0.61452824", "0.6124728", "0.6105931", "0.60695803", "0.60664845", "0.6031067", "0.6028963", "0.60231733", "0.6021441", "0.59579223", "0.5940689"...
0.6545409
3
........................ comments ..!!.. comments ..!!.. comments ..!!.. comments ..!!..
public function getComments($id){ $id = (int)$id; $sql = "select * from comments WHERE discussion_id = '{$id}'"; return $this->db->query($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function comment();", "function get_comments(){\n\n\t}", "public function next_comment()\n {\n }", "function upgrade_430_fix_comments()\n {\n }", "function the_comment()\n {\n }", "public function comments(){\n }", "protected function get__comments()\n\t{\n\t\...
[ "0.61599505", "0.607438", "0.6004968", "0.59842724", "0.5921784", "0.59010357", "0.58689713", "0.58653474", "0.5812107", "0.57694155", "0.5762497", "0.5756422", "0.5647247", "0.5611007", "0.55964744", "0.5595256", "0.55836886", "0.5569505", "0.5565242", "0.5518044", "0.550003...
0.0
-1
This section is for duplicating routes to test versions of pages and resources on the live server
public function test_project($project_url) { $user = Auth::user(); $project = Project::where('project_url', $project_url)->firstOrFail(); if ($project->project_active == 1) { $content = view('pages.project_home_2', compact('project', 'user')); $response = response($co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPrimaryRoutes()\n\t{\n\t/*\t//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test base route\n\t\t// Should show post id 1\n\t\t$response = $this->call('GET', '/');\n\t\t$post ...
[ "0.69602436", "0.6664708", "0.6597086", "0.65218884", "0.6422269", "0.6379093", "0.62590635", "0.6250403", "0.62309605", "0.62263185", "0.6216701", "0.62007236", "0.61991894", "0.6166579", "0.61486673", "0.6145505", "0.6132882", "0.6097042", "0.60692245", "0.6035312", "0.6017...
0.0
-1
Validate environment and throw exception if not compatible
protected function _validateEnvironment() { /* @var $helper EW_NativePasswords_Helper_Data */ $helper = Mage::helper('ew_nativepasswords'); if(!$helper->isEnvironmentCompatible()) { throw new EW_NativePasswords_Exception_IncompatibleEnvironmentException( $helper->__(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkEnvironmentOrDie() {}", "protected function checkEnvironmentOrDie(): void\n {\n if (PHP_SAPI !== 'cli') {\n die('Not called from a command line interface (e.g. a shell or scheduler).' . LF);\n }\n }", "public function testCallThrowsExceptionIfEnvironmentIs...
[ "0.796451", "0.68811566", "0.6718176", "0.64361763", "0.6413818", "0.63720465", "0.63031435", "0.62825966", "0.6279313", "0.62007195", "0.6183477", "0.6141189", "0.61323124", "0.60558873", "0.60426724", "0.6017852", "0.59798163", "0.5973952", "0.5919907", "0.5917128", "0.5915...
0.7654986
1
Validate cost and throw exception if invalid
protected function _validateCost($cost) { /* @var $helper EW_NativePasswords_Helper_Data */ $helper = Mage::helper('ew_nativepasswords'); if(!$helper->validateCost($cost)) { throw new EW_NativePasswords_Exception_InvalidCostException( $helper->__( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCostValidation()\n {\n $aircraft = factory(\\App\\Aircraft::class)->create();\n $aircraft->cost = null;\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = 'a';\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = 0.5;\n ...
[ "0.70924926", "0.5933311", "0.58745176", "0.57979405", "0.5738085", "0.56106466", "0.5597978", "0.5583806", "0.556857", "0.55566984", "0.5554149", "0.55007094", "0.54794025", "0.54743695", "0.5444251", "0.5442854", "0.54329216", "0.54158455", "0.5400732", "0.5400732", "0.5395...
0.74683404
0
Ensure environment can handle native password hashing when enabling via system config. Observes: model_config_data_save_before
public function validateEnvironment(Varien_Event_Observer $observer) { $groups = $observer->getObject()->getGroups(); $enabled = false; if(isset($groups['password']) && isset($groups['password']['fields']) && isset($groups['password']['fields']['native_passwords_enabled...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function configureSaltedPasswords() {}", "protected function getConfiguredPassword() {}", "public function beforeSave() {\n if(($this->getScenario() === 'register') || ($this->getScenario() === 'changePassword')) \n $this->password = md5($this->password);\n ret...
[ "0.6914616", "0.6796443", "0.6697099", "0.665121", "0.63670254", "0.6295328", "0.6200462", "0.6172115", "0.6149906", "0.6120393", "0.6110244", "0.6080222", "0.59739685", "0.59508586", "0.594679", "0.59200305", "0.5883577", "0.5873509", "0.5873509", "0.58635956", "0.5862284", ...
0.0
-1