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
Set a flickr API key
public function setSecret($secret) { if (!empty($secret)) { $this->api_secret = $secret; return TRUE; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAPIKey($key){\r\n\t\t$this->apiKey = $key;\r\n\t}", "public function setApikey()\n {\n $this->apiKey = Config::get('leanpub.API_KEY');\n }", "function update_flickr_api ($old_key, $new_key) {\n\t$rsp_obj = call_flickr_api_method(array(\n\t\t'api_key'\t=> $new_key,\n\t\t'method'\...
[ "0.6859302", "0.67704034", "0.67102283", "0.66116", "0.65883595", "0.63411176", "0.6259039", "0.6244748", "0.6236644", "0.6233616", "0.62138116", "0.6138467", "0.6126337", "0.6103883", "0.6089475", "0.6089475", "0.6069907", "0.60031533", "0.5976162", "0.59668875", "0.5937213"...
0.0
-1
Set a flickr error
public function setError($message, $code = 0) { if (!empty($message)) { $this->err_message = $message; $this->err_code = $code; return TRUE; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setError($err);", "function setError( $state);", "function set_error() \n {\n $this->error_state = FORMEX_FIELD_ERROR;\n }", "function error(){}", "public function errorOccured();", "private function setErrors()\n {\n $this->errors = [\n 'error_no' => cur...
[ "0.6887219", "0.6399024", "0.63132185", "0.6237573", "0.61199003", "0.61127436", "0.6044766", "0.59785855", "0.59755397", "0.5969495", "0.59621996", "0.5954956", "0.5916016", "0.59156513", "0.59107554", "0.5904835", "0.59013087", "0.58662814", "0.585276", "0.58182335", "0.581...
0.0
-1
Get a flickr error
public function getError() { $error = array(); $error['message'] = $this->err_message; $error['code'] = $this->err_code; return $error; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastError();", "public function get_error();", "public function get_error();", "function getError();", "function getError();", "public function error()\n {\n return curl_error($this->curl);\n }", "public function error()\n {\n return curl_error($this->curl);\n ...
[ "0.6585086", "0.65485984", "0.65485984", "0.6456594", "0.6456594", "0.6335348", "0.6335348", "0.6320712", "0.6320712", "0.63068753", "0.627433", "0.6249992", "0.6249992", "0.6249992", "0.62350756", "0.6191612", "0.61540943", "0.6150432", "0.6131768", "0.61248064", "0.6058678"...
0.0
-1
Submit a POST request with to the specified URL with given parameters.
static function submitHttpPost($url, $postParams = null, $timeout = 50) { $ch = curl_init(); // set up the request curl_setopt($ch, CURLOPT_URL, $url); // make sure we submit this as a post curl_setopt($ch, CURLOPT_POST, true); if (isset($postParams)) { curl_setopt($ch, CURLOPT_POSTFIELDS, $postParams); }else{ curl_setopt($ch, CURLOPT_POSTFIELDS, ""); } // make sure problems are caught curl_setopt($ch, CURLOPT_FAILONERROR, 1); // return the output curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // set the timeouts curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20); curl_setopt($ch, CURLOPT_TIMEOUT,$timeout); // set the PHP script's timeout to be greater than CURL's set_time_limit($timeout + 25); $result = curl_exec($ch); // check for errors if (0 == curl_errno($ch)) { curl_close($ch); return $result; } else { $this->modx->log(MODX_LOG_LEVEL_ERROR,'XFlickr Request failed. '.curl_errno($ch).': '. curl_error($ch).' URL:'.$url); curl_close($ch); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _post($url = null, array $parameters = []);", "public function post($url, $body = array(), $query = array(), $headers = array());", "public function Post( $sUrl, array $aFields );", "private function POST($url,$params=false){\n return $this->Request($url,$params,HTTP_POST);\n }", ...
[ "0.749609", "0.7195303", "0.70692456", "0.70639855", "0.7028074", "0.6959787", "0.6894018", "0.68926907", "0.68706506", "0.68541133", "0.6829719", "0.6765395", "0.6746321", "0.6722926", "0.66961485", "0.6692714", "0.65653485", "0.6564171", "0.6564171", "0.6564171", "0.6529608...
0.6448467
32
Create a signed signature of the parameters. Return a parameter string that can be tacked onto the end of a URL.
public function signParams($params) { $signing = ''; $values = array(); $secret = $this->getSecret(); ksort($params); foreach($params as $key => $value) { $signing .= $key . $value; $values[] = $key . '=' . urlencode($value); } $values[] = 'api_sig=' . md5($secret . $signing); return implode('&', $values); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_signable_parameters()\n {\n // Grab all parameters\n $params = $this->parameters;\n\n // Remove oauth_signature if present\n if (isset($params['oauth_signature']))\n unset($params['oauth_signature']);\n\n // Urlencode both keys and values\n $keys = OAuthUtil::urlencode_r...
[ "0.7193946", "0.7172373", "0.70695317", "0.70535463", "0.7001584", "0.6977871", "0.6973665", "0.69485575", "0.68774813", "0.6853568", "0.68328834", "0.67862785", "0.6766751", "0.6756242", "0.6714858", "0.67004675", "0.6683943", "0.6654663", "0.6631227", "0.6628554", "0.658753...
0.73691624
0
Return an array of the API's parameters for use with a flickr request.
public function getParamsForRequest() { $params['api_key'] = $this->api_key; if ($this->token) { $params['auth_token'] = $this->token; } return $params; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getApiParameters();", "private function getParams()\n {\n $params = array(\n 'name' => uniqid('test_api_book_'),\n 'author' => 'Test Author',\n 'last_read' => '12.07.2006',\n 'downloadable' => false,\n );\n\n return $params;\n ...
[ "0.75181955", "0.7292549", "0.6891161", "0.6832733", "0.6785787", "0.6785787", "0.6785787", "0.6785787", "0.6785787", "0.6785787", "0.6785787", "0.6785787", "0.6785787", "0.6785787", "0.6725031", "0.6714696", "0.6688645", "0.6673788", "0.6669637", "0.66542166", "0.66317034", ...
0.70522976
2
Build a signed URL for flickr request.
public function buildUrl(array $params) { $params = array_merge( $this->getParamsForRequest(), $params ); if (!isset($params['format'])) $params['format'] = 'php_serial'; return $this->rest_url . '?' . $this->signParams($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSignedUrl(): string\n {\n $query = base64_encode(json_encode($this->buildQuery()));\n $signature = hash_hmac('sha256', $this->templateId . $query, $this->token);\n\n return $this->signedUrlBase . $this->templateId . '.png?' . http_build_query(['s' => $signature, 'v' => $q...
[ "0.7263769", "0.7020377", "0.63803285", "0.636727", "0.6337195", "0.6240419", "0.6235192", "0.61872196", "0.60908484", "0.60836595", "0.6077506", "0.6035037", "0.5987572", "0.59493124", "0.59480983", "0.59096295", "0.5876858", "0.586672", "0.58180976", "0.5817182", "0.5816738...
0.5525105
44
Build a URL to request a token.
function buildAuthUrl($frob ='', $key = '', $secret = '', $perms = 'delete') { $params = array(); if ($frob != '') { $params['frob'] = $frob; } if ($key == '') { $key = $this->modx->getOption('xflickr.api_key'); } if ($secret == '') { $secret = $this->modx->getOption('xflickr.api_secret'); } $params['api_key'] = $key; $params['perms'] = $perms; //return 'http://flickr.com/services/auth/?'.$this->signParams($params); $signing = ''; $values = array(); ksort($params); foreach($params as $key => $value) { $signing .= $key . $value; $values[] = $key . '=' . urlencode($value); } $values[] = 'api_sig=' . md5($secret . $signing); return 'http://flickr.com/services/auth/?'.implode('&', $values); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTokenUrl();", "abstract protected function getTokenUrl();", "abstract protected function token_url();", "abstract protected function getTokenUrl(): string;", "public function joinTokenUrl()\n {\n return sprintf('%s?applicationId=%s', $this->site, $this->token);\n }", "prot...
[ "0.77741575", "0.7695987", "0.75612605", "0.73174584", "0.7237561", "0.7200556", "0.70561534", "0.6987807", "0.6853787", "0.68435276", "0.6838871", "0.6818387", "0.67675596", "0.6746642", "0.6692429", "0.66108197", "0.659547", "0.6540462", "0.6535929", "0.6501052", "0.6497419...
0.0
-1
Execute a Flickr API method. All requests are cached using md5($url) as key.
public function execute(array $params, $lifetime = 7200) { $url = $this->buildUrl($params); $cache = $this->modx->getCacheManager(); $cache_key = md5($url); if ($this->use_cache == TRUE) { if ($cache->get('xflickr/'.$cache_key)) { $result = $cache->get('xflickr/'.$cache_key); } else { $result = $this->submitHttpPost($url); $cache->set('xflickr/'.$cache_key, $result, $lifetime); } } else { $result = $this->submitHttpPost($url); $cache_result = $cache->replace('xflickr/'.$cache_key, $result, $lifetime); if($cache_result == FALSE) { $cache->set('xflickr/'.$cache_key, $result, $lifetime); } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flickr($args) {\n\t$endpoint = isset($args['endpoint']) ? $args['endpoint'] : 'http://api.flickr.com/services/rest/';\n\t$secret = isset($args['api_secret']) ? $args['api_secret'] : null;\n\tunset($args['endpoint'], $args['api_secret']);\n\tif ($secret != null) {\n\t\tksort($args);\n\t\t$api_sig = $secret...
[ "0.62752736", "0.6166769", "0.6058745", "0.59150404", "0.57925904", "0.5527909", "0.5473728", "0.5361868", "0.5319926", "0.53050023", "0.5284823", "0.52828175", "0.5280759", "0.5261799", "0.52494353", "0.5244645", "0.52324027", "0.5227923", "0.52237046", "0.5158485", "0.51571...
0.5806074
4
Clear the cache for xflickr
public function clear_cache() { $cache = $this->modx->getCacheManager(); if ($cache->clearCache(array('xflickr/'))) { return TRUE; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearCache () {\n $this->clearThumbCache ();\n $this->clearPreviewCache ();\n }", "public function clear_cache(): void;", "private function clearCache() {\n\t\t\n\t\tCore\\Cache::clear();\n\t\t\n\t}", "public function clearCache() {}", "public function clearCache() {}", "public funct...
[ "0.7637364", "0.7595558", "0.7451692", "0.73944116", "0.73944116", "0.7363321", "0.7226416", "0.72154593", "0.72098416", "0.72050965", "0.7134312", "0.7061853", "0.7061725", "0.7050175", "0.7030799", "0.7025625", "0.7006017", "0.6990051", "0.69688284", "0.6958389", "0.6951649...
0.7251864
6
Check if current authentication info is valid.
public function isAuthValid() { if (is_null($this->getUserId())) { return FALSE; } else { return TRUE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkAuthentication() {}", "private function check_auth() {\n if (empty($this->user_id) || empty($this->privatekey)) {\n $this->send_error('AUTH_FAIL');\n exit;\n } elseif ($this->users_model->validate_privatekey($this->user_id, $this->privatekey)) {\n ...
[ "0.73553157", "0.72912556", "0.725669", "0.7117654", "0.7028989", "0.7020556", "0.69796604", "0.6951495", "0.68943995", "0.68943995", "0.6885874", "0.6842124", "0.68379045", "0.68327427", "0.68282396", "0.6806901", "0.6798327", "0.67606795", "0.6740837", "0.6719962", "0.66960...
0.7251719
3
Check if current authentication info is valid.
public function isPro($user_id = NULL) { if (is_null($user_id)) { $user_id = $this->getUserId(); } $user_info = $this->people_getInfo($user_id); if ($user_info['ispro'] == 1) { return TRUE; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkAuthentication() {}", "private function check_auth() {\n if (empty($this->user_id) || empty($this->privatekey)) {\n $this->send_error('AUTH_FAIL');\n exit;\n } elseif ($this->users_model->validate_privatekey($this->user_id, $this->privatekey)) {\n ...
[ "0.73547834", "0.7289918", "0.72547805", "0.7249486", "0.7117125", "0.70271903", "0.7021168", "0.69783115", "0.69510335", "0.6894084", "0.6894084", "0.688464", "0.68404955", "0.6837999", "0.68316936", "0.68278015", "0.6807058", "0.6797271", "0.67585087", "0.67386746", "0.6718...
0.0
-1
Return the Flickr user id of the current authenticated user. If the authentication info is incorrect, NULL will be returned.
public function getUserId() { $response = $this->execute(array('method' => 'flickr.auth.checkToken'), 60); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['auth']['user']['nsid']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAuthUserId() {\r\n global $app, $log;\r\n $email = $app->request->headers(\"PHP_AUTH_USER\");\r\n $password = $app->request->headers(\"PHP_AUTH_PW\");\r\n\r\n if ($email && $password) {\r\n $row = DB::queryFirstRow(\"SELECT * FROM users WHERE email=%s\", $email);\r\n if ($row ...
[ "0.72362965", "0.72320545", "0.7120621", "0.7111939", "0.70952225", "0.7031982", "0.70226246", "0.7022301", "0.7006451", "0.6980121", "0.6977634", "0.696011", "0.6945364", "0.6943848", "0.69334257", "0.6903515", "0.6890438", "0.6879291", "0.6871221", "0.6869946", "0.68442464"...
0.7762619
0
Request a frob used to get a token.
function requestFrob() { $response = $this->execute(array('method' => 'flickr.auth.getFrob', 'perms' => 'delete'), 60); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['frob']['_content']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function requestToken() {\n \n $result = $this->doRequest('v1.0/token?grant_type=1', 'GET');\n\n $this->_setToken($result->result->access_token);\n $this->_setRefreshToken($result->result->refresh_token);\n $this->_setExpireTime($result->result->expire_time);\n $thi...
[ "0.7091383", "0.70495623", "0.6727452", "0.6679473", "0.6634289", "0.6550899", "0.64725983", "0.645734", "0.64572644", "0.6387603", "0.6317136", "0.6307831", "0.62783587", "0.62783587", "0.62783587", "0.62783587", "0.623214", "0.62187135", "0.61912924", "0.6168655", "0.614453...
0.58748573
26
Set the auth token from a frob. The user needed to authenticate the frob.
public function getTokenFromFrob($frob) { $response = $this->execute(array('method' => 'flickr.auth.getToken', 'frob' => $frob), 5); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['auth']['token']['_content']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __setAuthUser()\n {\n $authUser = $this->request->session()->read('Auth');\n\n $accountType = 'FREE';\n if (!empty($authUser)) {\n $accountType = $authUser['User']['account_type'];\n }\n\n $this->set(compact('authUser', 'accountType'));\n }", "...
[ "0.64652884", "0.6378963", "0.62759393", "0.6218334", "0.61952335", "0.61389565", "0.6135895", "0.6127911", "0.61194396", "0.60878533", "0.6031323", "0.59725666", "0.59594107", "0.59294873", "0.58727777", "0.5854219", "0.58130145", "0.5760244", "0.5752557", "0.57476526", "0.5...
0.5814421
16
/ Contacts methods Get a list of contacts for the calling user.
function contacts_getList ($per_page = 25, $page = 1, $filter = NULL) { $response = $this->execute(array('method' => 'flickr.contacts.getList', 'per_page' => $per_page, 'page' => $page, 'filter' => $filter)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['contacts']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserContacts()\n\t{\n\t\t$userId = $this->getCurrentUserId();\n\n\t\t$parameters = array();\n\t\t$parameters['format']\t= 'json';\n\t\t$parameters['count'] = 'max';\n\t\t\n\t\t$response = $this->api->get('user/' . $userId . '/contacts', $parameters);\n\n\t\tif ( $this->api->http_code != 200 )\n\t\t{\n\...
[ "0.84056926", "0.7956069", "0.7780156", "0.77772766", "0.7696533", "0.76697344", "0.7575623", "0.7485982", "0.7482095", "0.7473542", "0.7431012", "0.7427027", "0.73860365", "0.7341294", "0.733686", "0.7322364", "0.72895104", "0.7230536", "0.72249645", "0.72197455", "0.7131911...
0.6700153
34
/ Favorites methods Adds a photo to a user's favorites list.
function favorites_add ($photo_id) { $response = $this->execute(array('method' => 'flickr.favorites.add', 'photo_id' => $photo_id), 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function favorites($user, $options = []);", "public function favorite(){\n $attributes = ['user_id' => auth()->id()];\n\n if(! $this->favorites()->where($attributes)->exists()){\n return $this->favorites()->create($attributes);\n }\n }", "public function favorite()\n ...
[ "0.69210327", "0.6606201", "0.6501669", "0.64900607", "0.648094", "0.639324", "0.6358247", "0.6317602", "0.62909055", "0.6288108", "0.6281173", "0.62334174", "0.6222342", "0.6188321", "0.6070393", "0.60458714", "0.5985902", "0.59834856", "0.5903112", "0.5871392", "0.58690184"...
0.61224455
14
Returns a list of the user's favorite photos. Only photos which the calling user has permission to see are returned.
function favorites_getList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) { $params = array(); $params['method'] = 'flickr.favorites.getList'; if ($user_id) $params['user_id'] = $user_id; $params['per_page'] = $per_page; $params['page'] = $page; if ($extras) $params['extras'] = $extras; $response = $this->execute($params, 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function favorites_getPublicList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) {\n\t\t$user_id = ($user_id) ? $user_id : $this->getUserId();\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.favorites.getPublicList';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\...
[ "0.6951597", "0.6951065", "0.6901152", "0.6783222", "0.65645576", "0.65645134", "0.65489775", "0.653162", "0.6520821", "0.64882904", "0.6487816", "0.6480715", "0.6469994", "0.6468104", "0.6425402", "0.63879156", "0.6344827", "0.63429934", "0.6338001", "0.6309637", "0.63036555...
0.74113095
0
Returns a list of favorite public photos for the given user.
function favorites_getPublicList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) { $user_id = ($user_id) ? $user_id : $this->getUserId(); $params = array(); $params['method'] = 'flickr.favorites.getPublicList'; $params['user_id'] = $user_id; $params['per_page'] = $per_page; $params['page'] = $page; if ($extras) $params['extras'] = $extras; $response = $this->execute($params, 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFavoritesPublications($user)\n {\n return $this->getByFavorite($user);\n }", "public function getPhotoPublications($user)\n {\n return $this->getByCategoryType('Photo', $user);\n }", "function favorites_getList ($user_id = NULL, $per_page = 25, $page = 1, $extras = ...
[ "0.77330893", "0.7666382", "0.75277483", "0.722145", "0.7196927", "0.7091533", "0.69208944", "0.6708945", "0.6678264", "0.65504897", "0.6491154", "0.6482784", "0.64572716", "0.6451725", "0.6430946", "0.63825727", "0.62879896", "0.6244853", "0.61897665", "0.61817765", "0.61812...
0.79236317
0
Removes a photo from a user's favorites list.
function favorites_remove ($photo_id) { $response = $this->execute(array('method' => 'flickr.favorites.remove', 'photo_id' => $photo_id), 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeFavorites()\n {\n $this->favorites()->delete();\n $this->favoriteCounter()->delete();\n }", "public static function remove_favorite() {\n header( 'HTTP/1.0 200 OK' );\n header( 'Content-Type: application/json' );\n\n $data = array();\n\n if( !...
[ "0.6962366", "0.6777098", "0.66394377", "0.66252553", "0.6521929", "0.6515568", "0.65061086", "0.64308417", "0.64284986", "0.64239705", "0.64213306", "0.6409266", "0.6301437", "0.62294173", "0.62175995", "0.6208038", "0.61591506", "0.6157689", "0.6106015", "0.6069731", "0.604...
0.71413577
0
/ People methods Return a user's NSID, given their email address
function people_findByEmail($find_email) { $response = $this->execute(array('method' => 'flickr.people.findByEmail', 'find_email' => $find_email)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['user']['nsid']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_user_id_from_string($email_or_login)\n {\n }", "public function getIdentifier()\n {\n return $this->user->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->getEmail();\n }", "public function getUserIdentifier(): string\n {\n...
[ "0.7204528", "0.7062429", "0.69925815", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6721962", "0.660183", "0.6551202", "0.654427", "0.6544029", "0.64955866", "...
0.7120048
1
Return a user's NSID, given their username.
function people_findByUsername ($username) { $response = $this->execute(array('method' => 'flickr.people.findByUsername', 'username' => $username)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['user']['nsid']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetUserID($username) {\r\n $user_ids = array();\r\n $usernames = array($username);\r\n user_get_id_name($user_ids, $usernames);\r\n return $user_ids[0];\r\n }", "public function getID($username) \n {\n return $this->idGet($username);\n }", "function getIdUse...
[ "0.7589604", "0.72057945", "0.71841484", "0.7163695", "0.70501566", "0.70336443", "0.69733226", "0.69690347", "0.69331706", "0.6927661", "0.69158643", "0.6883752", "0.68680257", "0.6854988", "0.68269527", "0.67857724", "0.6763815", "0.67453474", "0.673239", "0.67245805", "0.6...
0.6790407
15
Get information about a user.
function people_getInfo ($user_id) { $response = $this->execute(array('method' => 'flickr.people.getInfo', 'user_id' => $user_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['person']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserInfo()\n {\n return $this->_process('user/info')->user;\n }", "function getUserInfo(){\n\n\t\t/* Fetch user info from Flickr */\n\t\t$user = $this->askFlickr('people.getinfo','user_id='.$this->user);\n\n\t\t/* Return User info */\n\t\treturn $user;\n\t}", "private function g...
[ "0.8160531", "0.79876846", "0.7815327", "0.7776348", "0.77492225", "0.76899296", "0.7640455", "0.76099616", "0.757275", "0.7563238", "0.7563238", "0.7563238", "0.7563238", "0.7563238", "0.7563238", "0.7563238", "0.7559353", "0.7553211", "0.7508531", "0.7505855", "0.75006986",...
0.0
-1
Returns the list of public groups a user is a member of.
function people_getPublicGroups ($user_id) { $response = $this->execute(array('method' => 'flickr.people.getPublicGroups', 'user_id' => $user_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['groups']['group']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserGroups()\n\t{\n\t\t\n\t\t$groups = array();\n\t\t$db \t= $this->getUserDbTable();\n\t\t$id \t= $this->getUserId();\n\t\t\n\t\tif ($id)\n\t\t{\t\n\t\t\t$groups \t= $db->getAdapter()->select()->from(array('gmt'=>'groups_members_table'))\n\t\t\t\t\t\t\t\t\t\t ->joinInner(array('gt'=>'groups_t...
[ "0.7976204", "0.7471614", "0.72242177", "0.71383363", "0.71382433", "0.7122522", "0.70754933", "0.69764465", "0.694652", "0.6891328", "0.6859492", "0.68249506", "0.6807395", "0.6805979", "0.6734159", "0.6714943", "0.6714702", "0.67120385", "0.6634768", "0.65869355", "0.657609...
0.7236823
2
Get a list of public photos for the given user.
function people_getPublicPhotos ($user_id, $per_page = 25, $page = 1, $safe_search = 1, $extras = NULL) { $params = array(); $params['method'] = 'flickr.people.getPublicPhotos'; $params['user_id'] = $user_id; $params['per_page'] = $per_page; $params['page'] = $page; $params['safe_search'] = $safe_search; if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhotoPublications($user)\n {\n return $this->getByCategoryType('Photo', $user);\n }", "public static function get_photos_by_user($user_id) {\n\t\t$photos_array = array();\n\n\t\t$sql = \"SELECT * \n\t\t FROM photo_directory \n\t\t WHERE user_id = {$user_id}\n\t\t ...
[ "0.81467324", "0.7285678", "0.7243038", "0.71633863", "0.7110668", "0.6900005", "0.6805384", "0.66844726", "0.66733015", "0.66701645", "0.665343", "0.66399693", "0.6600413", "0.65600675", "0.6483653", "0.6461635", "0.64439166", "0.6395105", "0.6332279", "0.6315035", "0.630973...
0.80440164
1
Returns information for the calling user related to photo uploads.
function people_getUploadStatus () { $response = $this->execute(array('method' => 'flickr.people.getUploadStatus')); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['user']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserInfo() {\n\t\t$userInfo = $this->HttpSocket->get(FLICKR_API_URL,\n\t\t\tarray(\n\t\t\t\t'method' => USERINFO,\n\t\t\t\t'format' => DATAFORMAT,\n\t\t\t\t'api_key' => $this->api_key,\n\t\t\t\t'user_id' => $this->photo['owner'],\n\t\t\t));\n\t\treturn unserialize($userInfo->body);\n\t}", "pub...
[ "0.6821546", "0.6543956", "0.6477818", "0.64656454", "0.6436483", "0.6286003", "0.6205379", "0.6169175", "0.6161311", "0.6095036", "0.6078698", "0.6062227", "0.60294485", "0.60181636", "0.59832966", "0.59788364", "0.5968892", "0.596765", "0.5961962", "0.5954738", "0.5941397",...
0.601037
14
/ Photos methods Add tags to a photo.
function photos_addTags ($photo_id, $tags) { $response = $this->execute(array('method' => 'flickr.photos.addTags', 'photo_id' => $photo_id, 'tags' => $tags)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function photos_setTags ($photo_id, $tags) {\n\t\t$response = $this->execute(array('method' => 'flickr.photos.setTags', 'photo_id' => $photo_id, 'tags' => $tags));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'],...
[ "0.6724628", "0.64815724", "0.6448946", "0.644029", "0.61712533", "0.6033899", "0.5994737", "0.59491086", "0.591882", "0.58828974", "0.58600646", "0.5808063", "0.5772397", "0.57443684", "0.57409966", "0.57406014", "0.5707457", "0.57072794", "0.56968343", "0.5681233", "0.56372...
0.7340523
0
Delete a photo from flickr.
function photos_delete ($photo_id) { $response = $this->execute(array('method' => 'flickr.photos.delete', 'photo_id' => $photo_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_photo(){\n $sql=\"DELETE FROM photos WHERE id=\".$this->id;\n self::$connect->query($sql);\n\n }", "public function delete_photo ($photo_id){\n\t\t$q_extension = \"SELECT extension FROM photos WHERE photo_id =\".$photo_id;\t\n\t\t$q_photo = 'WHERE photo_id = '.$photo_id;\n...
[ "0.75842", "0.7137276", "0.6974389", "0.695486", "0.6946395", "0.69385713", "0.6874482", "0.6823608", "0.6817173", "0.67936695", "0.6791227", "0.67703795", "0.6729899", "0.66948974", "0.6677093", "0.6649489", "0.66435516", "0.6637135", "0.6637135", "0.66153735", "0.6613823", ...
0.759642
0
Returns all visible sets and pools the photo belongs to.
function photos_getAllContexts ($photo_id) { $response = $this->execute(array('method' => 'flickr.photos.getAllContexts', 'photo_id' => $photo_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { unset($object['stat']); return $object; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSets($user){\n\n\t\t/* Get Sets */\n\t\t$sets = $this->askFlickr('photosets.getList','&user_id='.$user.'&extras=url_o,url_z,url_l,url_q,url_t,url_n,url_s');\n\n\t\t/* Return Sets */\n\t\treturn $sets;\n\t}", "public function getResourceSets();", "private function displayViewphotoset() {\n $t...
[ "0.5854568", "0.58227324", "0.5711955", "0.5711848", "0.5690772", "0.5677374", "0.56007284", "0.55996597", "0.55898464", "0.5575779", "0.5563532", "0.5532307", "0.5483637", "0.5476335", "0.5473596", "0.54683465", "0.5457099", "0.54549575", "0.5446564", "0.54412687", "0.542913...
0.0
-1
Fetch a list of recent photos from the calling users' contacts.
function photos_getContactsPhotos ($count = 10, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) { $params = array(); $params['method'] = 'flickr.photos.getContactsPhotos'; $params['count'] = $count; if ($just_friends) $params['just_friends'] = $just_friends; if ($single_photo) $params['single_photo'] = $single_photo; if ($include_self) $params['include_self'] = $include_self; if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function photos_getContactsPublicPhotos ($user_id, $count = 10, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getContactsPublicPhotos';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['count'] = $count;\n\t\tif (...
[ "0.68440557", "0.6666258", "0.6618044", "0.65922886", "0.65017796", "0.64848036", "0.6447779", "0.6435721", "0.64054793", "0.62770945", "0.6248473", "0.6184491", "0.6127249", "0.6055801", "0.60177565", "0.5982734", "0.59674066", "0.59271115", "0.5924531", "0.58834046", "0.585...
0.72992504
0
Fetch a list of recent public photos from a users' contacts.
function photos_getContactsPublicPhotos ($user_id, $count = 10, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) { $params = array(); $params['method'] = 'flickr.photos.getContactsPublicPhotos'; $params['user_id'] = $user_id; $params['count'] = $count; if ($just_friends) $params['just_friends'] = $just_friends; if ($single_photo) $params['single_photo'] = $single_photo; if ($include_self) $params['include_self'] = $include_self; if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function photos_getContactsPhotos ($count = 10, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getContactsPhotos';\n\t\t$params['count'] = $count;\n\t\tif ($just_friends) $params['just_friends'] = $just_friends;\n\...
[ "0.7301247", "0.7199164", "0.688835", "0.6676204", "0.6649503", "0.65172833", "0.6448596", "0.64393145", "0.63865054", "0.6377215", "0.6306663", "0.6274159", "0.62488616", "0.61948913", "0.6165222", "0.61591196", "0.6140508", "0.61305773", "0.6092145", "0.6075333", "0.6031383...
0.76549244
0
Returns next and previous photos for a photo in a photostream.
function photos_getContext ($photo_id) { $response = $this->execute(array('method' => 'flickr.photos.getContext', 'photo_id' => $photo_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { unset($object['stat']); return $object; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function photos(Builder $photos_sql)\n\t{\n\n\t\t$previousPhotoID = '';\n\t\t$return_photos = array();\n\t\t$photo_counter = 0;\n\t\t$photos = $photos_sql->get();\n\t\tforeach ($photos as $photo_model) {\n\n\t\t\t// Turn data from the database into a front-end friendly format\n\t\t\t$photo = $photo_model->p...
[ "0.6429229", "0.6134129", "0.6060616", "0.6032105", "0.5932901", "0.57583904", "0.5598782", "0.5580938", "0.55164933", "0.5497971", "0.5485377", "0.54754186", "0.5471924", "0.5455965", "0.5414507", "0.5403318", "0.5376486", "0.5367267", "0.53360087", "0.53204364", "0.53182185...
0.0
-1
Gets a list of photo counts for the given date ranges for the calling user.
function photos_getCounts ($dates = NULL, $taken_dates = NULL) { $params = array(); $params['method'] = 'flickr.photos.getCounts'; if (!$dates) { $dates = time()-31536000 .','. time(); $params['dates'] = $dates; } if ($taken_dates) $params['taken_dates'] = $taken_dates; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photocounts']['photocount']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getListUserCountByRangeDate($types, $startDate = '', $endDate = '')\r\n\t{\r\n\t\tif ( empty($types) ) {\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\t$em = $this->getServiceManager()->get('doctrine.entitymanager.orm_default');\r\n\r\n\t\t$now = new \\DateTime(\"now\");\r\n\t\t// $now->format('Y-m-d') ....
[ "0.6373758", "0.611192", "0.60245615", "0.60193956", "0.588854", "0.58060545", "0.5699149", "0.56943905", "0.56653905", "0.5563889", "0.55329126", "0.5487288", "0.5446137", "0.542717", "0.53767556", "0.5367526", "0.5349641", "0.53403664", "0.53330004", "0.5274494", "0.5236827...
0.68856645
0
Retrieves a list of EXIF/TIFF/GPS tags for a given photo. The calling user must have permission to view the photo.
function photos_getExif ($photo_id, $secret = NULL) { $params = array(); $params['method'] = 'flickr.photos.getExif'; $params['photo_id'] = $photo_id; if ($secret) $params['secret'] = $secret; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photo']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTags($photo_id){\n\n\t\t/* Fetch user info from Flickr */\n\t\t$tags = $this->askFlickr('tags.getListPhoto','user_id='.$this->user.'&photo_id='.$photo_id);\n\n\t\t/* Return Tags */\n\t\treturn $tags;\n\t}", "private static function getPhotos()\r\n {\r\n return self::getDoc()->getElementsByT...
[ "0.6933012", "0.66794616", "0.6597597", "0.62525266", "0.6190118", "0.61632466", "0.6133025", "0.604752", "0.60417026", "0.6027369", "0.60064244", "0.5946522", "0.58707833", "0.5869264", "0.5856333", "0.58200854", "0.58093375", "0.5790388", "0.5774532", "0.5761118", "0.572940...
0.5743006
20
Returns the list of people who have favorited a given photo.
function photos_getFavorites ($photo_id, $page = 1, $per_page = 20) { $response = $this->execute(array('method' => 'flickr.photos.getFavorites', 'photo_id' => $photo_id, 'page' => $page, 'per_page' => $per_page)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photo']['person']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFavorites();", "public function find_favorites() {\n\t\tstatic $favorites;\n\n\t\tif (!is_array($favorites)) {\n\t\t\t$favorites = array();\n\t\t\tif ($this->loaded()) {\n\t\t\t\t$users = db::build()->select('user_id')->from('favorites')->where('event_id', '=', $this->id)->execute()->as_array(...
[ "0.6755054", "0.66816044", "0.66116256", "0.6575815", "0.6478729", "0.6462401", "0.64249754", "0.6414417", "0.63521975", "0.62955076", "0.62857187", "0.6243544", "0.62431455", "0.6209417", "0.6202553", "0.6200787", "0.6184905", "0.6150616", "0.614637", "0.6143289", "0.6101929...
0.7151414
0
Get information about a photo.
function photos_getInfo ($photo_id, $secret = NULL) { $params = array(); $params['method'] = 'flickr.photos.getInfo'; $params['photo_id'] = $photo_id; if ($secret) $params['secret'] = $secret; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photo']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPhotoInfo($photoId);", "public function getPhoto()\n {\n return $this->execute('GET', '/' . self::PHOTO);\n }", "public function Photo(){\n\t\t$photoId = \"491634914183411\";\n\t\t$imgInfo \t\t\t= 'https://graph.facebook.com/'.$photoId.'?access_token='.$this->session->userdata('oauth_t...
[ "0.7963512", "0.7741481", "0.71406984", "0.7124891", "0.6989152", "0.6989152", "0.6989152", "0.6989152", "0.6989152", "0.698337", "0.69237787", "0.68913174", "0.6807306", "0.67047566", "0.6602409", "0.65635943", "0.65406656", "0.65176606", "0.64829487", "0.64120674", "0.64110...
0.7335301
2
Returns a list of your photos that are not part of any sets.
function photos_getNotInSet ($per_page = 25, $page = 1, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = 'all', $extras = NULL) { $params = array(); $params['method'] = 'flickr.photos.getNotInSet'; $params['per_page'] = $per_page; $params['page'] = $page; if ($min_upload_date) $params['min_upload_date'] = $min_upload_date; if ($max_upload_date) $params['max_upload_date'] = $max_upload_date; if ($min_taken_date) $params['min_taken_date'] = $min_taken_date; if ($max_taken_date) $params['max_taken_date'] = $max_taken_date; if ($privacy_filter) $params['privacy_filter'] = $privacy_filter; if ($media) $params['media'] = $media; if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllWithoutFolders()\n {\n $query = $this->getQueryBuilder()->select('*')\n ->from($this->table)\n ->where('folder_id', '=', 0);\n\n if ($photos = $this->db->get_results($query->build())) {\n foreach ($photos as $index => $photo) {\n ...
[ "0.65620744", "0.62283874", "0.6024571", "0.5930459", "0.58665824", "0.57660234", "0.57490873", "0.5699103", "0.56990856", "0.5698543", "0.56635684", "0.5616267", "0.55531436", "0.5526648", "0.54824513", "0.54305995", "0.542977", "0.53921473", "0.53813857", "0.5373835", "0.53...
0.70838606
0
Get permissions for a photo.
function photos_getPerms ($photo_id) { $response = $this->execute(array('method' => 'flickr.photos.getPerms', 'photo_id' => $photo_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['perms']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPermissions();", "abstract public function getPermissions();", "public function getPermissions() {}", "public function getPermissions() {}", "public function get_permissions()\n\t{\n\t\treturn $this->area->get_permissions($this->path);\n\t}", "public function getPermissions()\n\t{\n\t\...
[ "0.6789415", "0.66065", "0.6573238", "0.6573238", "0.6457416", "0.635394", "0.63504314", "0.6339839", "0.622988", "0.6208075", "0.6201465", "0.61882824", "0.6182389", "0.6182389", "0.61682636", "0.60221034", "0.6005442", "0.596628", "0.59479654", "0.59190667", "0.5911445", ...
0.6953229
0
Returns a list of the latest public photos uploaded to flickr.
function photos_getRecent ($per_page = 25, $page = 1, $extras = NULL) { $params = array(); $params['method'] = 'flickr.photos.getRecent'; $params['per_page'] = $per_page; $params['page'] = $page; if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getPictures( $count ){\n\t\t$flickr_group_id = Yii::$app->params['flickr-group-id'];\n\t\t$flickr_api_key = Yii::$app->params['flickr-api-key'];\n\n\t\t$flickr_url = 'https://api.flickr.com/services/rest/?method=flickr.groups.pools.getPhotos&api_key=' . urlencode( $flickr_api_key ) . '&group_id=' ...
[ "0.7249395", "0.69313157", "0.68007153", "0.6759807", "0.67369187", "0.6626937", "0.66187114", "0.6544581", "0.65286106", "0.64899457", "0.64456326", "0.635372", "0.63462925", "0.63337475", "0.6289648", "0.62828255", "0.6259937", "0.62378466", "0.622972", "0.62008303", "0.618...
0.6520917
9
Returns the available sizes for a photo. The calling user must have permission to view the photo.
function photos_getSizes ($photo_id) { $response = $this->execute(array('method' => 'flickr.photos.getSizes', 'photo_id' => $photo_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['sizes']['size']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPhotoSizes($photo_id){ // No Secret Required\n\n\t\t/* Get Photo Size */\n\t\t$photoSizes = $this->askFlickr('photos.getSizes','&photo_id='.$photo_id);\n\n\t\t/* Return Photo Sizes */\n\t\treturn $photoSizes;\n\t}", "function rest_get_avatar_sizes()\n {\n }", "public function getImageSizes():...
[ "0.7653366", "0.73743963", "0.7298074", "0.7223539", "0.6959077", "0.6865854", "0.6809796", "0.6726588", "0.6667807", "0.6662396", "0.6577339", "0.65327454", "0.6521323", "0.6433994", "0.64020485", "0.634591", "0.6323199", "0.62496394", "0.62496394", "0.62496394", "0.62496394...
0.7319266
2
Returns the available sizes for a photo with max key.
function photos_getNamedSizes ($photo_id) { $sizes = $this->photos_getSizes($photo_id); if ($sizes) { $namedSizes = array(); foreach ($sizes as $size) { $namedSizes[$size['label']] = $size; } $namedSizes['Max'] = array_pop($sizes); $namedSizes['Max']['label'] = 'Max'; return $namedSizes; } else { return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rest_get_avatar_sizes()\n {\n }", "function getPhotoSizes($photo_id){ // No Secret Required\n\n\t\t/* Get Photo Size */\n\t\t$photoSizes = $this->askFlickr('photos.getSizes','&photo_id='.$photo_id);\n\n\t\t/* Return Photo Sizes */\n\t\treturn $photoSizes;\n\t}", "public static function get_sizes...
[ "0.6862207", "0.67693436", "0.6706297", "0.66856503", "0.65622836", "0.6487654", "0.6444292", "0.64267355", "0.642385", "0.6420045", "0.64161205", "0.6372527", "0.6361224", "0.6302259", "0.62939", "0.62800676", "0.6252385", "0.6223607", "0.62004566", "0.6180967", "0.6180699",...
0.6021206
38
Returns a list of your photos with no tags.
function photos_getUntagged ($per_page = 25, $page = 1, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = all, $extras = NULL, $sort = NULL) { $params = array(); $params['method'] = 'flickr.photos.getUntagged'; $params['per_page'] = $per_page; $params['page'] = $page; if ($min_upload_date) $params['min_upload_date'] = $min_upload_date; if ($max_upload_date) $params['max_upload_date'] = $max_upload_date; if ($min_taken_date) $params['min_taken_date'] = $min_taken_date; if ($max_taken_date) $params['max_taken_date'] = $max_taken_date; if ($privacy_filter) $params['privacy_filter'] = $privacy_filter; if ($media) $params['media'] = $media; if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllWithoutFolders()\n {\n $query = $this->getQueryBuilder()->select('*')\n ->from($this->table)\n ->where('folder_id', '=', 0);\n\n if ($photos = $this->db->get_results($query->build())) {\n foreach ($photos as $index => $photo) {\n ...
[ "0.7284759", "0.6756636", "0.6494362", "0.6389345", "0.619795", "0.6197265", "0.61875093", "0.6183084", "0.61588585", "0.6128163", "0.61215395", "0.61199445", "0.6110181", "0.61087674", "0.5993303", "0.5970716", "0.59406793", "0.59306616", "0.59282225", "0.58693075", "0.58691...
0.6330918
4
Returns a list of your geotagged photos.
function photos_getWithGeoData ($per_page = 25, $page = 1, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = all, $extras = NULL, $sort = NULL) { $params = array(); $params['method'] = 'flickr.photos.getWithGeoData'; $params['per_page'] = $per_page; $params['page'] = $page; if ($min_upload_date) $params['min_upload_date'] = $min_upload_date; if ($max_upload_date) $params['max_upload_date'] = $max_upload_date; if ($min_taken_date) $params['min_taken_date'] = $min_taken_date; if ($max_taken_date) $params['max_taken_date'] = $max_taken_date; if ($privacy_filter) $params['privacy_filter'] = $privacy_filter; if ($media) $params['media'] = $media; if ($extras) $params['extras'] = $extras; if ($sort) $params['sort'] = $sort; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhotos();", "public function photos() {\n\t\t$photos = $this->client->getPhotos( [\n\t\t\t'group_urlname' => $this->group,\n\t\t] );\n\n\t\treturn $photos;\n\t}", "public function getPhotos()\n {\n return $this->photos;\n }", "public function getAllPhotos();", "public functi...
[ "0.7193251", "0.70301586", "0.6952698", "0.6902225", "0.68915963", "0.6787347", "0.67850775", "0.664902", "0.64323556", "0.64234453", "0.6420629", "0.6374221", "0.63680685", "0.6353996", "0.6319391", "0.63019764", "0.6276599", "0.6275402", "0.6255003", "0.6210964", "0.6205576...
0.5708514
83
Returns a list of your geotagged photos.
function photos_getWithoutGeoData ($per_page = 25, $page = 1, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = all, $extras = NULL, $sort = NULL) { $params = array(); $params['method'] = 'flickr.photos.getWithoutGeoData'; $params['per_page'] = $per_page; $params['page'] = $page; if ($min_upload_date) $params['min_upload_date'] = $min_upload_date; if ($max_upload_date) $params['max_upload_date'] = $max_upload_date; if ($min_taken_date) $params['min_taken_date'] = $min_taken_date; if ($max_taken_date) $params['max_taken_date'] = $max_taken_date; if ($privacy_filter) $params['privacy_filter'] = $privacy_filter; if ($media) $params['media'] = $media; if ($extras) $params['extras'] = $extras; if ($sort) $params['sort'] = $sort; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhotos();", "public function photos() {\n\t\t$photos = $this->client->getPhotos( [\n\t\t\t'group_urlname' => $this->group,\n\t\t] );\n\n\t\treturn $photos;\n\t}", "public function getPhotos()\n {\n return $this->photos;\n }", "public function getAllPhotos();", "public functi...
[ "0.719486", "0.7030671", "0.6954448", "0.6903919", "0.6893713", "0.67883855", "0.678583", "0.6650657", "0.64338946", "0.6425081", "0.6422891", "0.63746065", "0.6369564", "0.635469", "0.6319882", "0.63038415", "0.62776506", "0.6274835", "0.62569314", "0.6211993", "0.6206232", ...
0.0
-1
Return a list of your photos that have been recently created or which have been recently modified.
function photos_recentlyUpdated ($per_page = 25, $page = 1, $min_date = NULL, $extras = NULL) { $params = array(); $params['method'] = 'flickr.photos.recentlyUpdated'; $params['per_page'] = $per_page; $params['page'] = $page; if (!$min_date) { $params['min_date'] = time()-604800;; } if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function PhotosPublic() {\n return $this->hasMany(Photo::class, 'user_uid', 'uid')\n ->orderBy('photos.moment', 'desc')\n ->whereRaw('datediff(now(), photos.moment) <= 10')\n ->where('status_id', 1);\n }", "public function getRecentCreatedUsers()\n {\n ...
[ "0.62896436", "0.6068572", "0.6035229", "0.60343254", "0.6008608", "0.5990642", "0.5977693", "0.59443796", "0.5932098", "0.59263486", "0.5916577", "0.5909102", "0.5875987", "0.58674955", "0.58159256", "0.5758879", "0.5749316", "0.5737786", "0.56859195", "0.5674865", "0.565759...
0.68096197
0
Remove a tag from a photo.
function photos_removeTag ($tag_id) { $response = $this->execute(array('method' => 'flickr.photos.removeTag', 'tag_id' => $tag_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_tag($tag);", "public function removeTag()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_tag]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_tag]);\n\t\t}\n\t}", "public function remove($tag) { //+\n\t\tunset($this->arShortcodes[$tag]);\n\t}", "public function remove...
[ "0.7347097", "0.7204979", "0.6973377", "0.6935872", "0.69193196", "0.691541", "0.687112", "0.68704104", "0.6707652", "0.66968507", "0.66442585", "0.6489552", "0.6486538", "0.64394325", "0.6409692", "0.63596255", "0.63439107", "0.63427114", "0.6318437", "0.630769", "0.6304296"...
0.74520034
0
Return a list of photos matching some criteria. Only photos visible to the calling user will be returned.
function photos_search ($per_page = 25, $page = 1, $tags = NULL, $text = NULL, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = all, $extras = NULL, $sort = NULL) { $params = array(); $params['method'] = 'flickr.photos.search'; $params['per_page'] = $per_page; $params['page'] = $page; if ($tags) { $tags = explode(',', $tags); array_map('trim', $tags); $tags = implode(',', $tags); $params['tags'] = $tags; } if ($text) $params['text'] = trim($text); if ($min_upload_date) $params['min_upload_date'] = $min_upload_date; if ($max_upload_date) $params['max_upload_date'] = $max_upload_date; if ($min_taken_date) $params['min_taken_date'] = $min_taken_date; if ($max_taken_date) $params['max_taken_date'] = $max_taken_date; if ($privacy_filter) $params['privacy_filter'] = $privacy_filter; if ($media) $params['media'] = $media; if ($extras) $params['extras'] = $extras; if ($sort) $params['sort'] = $sort; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhotos();", "function find_public_photos($ids_of_private_photos, $ids_of_all_users_photos_on_page)\n{\n $public_photos = [];\n\n foreach ($ids_of_all_users_photos_on_page as $photo_id)\n if (!in_array($photo_id, $ids_of_private_photos))\n array_push($public_photos, $pho...
[ "0.7125578", "0.7000065", "0.6926198", "0.6885406", "0.68025374", "0.67725796", "0.6554923", "0.6532322", "0.64730895", "0.64699", "0.6414027", "0.64133227", "0.641315", "0.6353017", "0.6295631", "0.62554723", "0.62262124", "0.62250465", "0.61985236", "0.6194844", "0.61723626...
0.60450804
33
Set the content type of a photo.
function photos_setContentType ($photo_id, $content_type = 1) { $response = $this->execute(array('method' => 'flickr.photos.setContentType', 'photo_id' => $photo_id, 'content_type' => $content_type)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setContentType($content_type) {}", "public static function setContentType($content_type) {}", "public function setContentType($content_type);", "public function setContentType ($type) {\r\n\t\t$this->content_type = Headers::getMimeType($type) ?: $type;\r\n\t}", "public function setContentTy...
[ "0.7310495", "0.7296814", "0.728849", "0.714099", "0.6927197", "0.6861147", "0.6849323", "0.6849323", "0.68044645", "0.6692697", "0.6678795", "0.66614205", "0.66614205", "0.66188484", "0.6532081", "0.64482546", "0.64389265", "0.6431358", "0.6427285", "0.63871586", "0.6327933"...
0.6991919
4
Set one or both of the dates for a photo.
function photos_setDates ($photo_id, $date_posted = NULL, $date_taken = NULL, $date_taken_granularity = NULL) { $params = array(); $params['method'] = 'flickr.photos.setDates'; $params['photo_id'] = $photo_id; if ($date_posted) $params['date_posted'] = $date_posted; if ($date_taken) $params['date_taken'] = $date_taken; if ($date_taken_granularity) $params['date_taken_granularity'] = $date_taken_granularity; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDate($date);", "public function set_dates(){\n // if the id is not set, this means its anew item being created\n if(property_exists($this, 'created_on') && empty($this->id)){\n $this->created_on = date('Y-m-d H:i:s');\n }\n\n // if id is set, its an updat...
[ "0.63447195", "0.6257269", "0.62071383", "0.59734637", "0.5961761", "0.5905391", "0.58734274", "0.58549273", "0.5837929", "0.58336574", "0.58336574", "0.58186644", "0.58182925", "0.57810664", "0.5757086", "0.5757086", "0.57568836", "0.570078", "0.55858594", "0.557147", "0.556...
0.68128884
0
Set the meta information for a photo.
function photos_setMeta ($photo_id, $title, $description) { $response = $this->execute(array('method' => 'flickr.photos.setMeta', 'photo_id' => $photo_id, 'title' => $title, 'description' => $description)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function metaInit () {\n $this->imageMeta = new ImageMeta($this->getImagePath());\n $this->imageMeta->getMeta();\n }", "public function setMetaData($metaData);", "public function setMetaInfo($meta) {\n $this->meta = $meta;\n }", "protected function setup_metadata() {\n\t\tif ( $this->ge...
[ "0.70335853", "0.6956919", "0.6756647", "0.66268873", "0.65275466", "0.6520241", "0.6519575", "0.64917016", "0.6443167", "0.6443167", "0.63576895", "0.63283837", "0.62890506", "0.6256569", "0.62511647", "0.62334365", "0.6211461", "0.6210028", "0.61742383", "0.6169706", "0.616...
0.7007155
1
Set permissions for a photo.
function photos_setPerms ($photo_id, $is_public = 1, $is_friend = 0, $is_family = 0, $perm_comment = 3, $perm_addmeta = 3) { $response = $this->execute(array('method' => 'flickr.photos.setPerms', 'photo_id' => $photo_id, 'is_public' => $is_public, 'is_friend' => $is_friend, 'is_family' => $is_family, 'perm_comment' => $perm_comment, 'perm_addmeta' => $perm_addmeta)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPermissions($permissions) {}", "public function setPhotoAccess($value)\n {\n return $this->set('PhotoAccess', $value);\n }", "public function setPermissions($permissions);", "public function SetPermissions ($permissions);", "public function setObjectPermissions(array $permis...
[ "0.65165776", "0.6263768", "0.6248518", "0.6239904", "0.6045777", "0.5961811", "0.5930788", "0.5808552", "0.57129014", "0.56097484", "0.55647796", "0.5544397", "0.5507477", "0.54466844", "0.5418625", "0.54142654", "0.53981376", "0.53898114", "0.5372746", "0.53506577", "0.5310...
0.66612005
0
Set the safety level of a photo.
function photos_setSafetyLevel ($photo_id, $safety_level = 1, $hidden = 0) { $response = $this->execute(array('method' => 'flickr.photos.setSafetyLevel', 'photo_id' => $photo_id, 'safety_level' => $safety_level, 'hidden' => $hidden)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setLevel($level);", "public function setPhoto($value)\n {\n $this->photo = $value;\n }", "public function setLevel($level);", "public function set_level($value) {\n\t\tif (is_anint($value)) {\n\t\t\t$this->init_from_type_and_level($this->type, $value);\n\t\t}\n\t}", "public function s...
[ "0.5569952", "0.5566912", "0.52600574", "0.5245245", "0.5139422", "0.50750405", "0.5073039", "0.5030286", "0.49861702", "0.49638963", "0.4949922", "0.49089298", "0.4855177", "0.48063585", "0.4759778", "0.47478795", "0.4747587", "0.47459194", "0.47209734", "0.47175965", "0.471...
0.7159577
0
Set the tags for a photo.
function photos_setTags ($photo_id, $tags) { $response = $this->execute(array('method' => 'flickr.photos.setTags', 'photo_id' => $photo_id, 'tags' => $tags)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_tags($tags) {\n $this->tags = $tags;\n }", "protected function setTags()\n {\n $this->authBasedTag();\n $this->nameBasedTag($this->relatedEntities);\n }", "public function setTags($tags)\n {\n $this->_tags = $tags;\n }", "public function setTags(Collection $tags)\n ...
[ "0.6933218", "0.6773757", "0.67190623", "0.6684508", "0.6675219", "0.65931046", "0.65151954", "0.64920187", "0.64876664", "0.6467937", "0.6467937", "0.6242587", "0.6183994", "0.61774826", "0.6142818", "0.6123194", "0.607157", "0.60697037", "0.60673213", "0.6052014", "0.601469...
0.6941952
0
/ Photos::comments methods Add comment to a photo as the currently authenticated user.
function photos_comments_addComment ($photo_id, $comment_text) { $response = $this->execute(array('method' => 'flickr.photos.comments.addComment', 'photo_id' => $photo_id, 'comment_text' => $comment_text), 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['comment']['id']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addComment($comment)\n\t{\n\t\t$comment->status=Comment::STATUS_APPROVED;\n\t\t$comment->photo_id=$this->id;\n\t\t$comment->author_id=Yii::app()->user->id;\n\t\treturn $comment->save();\n\t}", "public function addComment($photo_uid, $comment) {\r\n\t\ttx_cwtcommunity_lib_common::dbUpdateQuery('IN...
[ "0.6902462", "0.68949336", "0.6741255", "0.6264645", "0.6221626", "0.6216631", "0.62049496", "0.6168133", "0.61480266", "0.61472666", "0.6126682", "0.6072381", "0.605467", "0.60528207", "0.5969632", "0.5945974", "0.59293014", "0.5926184", "0.5922152", "0.59220034", "0.5916040...
0.6776433
2
Delete a comment as the currently authenticated user.
function photos_comments_deleteComment ($comment_id) { $response = $this->execute(array('method' => 'flickr.photos.comments.deleteComment', 'comment_id' => $comment_id), 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() {\n\t\tif(isset($this->args[1]) && $this->user()) {\n\t\t\ttry {\n\t\t\t\t$this->commentsModel->delete($this->args[1], $this->user->model->userID);\n\t\t\t\t$this->view->setVar('message', 'Deleted comment');\n\t\t\t} catch(exception $excpt) {\n\t\t\t\t$this->view->setError($excpt);\n\t\t\t...
[ "0.7822346", "0.7548663", "0.74190027", "0.72601783", "0.71056306", "0.7054036", "0.7052628", "0.7047756", "0.70430076", "0.69205445", "0.69114107", "0.6890185", "0.6844323", "0.68412", "0.6835261", "0.68135774", "0.6742028", "0.67405355", "0.67285347", "0.67265874", "0.67043...
0.0
-1
Edit the text of a comment as the currently authenticated user.
function photos_comments_editComment ($comment_id, $comment_text) { $response = $this->execute(array('method' => 'flickr.photos.comments.editComment', 'comment_id' => $comment_id, 'comment_text' => $comment_text), 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editComment()\n {\n session_start();\n if (isset($_SESSION['isLoggedIn']) && !empty($_SESSION['isLoggedIn'])) {\n $post = $this->postRepository->readById($_GET['post_id']);\n $comment = $this->commentRepository->readById($_GET['comment_id']);\n $vie...
[ "0.6760691", "0.67507976", "0.6666843", "0.66576135", "0.6498748", "0.6477748", "0.64683175", "0.6378413", "0.6357717", "0.6322349", "0.6273392", "0.6260314", "0.6259816", "0.6248422", "0.6248422", "0.6248422", "0.6248422", "0.6248422", "0.6248422", "0.6248422", "0.6248422", ...
0.62976575
10
Returns the comments for a photo
function photos_comments_getList ($photo_id, $min_comment_date = NULL, $max_comment_date = NULL) { $params = array(); $params['method'] = 'flickr.photos.comments.getList'; $params['photo_id'] = $photo_id; if ($min_comment_date) $params['min_comment_date'] = $min_comment_date; if ($max_comment_date) $params['max_comment_date'] = $max_comment_date; $response = $this->execute($params, 300); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['comments']['comment']; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getComments($photo_uid) {\r\n\t\t$comments = tx_cwtcommunity_lib_common::dbQuery('SELECT c.uid, c.crdate, c.cruser_id, c.text, u.username, u.tx_cwtcommunityuser_image AS image FROM tx_cwtcommunity_photo_comments c, fe_users u WHERE c.cruser_id = u.uid AND photo_uid = \"'.intval($photo_uid).'\" AND ...
[ "0.7853535", "0.77983266", "0.7052826", "0.66702425", "0.65463954", "0.6534006", "0.6468264", "0.64541787", "0.63510656", "0.62784433", "0.62507683", "0.62415063", "0.6240517", "0.623515", "0.6225219", "0.6196308", "0.61476904", "0.61448", "0.6120888", "0.6106155", "0.6090262...
0.70973897
2
/ Photosets methods Add a photo to the end of an existing photoset.
function photosets_addPhoto ($photoset_id, $photo_id) { $response = $this->execute(array('method' => 'flickr.photosets.addPhoto', 'photoset_id' => $photoset_id, 'photo_id' => $photo_id), 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addPhoto($value)\n {\n $this->photos[] = $value;\n }", "abstract public function addItems(\\Media\\Entity\\Photo\\PhotoBase $item);", "public function addPhotoAction(){\n $data = $this->getRequestData();\n $types = array('activity', 'operation', 'people');\n if...
[ "0.6447367", "0.5967513", "0.5963022", "0.58876604", "0.5765217", "0.5613605", "0.56116784", "0.5552352", "0.55000025", "0.5419363", "0.53597254", "0.5341553", "0.53407776", "0.53404325", "0.53361213", "0.5311107", "0.52692103", "0.5262326", "0.5248917", "0.5248222", "0.52301...
0.67797565
0
Create a new photoset for the calling user.
function photosets_create ($title, $primary_photo_id, $description = NULL) { $params = array(); $params['method'] = 'flickr.photosets.create'; $params['title'] = $title; $params['primary_photo_id'] = $primary_photo_id; if ($description) $params['description'] = $description; $response = $this->execute($params, 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photoset']; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newSet($set, $userid, $connection) {\r\n\t\t$connection -> exec(\"INSERT INTO \".$GLOBALS['dbPrefix'].\"question_set (`setname`,`setdescription`, `ownerid`, `editcount`, `createtimestamp`, `firstowner`) VALUES ('\" . $set -> getSetName() . \"', '\" . $set -> getSetDescription() . \"', \" . $userid...
[ "0.5859416", "0.5695981", "0.5670443", "0.5606731", "0.5290574", "0.5285441", "0.52847236", "0.5263133", "0.5246096", "0.5227062", "0.522608", "0.52151823", "0.5202057", "0.5195578", "0.5190853", "0.5186903", "0.51649785", "0.5164225", "0.51553214", "0.5144366", "0.51269615",...
0.61232895
0
Modify the metadata for a photoset.
function photosets_editMeta ($photoset_id, $title, $description = NULL) { $params = array(); $params['method'] = 'flickr.photosets.editMeta'; $params['photoset_id'] = $photoset_id; $params['title'] = $title; if ($description) $params['description'] = $description; $response = $this->execute($params, 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMetadata($metadata) {}", "public function setMetadata($metadata) {}", "public function setMetaData($metaData);", "public function set_metadata ($metadata) {\n $this->metadata = $metadata;\n }", "public function setMetadata($metadata)\n {\n $this->metadata->set($metada...
[ "0.7089243", "0.7088521", "0.6776059", "0.6623159", "0.6577129", "0.6437518", "0.63803154", "0.6280251", "0.622669", "0.6037982", "0.59757626", "0.5906002", "0.5906002", "0.5889698", "0.5838597", "0.5781361", "0.575651", "0.57553005", "0.5692061", "0.5626392", "0.5610376", ...
0.69520354
2
Modify the photos in a photoset. Use this method to add, remove and reorder photos.
function photosets_editPhotos ($photoset_id, $photo_ids, $primary_photo_id = NULL) { $params = array(); $params['method'] = 'flickr.photosets.editPhotos'; $params['photoset_id'] = $photoset_id; $photo_ids = explode(',', $photo_ids); array_map('trim', $photo_ids); if (!$primary_photo_id) { $params['primary_photo_id'] = $photo_ids[0]; } else { $params['primary_photo_id'] = $primary_photo_id; } $photo_ids = implode(',', $photo_ids); $params['photo_ids'] = $photo_ids; $response = $this->execute($params, 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPhotos($value)\n {\n $this->photos = $value;\n }", "function __reimportPhotos(){\n\t\t$this->Asset->disablePermissionable();\n\t\t$this->Asset->recursive=0;\n\t\t$json = $this->Asset->find('all', array('fields'=>'json_src'));\n\t\t$json =Set::extract($json, '/Asset/json_src');\n\...
[ "0.61253875", "0.58572537", "0.57873374", "0.5724591", "0.56968266", "0.5540416", "0.55236626", "0.54659045", "0.5458521", "0.5396567", "0.5370602", "0.5351635", "0.534072", "0.5332234", "0.5330528", "0.53213567", "0.5305942", "0.52972233", "0.5249905", "0.52400357", "0.52374...
0.6656051
0
Returns next and previous photos for a photo in a set.
function photosets_getContext ($photoset_id, $photo_id) { $response = $this->execute(array('method' => 'flickr.photosets.getContext', 'photoset_id' => $photoset_id, 'photo_id' => $photo_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { unset($object['stat']); return $object; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function photos(Builder $photos_sql)\n\t{\n\n\t\t$previousPhotoID = '';\n\t\t$return_photos = array();\n\t\t$photo_counter = 0;\n\t\t$photos = $photos_sql->get();\n\t\tforeach ($photos as $photo_model) {\n\n\t\t\t// Turn data from the database into a front-end friendly format\n\t\t\t$photo = $photo_model->p...
[ "0.6159016", "0.5985409", "0.5919204", "0.57603997", "0.555737", "0.54664415", "0.5457094", "0.54158825", "0.53048027", "0.5297472", "0.5242712", "0.5230706", "0.51977247", "0.518588", "0.51804775", "0.5178973", "0.51466763", "0.5111908", "0.5085377", "0.5073863", "0.50493306...
0.0
-1
Gets information about a photoset.
function photosets_getInfo ($photoset_id) { $response = $this->execute(array('method' => 'flickr.photosets.getInfo', 'photoset_id' => $photoset_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photoset']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPhotoSetInfo($photoset_id){\n\n\t\t/* Get Photoset Name and Description */\n\t\t$photoset_info = $this->askFlickr('photosets.getInfo','&photoset_id='.$photoset_id);\n\n\t\t/* Return Photo Info Object */\n\t\treturn $photoset_info;\n\t}", "function getPhotoSet($photoset_id){\n\n\t\t/* Get Photoset */\...
[ "0.7983389", "0.7624878", "0.75235385", "0.71805054", "0.6704652", "0.652162", "0.6079326", "0.6019746", "0.5936873", "0.5889445", "0.5870294", "0.58312434", "0.5807532", "0.5791189", "0.57457685", "0.5726683", "0.5694535", "0.56459624", "0.5619843", "0.55982786", "0.5570566"...
0.7850466
1
Returns the photosets belonging to the specified user.
function photosets_getList ($user_id = NULL) { $params = array(); $params['method'] = 'flickr.photosets.getList'; if ($user_id) $params['user_id'] = $user_id; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photosets']['photoset']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSets($user){\n\n\t\t/* Get Sets */\n\t\t$sets = $this->askFlickr('photosets.getList','&user_id='.$user.'&extras=url_o,url_z,url_l,url_q,url_t,url_n,url_s');\n\n\t\t/* Return Sets */\n\t\treturn $sets;\n\t}", "public function getPhotoPublications($user)\n {\n return $this->getByCategoryType(...
[ "0.76590306", "0.69626945", "0.6388711", "0.59604466", "0.5868237", "0.5824793", "0.58002084", "0.5741096", "0.57019824", "0.5700303", "0.5661259", "0.5622172", "0.56107265", "0.5604882", "0.55912995", "0.55279803", "0.55277044", "0.55081683", "0.54907244", "0.548561", "0.548...
0.7680268
0
Get the list of photos in a set.
function photosets_getPhotos ($photoset_id, $per_page = 25, $page = 1, $media = 'photos', $extras = NULL) { $params = array(); $params['method'] = 'flickr.photosets.getPhotos'; $params['photoset_id'] = $photoset_id; $params['per_page'] = $per_page; $params['page'] = $page; $params['media'] = $media; if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photoset']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function photosets_getList ($user_id = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photosets.getList';\n\t\tif ($user_id) $params['user_id'] = $user_id;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['p...
[ "0.6997282", "0.6981816", "0.68711984", "0.6827155", "0.6631159", "0.66159064", "0.6368315", "0.62825346", "0.6200157", "0.6183843", "0.6086158", "0.6067024", "0.6031689", "0.6024305", "0.5999499", "0.5995712", "0.5983647", "0.5953357", "0.5949816", "0.5937779", "0.59330195",...
0.745263
0
Set the order of photosets for the calling user.
function photosets_orderSets ($photoset_ids) { $params['method'] = 'flickr.photosets.orderSets'; $response = $this->execute(array('method' => 'flickr.photosets.orderSets', 'photoset_ids' => $photoset_ids), 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sort() {\n\t\tif ($this->request->is('post')) {\n\t\t\t$order = explode(\",\", $_POST['order']);\n\t\t\t$i = 1;\n\t\t\tforeach ($order as $photo) {\n\t\t\t\t$this->Picture->read(null, $photo);\n\t\t\t\t$this->Picture->set('order', $i);\n\t\t\t\t$this->Picture->save();\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}...
[ "0.57265484", "0.5364102", "0.5222773", "0.5144624", "0.51373714", "0.50431395", "0.50330323", "0.503229", "0.5030027", "0.49997965", "0.49879122", "0.49300522", "0.4914934", "0.49133882", "0.49124557", "0.48993564", "0.48892644", "0.48674384", "0.48394945", "0.4815727", "0.4...
0.60841894
0
Remove a photo from a photoset.
function photosets_removePhoto ($photoset_id, $photo_id) { $params['method'] = 'flickr.photosets.orderSets'; $response = $this->execute(array('method' => 'flickr.photosets.removePhoto', 'photoset_id' => $photoset_id, 'photo_id' => $photo_id), 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove()\n\t{\n\t\t$photosTable = PTA_DB_Table::get('Catalog_Product_Photo');\n\t\t$photos = (array)$photosTable->getPhotos($this->_id);\n\n\t\tif (parent::remove()) {\n\t\t\t$photoFileField = $photosTable->getFieldByAlias('photo');\n\t\t\tforeach ($photos as $photo) {\n\t\t\t\tPTA_Util::unlink(PTA...
[ "0.70054024", "0.683811", "0.6623904", "0.66115767", "0.6547519", "0.6327626", "0.6278144", "0.6216093", "0.6189883", "0.6186994", "0.61034226", "0.5992519", "0.5980534", "0.5953017", "0.59094036", "0.58949935", "0.58870465", "0.58870465", "0.58870465", "0.58870465", "0.58853...
0.8023547
0
Get direct photo url for all available sizes
public function getPhotoUrls () { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getImageURL($size = 'original') {\n\t\treturn $this->_config['images']['base_url'] . $size;\n\t}", "public function getThumbnailUrl();", "public function getFirstPhotoURL( $size = \"300\" ){\n $pics = $this->getPhotos();\n return $pics[0][\"Uri{$size}\"];\n }", "f...
[ "0.6900975", "0.6864399", "0.6854328", "0.6821344", "0.6792378", "0.6719705", "0.6677021", "0.66701275", "0.6655638", "0.6609071", "0.6567192", "0.6550256", "0.6543554", "0.6543554", "0.6515873", "0.65151435", "0.65028185", "0.6491071", "0.64888716", "0.64698875", "0.6420726"...
0.687726
1
Build direct photo url without flickr API calls
public function buildPhotoUrl () { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPublicUrl() {\n\t\treturn \"http://flickr.com/photos/{$this->getUserId()}/{$this->getId()}/\";\n\t}", "public function getPhotoURL(){\r\n\t\t$photo = $this->getPhoto();\r\n\r\n\t\treturn $photo != null ? \"https://maps.googleapis.com/maps/api/place/photo?maxwidth=800&photoreference=\" . $photo...
[ "0.7149396", "0.6715539", "0.6649939", "0.6552892", "0.6546769", "0.6533244", "0.6471729", "0.6382621", "0.63429135", "0.61817056", "0.615139", "0.6149372", "0.61065555", "0.6072044", "0.59625787", "0.59556365", "0.588957", "0.58646643", "0.5818456", "0.5807909", "0.58042216"...
0.76183903
0
Returns the chunk content
public function getChunk($defaultName, $name = NULL) { if ($name) { $chunk = $this->modx->getObject('modChunk', array('name' => $name)); if ($chunk) { return $chunk; } } $f = file_get_contents($this->config['chunks_path'].$defaultName.'.chunk.tpl'); $chunk = $this->modx->newObject('modChunk'); $chunk->setContent($f); return $chunk; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function content() {\n try {\n $r= '';\n while ($this->stream->available()) {\n $r.= $this->stream->read();\n }\n return $r;\n } finally {\n $this->stream->close();\n }\n }", "public function getContent() {\n\t\treturn $this->storage->file_get_contents($this->path...
[ "0.77114546", "0.7452064", "0.7445931", "0.73306036", "0.7322471", "0.7322471", "0.7322471", "0.7321249", "0.72998476", "0.729178", "0.7278118", "0.7262273", "0.72586125", "0.7256545", "0.72562456", "0.7251071", "0.72353387", "0.72353387", "0.72353387", "0.7228052", "0.722223...
0.0
-1
Builds simple pagination markup. Not yet used. TODO: add tpl configurability to li/a tags.
public function buildPagination($count,$limit,$start,$url) { $pageCount = $count / $limit; $curPage = $start / $limit; $pages = ''; for ($i=0;$i<$pageCount;$i++) { $newStart = $i*$limit; $u = $url.'&start='.$newStart.'&limit='.$limit; if ($i != $curPage) { $pages .= '<li class="page-number"><a href="'.$u.'">'.($i+1).'</a></li>'; } else { $pages .= '<li class="page-number pgCurrent">'.($i+1).'</li>'; } } return $this->getChunk('xflickrPagination',array( 'xflickr.pages' => $pages, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function buildPagination() {}", "protected function buildPagination() {}", "function pagination($currentPage, $itemCount, $itemsPerPage, $adjacentCount, $pageLinkTemplate, $showPrevNext = true) {\n $firstPage = 1;\n $lastPage = ceil($itemCount / $itemsPerPage);\n if ($lastPage <= 1) {\n ...
[ "0.7367386", "0.7367386", "0.70363015", "0.7036053", "0.69913244", "0.69782275", "0.67936444", "0.67499095", "0.6735606", "0.6732545", "0.67000854", "0.66176623", "0.6599001", "0.65671545", "0.6566332", "0.6562978", "0.65594476", "0.65522885", "0.65449905", "0.6537575", "0.65...
0.6141194
70
Register any events for your application.
public function boot() { parent::boot(); // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerEvents()\n {\n $events = $this->app->make(Dispatcher::class);\n\n foreach ($this->events as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "protected funct...
[ "0.8219639", "0.81953627", "0.76963043", "0.75230837", "0.7309002", "0.71383685", "0.69938403", "0.6951242", "0.6819252", "0.6813204", "0.67984855", "0.6773068", "0.6728253", "0.66973037", "0.6689797", "0.66618806", "0.66205025", "0.6603508", "0.65726024", "0.65529466", "0.65...
0.0
-1
This method returns js code
public function returnFieldJS() { return " console.log(this); console.log(jQuery('[name$=\"[copyright]\"')); "; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getJavascriptCode() {}", "public function getJavaScript() {}", "public function js();", "protected function generateJavascript() {}", "protected function generateJavascript() {}", "public static function js();", "public function js()\n {\n }", "public function getJs();",...
[ "0.90988934", "0.83969253", "0.80505556", "0.80175936", "0.80156076", "0.789639", "0.7873421", "0.7842477", "0.77542984", "0.74757546", "0.7404972", "0.7365616", "0.73396397", "0.7313067", "0.7302248", "0.727944", "0.7215828", "0.71865994", "0.71757513", "0.71437335", "0.7108...
0.64709735
75
This method converts the value into dataType float
public function evaluateFieldValue($value, $is_in, &$set) { $floatValue = number_format((float)$value, 3); return $floatValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function o_castFloat($value) {\n\t\t\treturn Obj::singleton()->castFloat($value);\n\t\t}", "public function toFloat(): float\n {\n return (float) $this->getValue();\n }", "private static function toFloat($value)\n {\n return (float) $value;\n }", "public function & toFloat()\n\t{\n\...
[ "0.8317768", "0.80067825", "0.7993397", "0.77178735", "0.7643994", "0.7583464", "0.7467525", "0.7440894", "0.7369646", "0.7327004", "0.72653854", "0.7224926", "0.7176007", "0.71039057", "0.7061392", "0.7055384", "0.7032907", "0.6994754", "0.69736534", "0.6967052", "0.6939833"...
0.0
-1
Comprueba que el saldo de una tarjeta nueva sea cero.
public function testSaldoCero() { $tarjeta = new Tarjeta; $this->assertEquals( $tarjeta->saldo(), 0 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saldo_tarjeta();", "public function Actualiza_saldo($codigo_tar,$montoTotalCompra,$saldoTarjeta){\n require_once('../conexion_bd/conexion.php');\n $this->usuario='rtonunez@gmail.com';\n $conectado = new conexion();\n $con_res = $conectado->conectar();\n ...
[ "0.7382537", "0.65729934", "0.64711034", "0.60900825", "0.6026074", "0.58807355", "0.58307165", "0.5779255", "0.5713792", "0.5634756", "0.5628402", "0.5541359", "0.55215466", "0.5506638", "0.54929215", "0.5486958", "0.5476865", "0.547195", "0.54629475", "0.5459325", "0.545502...
0.635146
3
Show Avatar image (public)
public function image() { $user_id = $this->request->getIntegerParam('user_id'); $size = $this->request->getStringParam('size', 48); $hash = $this->request->getStringParam('hash'); if ($size > 100) { $this->response->status(400); return; } $filename = $this->avatarFileModel->getFilename($user_id); $etag = md5($filename.$size); if ($hash !== $etag) { $this->response->status(404); return; } $this->response->withCache(365 * 86400, $etag); $this->response->withContentType('image/png'); if ($this->request->getHeader('If-None-Match') !== '"'.$etag.'"') { $this->response->send(); $this->render($filename, $size); } else { $this->response->status(304); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAvatar()\n {\n $avatar_size = $this->avatarSize();\n\n $avatar = $this->profile->getAvatar($avatar_size);\n\n $this->out->element('img', array('src' => ($avatar) ?\n $avatar->displayUrl() :\n Avatar...
[ "0.84803444", "0.81307083", "0.7886324", "0.7458423", "0.73834485", "0.7261296", "0.7227949", "0.7222626", "0.71745193", "0.7141436", "0.71247643", "0.7082773", "0.7069294", "0.70181876", "0.6975751", "0.6953318", "0.6916827", "0.6906564", "0.68827397", "0.68679774", "0.68566...
0.6748894
24
Render thumbnail from object storage
private function render($filename, $size) { try { $blob = $this->objectStorage->get($filename); Thumbnail::createFromString($blob) ->resize($size, $size) ->toOutput(); } catch (ObjectStorageException $e) { $this->logger->error($e->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function gen_thumbnail()\n {\n }", "public function gen_thumbnail()\n {\n }", "private function generateThumbnailImagick(){\n\t}", "public function get_thumbnail()\n {\n }", "public function getThumbnail() {\r return $this->Image()->CMSThumbnail();\r }", "public...
[ "0.6758778", "0.6758778", "0.67097664", "0.66169727", "0.65062666", "0.6468222", "0.63659376", "0.63577676", "0.63103616", "0.6289699", "0.6271972", "0.62567717", "0.62255365", "0.6221017", "0.6218405", "0.61952436", "0.61945945", "0.61753243", "0.611533", "0.61040545", "0.60...
0.65742755
4
Returns a list of filters.
public function getFilters() { $filters = array( new Twig_SimpleFilter('age', 'twig_age_filter'), ); return $filters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFilters();", "public function getFilters ()\n {\n $filters = [];\n\n return $filters;\n }", "public function getFilters()\n {\n $filters = [];\n\n return $filters;\n }", "protected function filters(): array\n {\n return $this->filters;\n ...
[ "0.8373732", "0.8306297", "0.8274772", "0.81312406", "0.8093324", "0.80923104", "0.804397", "0.8036365", "0.7975012", "0.7962499", "0.79219514", "0.78743917", "0.7870811", "0.7866746", "0.7831113", "0.7831113", "0.7831113", "0.7831113", "0.7831113", "0.7831113", "0.7831113", ...
0.7763301
28
Name of this extension
public function getName() { return 'date'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getName(): string\n {\n return 'Extension';\n }", "public function getExtensionName() {}", "public function getName()\n {\n return self::EXTENSION_NAME;\n }", "public function getExtensionName() {\n return $this->forwardCallToR...
[ "0.84646", "0.8322696", "0.82690585", "0.819326", "0.8116347", "0.8007436", "0.7975366", "0.79311234", "0.7764726", "0.7695189", "0.76817185", "0.76363313", "0.76333725", "0.7598651", "0.7592394", "0.7560336", "0.7557778", "0.75449234", "0.7540668", "0.74871445", "0.74728084"...
0.0
-1
Returns age depending on birthdate.
function twig_age_filter($birthdate) { if (!$birthdate instanceof \DateTime) $birthdate = new \DateTime($birthdate); $age = $birthdate->diff(new \DateTime())->y; return $age; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAge()\n\t{\n\t\t$date_birthday = $this->getAnswer('birthday');\n\t\t$date_birthday = convert_date_to_age($date_birthday);\n\t\treturn $date_birthday;\n\n\t}", "function get_age($date_of_birth) //day-month-year\n\t\t{\n\t\t\t$bdate = explode(\"-\", $date_of_birth);\n\t\t\t$day\t= isset($bdate[0...
[ "0.85895747", "0.8481457", "0.82973903", "0.82349837", "0.8220785", "0.81499", "0.8075451", "0.80091715", "0.79159486", "0.7887723", "0.78806996", "0.78337294", "0.78275657", "0.7825302", "0.78161514", "0.77976966", "0.7795655", "0.76894635", "0.76792324", "0.760469", "0.7600...
0.6642543
94
Pages of this module
function shoutbox_pages() { global $lang; $pages[] = array( 'func' => 'posts', 'title' => $lang['shoutbox']['page posts'] ); $pages[] = array( 'func' => 'clean', 'title' => $lang['shoutbox']['clean shoutbox'] ); $pages[] = array( 'func' => 'settings', 'title' => $lang['shoutbox']['page settings'] ); $pages[] = array( 'func' => 'check_updates', 'title' => $lang['shoutbox']['updates'] ); return $pages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPages() {}", "public function getPages();", "public function pagesOnly() {}", "protected function getPage() {}", "protected function getPage() {}", "function index() {\r\n $this->page();\r\n }", "public function setPages() {\n $this->pages = array(\n array...
[ "0.7721725", "0.75934494", "0.75645435", "0.7460441", "0.74602985", "0.73866814", "0.7178544", "0.7150249", "0.71424705", "0.71424705", "0.7141787", "0.7139619", "0.7118441", "0.70703626", "0.70392185", "0.702104", "0.7007604", "0.698144", "0.69424915", "0.6904348", "0.686538...
0.6733834
34
/ Main function: settings_general()
function settings() { global $core, $db, $lang; $result = NULL; if(isset($_POST['save'])) { $error = 0; foreach($_POST as $key => $value) { if($key != 'save') { $query = $db->select('shoutbox_settings', array('field'=>$key)); $record = $query[0]; if(!$db->update('shoutbox_settings', array('field'=>$key), array($record['id'],$key,stripslashes($value)))) $error++; } } if($error) $core->notify($lang['shoutbox']['update fail'],2); else $core->notify($lang['shoutbox']['update success'],1); } //Get settings from DB if($query = $db->select('shoutbox_settings')) { foreach((array)$query as $record) $settings[$record['field']] = $record['value']; //Define all inputs $form['top'] = '<form name="settings" method="post" action="'.$_SERVER['REQUEST_URI'].'">'; $form['nick_min_chars'] = '<label>'.$lang['shoutbox']['nick min chars'].' </label> <input type="text" name="nick_min_chars" value="'.$settings['nick_min_chars'].'" />'; $form['nick_max_chars'] = '<label>'.$lang['shoutbox']['nick max chars'].' </label> <input type="text" name="nick_max_chars" value="'.$settings['nick_max_chars'].'" />'; $form['post_max_chars'] = '<label>'.$lang['shoutbox']['post max chars'].' </label> <input type="text" name="post_max_chars" value="'.$settings['post_max_chars'].'" />'; $form['posts_refresh_time'] = '<label>'.$lang['shoutbox']['posts reflash time'].' </label> <input type="text" name="posts_refresh_time" value="'.$settings['posts_refresh_time'].'" />'; $form['posts_limit'] = '<label>'.$lang['shoutbox']['posts limit'].' </label> <input type="text" name="posts_limit" value="'.$settings['posts_limit'].'" />'; $form['time_anti_flood'] = '<label>'.$lang['shoutbox']['time_anti_flood'].' </label> <input type="text" name="time_anti_flood" value="'.$settings['time_anti_flood'].'" />'; $form['save'] = '<button type="submit" name="save" value="save">'.$lang['shoutbox']['save'].'</button>'; $form['bottom'] = '</form>'; //Return form foreach($form as $input) $result .= $input."\n"; return $result; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function general_settings() {\n\t\t$msg = '';\n\t\tif (!empty($_POST) && isset($_POST['save-settings'])) {\n\t\t\t$msg = self::save();\n\t\t}\n\t\t$page_id = get_option('dod_page_id');\n\t\t$args['page_id'] = $page_id;\n\t\t$query = new WP_Query($args);\n\t\t$page = $query->posts[0];\n\t\t$custom_css...
[ "0.8051905", "0.79481155", "0.7787004", "0.7676741", "0.7664723", "0.7584061", "0.757239", "0.757004", "0.7410104", "0.7282661", "0.7237992", "0.7221786", "0.7203514", "0.7183179", "0.7156995", "0.7154677", "0.71511805", "0.7137968", "0.7113793", "0.70986015", "0.7048427", ...
0.0
-1
Check's whether request url/route matches passed link
function on_page($path, $type = "name") { switch ($type) { case "url": $result = ($path == request()->is($path)); break; default: $result = ($path == request()->route()->getName()); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function hasRoute($link_function) {\n $routes = self::getRoutes();\n return isset($routes[$link_function]);\n }", "public function hasRoute(): bool;", "function route_match() {\n global $route;\n global $html;\n global $config;\n global $matched_route;\n\n $url = explode('in...
[ "0.6936334", "0.66675806", "0.6659667", "0.66127783", "0.6600663", "0.65738535", "0.65582985", "0.6469507", "0.64600587", "0.64049965", "0.6335055", "0.63331354", "0.63268185", "0.63233614", "0.6305586", "0.629175", "0.6252889", "0.62273103", "0.6226065", "0.6213071", "0.6207...
0.5592687
89
Appends passed value if condition is true
function return_if($condition, $value) { if ($condition) { return $value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function append($value)\n {\n \t$this->values[] = $value;\n }", "public function addConditionValue($value): void\n {\n $index = $this->conditionPrefix . $this->conditionIndex;\n $this->indexedValues[$index] = $value;\n $this->conditionIndex++;\n }", "public function ...
[ "0.6635248", "0.6097388", "0.5873732", "0.57035387", "0.5682717", "0.5667789", "0.56237364", "0.55909526", "0.5586592", "0.5492926", "0.5466513", "0.5396804", "0.5354344", "0.5344578", "0.5312921", "0.5307396", "0.53007483", "0.526229", "0.52469414", "0.5209624", "0.520457", ...
0.48027804
58
Returns page title from passed values
function page_title($title, $separator = '-') { return "{$title} {$separator} "; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _GetPageTitle() {\n\t\t$page_title = 'Shirtswithstamps: T-Shirts with stamps for every ocassion';\n\t\t\n\t\tif (isset($_GET['DepartmentId']) && isset($_GET['CategoryId'])) {\n\t\t\t$page_title = Catalog::GetDepartmentName($_GET['DepartmentId']).' &raquo; '.Catalog::GetCategoryName($_GET['CategoryI...
[ "0.7869759", "0.76231176", "0.7594234", "0.758278", "0.7578267", "0.75586426", "0.7556905", "0.7524355", "0.7510254", "0.750972", "0.74869823", "0.7486178", "0.7485864", "0.74839693", "0.7469107", "0.7439949", "0.74377686", "0.74294674", "0.7361788", "0.7361788", "0.7361788",...
0.70793283
66
Schrijft Bestelregels weg in DB bestelregel
public function createBestelRegel($BestelID, $ProductID, $Aantal, $Prijs) { $sql = "INSERT INTO bestelregel (BestelID, ProductID, Aantal, Prijs) VALUES (".$BestelID.", ".$ProductID.", ".$Aantal.", ".$Prijs.")"; $dbh = new PDO(DBConfig::$DB_CONNSTRING, DBConfig::$DB_USERNAME, DBConfig::$DB_PASSWORD); $dbh->exec($sql); $dbh=NULL; return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gesuchter_wert_sql($abfrage,$gesuchte_spalte) {\n\t$mysqli=MyDatabase();\t\n\tif ($result=$mysqli->query($abfrage)) {\n\t\twhile ($row=$result->fetch_object()) {\n\t\t\t$gesuchter_wert=$row->$gesuchte_spalte;\n\t\t}\n\t}\t\n\tif (!isset($gesuchter_wert)) {$gesuchter_wert=0;}\n\treturn $gesuchter_wert;\n}"...
[ "0.63985133", "0.6234279", "0.6209573", "0.6175856", "0.61626637", "0.5964679", "0.59003776", "0.5876892", "0.5865127", "0.5861853", "0.5848731", "0.5839881", "0.5830965", "0.582932", "0.57983", "0.57590437", "0.5742291", "0.5739879", "0.5739242", "0.5731642", "0.5694837", ...
0.0
-1
return array van alle regels van BestelID
public static function getBestellingRegelsFromId($BestelID) { $sql = "SELECT * FROM bestelregel WHERE BestelID='".$BestelID."'"; $dbh = new PDO(DBConfig::$DB_CONNSTRING, DBConfig::$DB_USERNAME, DBConfig::$DB_PASSWORD); $result = $dbh->query($sql); $arrBestelregel = array(); foreach ($result as $rij) { $bestelregel = new Bestelregel($rij["ProductID"], $rij["Aantal"]); array_push($arrBestelregel, $bestelregel); } $dbh = null; if (isset($arrBestelregel)) { return $arrBestelregel; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function alleBestellungen(){\n\n\t\treturn array(\n\t\t\t[\"ID\" => 1, \"Vorname\" => \"Wenke\", \"Nachname\" => \"Tautz\"],\n\t\t\t[\"ID\" => 2, \"Vorname\" => \"Christoph\", \"Nachname\" => \"Silge\"],\n\t\t\t[\"ID\" => 3, \"Vorname\" => \"Henry\", \"Nachname\" => \"Juwig\"],\n\t\t\t[\"ID\" => 4, \"Vornam...
[ "0.65718067", "0.64814", "0.6462641", "0.6409762", "0.6257897", "0.6219593", "0.6206344", "0.6188429", "0.61761147", "0.6148916", "0.6142261", "0.6134887", "0.613374", "0.6104324", "0.60840917", "0.6064643", "0.6064643", "0.6048372", "0.6033722", "0.6021515", "0.601085", "0...
0.7542626
0
Menampilkan halaman pembuatan kelas
public function newClass() { $listCategories = Categories::where('deleted_at', '=', null)->orderBy('name', 'asc')->get(); $listSpeakers = Speakers::where('deleted_at', '=', null)->orderBy('name', 'asc')->get(); return view('pages.admin.class.addClass', compact('listCategories', 'listSpeakers')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function halamanbaru(){\n\t\tcek_session_admin();\n\t\t$data['record'] = $this->model_halaman->halamanstatis();\n\t\t$data['record2'] = $this->model_halaman->en_halamanstatis();\n\t\t$this->load->view('administrator/mod_halaman/view_halaman2',$data);\n\t}", "public function aksi_tambah_pengikut_suket014()\n\t{\n...
[ "0.7061618", "0.6708213", "0.66740704", "0.6671819", "0.66531307", "0.6643389", "0.66344225", "0.6585777", "0.6557329", "0.65266424", "0.65264046", "0.65206337", "0.65034795", "0.65016115", "0.64889276", "0.64796966", "0.6459133", "0.6449085", "0.64430726", "0.6440806", "0.64...
0.0
-1
List all class in user mode
public function listClassUser($category = null, $type = null) { $listCategories = Categories::where('deleted_at', '=', null)->get(); if ($category == 'search') { $listClasses = Classes::where('name', 'like', '%' . $type . '%') ->where('is_draft', '=', 0) ->where('deleted_at', '=', null) ->with('speaker') ->orderBy('id', 'desc') ->paginate(12); } else if ($category == null || $type == null) { $listClasses = Classes::where('deleted_at', '=', null) ->where('is_draft', '=', 0) ->with('speaker') ->orderBy('id', 'desc') ->paginate(12); } else { if ($category == 'all' && $type != null) { $listClasses = Classes::where('type', '=', $type) ->where('is_draft', '=', 0) ->where('deleted_at', '=', null) ->with('speaker') ->orderBy('id', 'desc') ->paginate(12); } else if ($type == 'all' && $category != null) { $listClasses = Classes::where('category_id', '=', $category) ->where('is_draft', '=', 0) ->where('deleted_at', '=', null) ->with('speaker') ->orderBy('id', 'desc') ->paginate(12); } else if ($category == 'all' && $type == 'all') { $listClasses = Classes::where('deleted_at', '=', null) ->where('is_draft', '=', 0) ->with('speaker') ->orderBy('id', 'desc') ->paginate(12); } else { $listClasses = Classes::where('category_id', '=', $category) ->where('is_draft', '=', 0) ->where('type', '=', $type) ->where('deleted_at', '=', null) ->with('speaker') ->orderBy('id', 'desc') ->paginate(12); } } return view('pages.user.class.index_class', ['listClasses' => $listClasses, 'listCategories' => $listCategories, 'category_id' => $category, 'type' => $type]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function getAvailableUserClasses() {\n return array('Administrator', 'Member');\n }", "static function getUserInstanciableClasses(){\n \n //get all the classes\n $AllClasses=get_declared_classes();\n \n foreach($AllClasses as $Class):\n \n $clas...
[ "0.7115923", "0.6675465", "0.6661889", "0.6482631", "0.6467848", "0.6467848", "0.6467848", "0.64382726", "0.6430977", "0.64124274", "0.6378397", "0.6241828", "0.6184686", "0.6169037", "0.6150231", "0.61384255", "0.6130779", "0.61231565", "0.61200404", "0.6116923", "0.6042809"...
0.0
-1
List all class in user mode
public function listMyClassUser() { $listClasses = LogClasses::where('user_id', '=', Auth()->user()->id) ->where('deleted_at', '=', null) ->with(['class.category', 'class.speaker']) ->orderBy('created_at', 'desc') ->paginate(12); return view('pages.user.class.myclass', ['listClasses' => $listClasses]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function getAvailableUserClasses() {\n return array('Administrator', 'Member');\n }", "static function getUserInstanciableClasses(){\n \n //get all the classes\n $AllClasses=get_declared_classes();\n \n foreach($AllClasses as $Class):\n \n $clas...
[ "0.7115923", "0.6675465", "0.6661889", "0.6482631", "0.6467848", "0.6467848", "0.6467848", "0.64382726", "0.6430977", "0.64124274", "0.6378397", "0.6241828", "0.6184686", "0.6169037", "0.61384255", "0.6130779", "0.61231565", "0.61200404", "0.6116923", "0.6042809", "0.6032223"...
0.6150231
14
Return combo list of differents status of a proposal Values are id of table c_propalst
function selectAskPriceSupplierStatus($selected='',$short=0) { global $langs; $sql = "SELECT id, code, label, active FROM ".MAIN_DB_PREFIX."c_propalst"; $sql .= " WHERE active = 1"; dol_syslog(get_class($this)."::selectAskPriceSupplierStatus", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { print '<select class="flat" name="askpricesupplier_statut">'; print '<option value="">&nbsp;</option>'; $num = $this->db->num_rows($resql); $i = 0; if ($num) { while ($i < $num) { $obj = $this->db->fetch_object($resql); if ($selected == $obj->id) { print '<option value="'.$obj->id.'" selected>'; } else { print '<option value="'.$obj->id.'">'; } $key=$obj->code; if ($langs->trans("PropalStatus".$key.($short?'Short':'')) != "PropalStatus".$key.($short?'Short':'')) { print $langs->trans("PropalStatus".$key.($short?'Short':'')); } else { $conv_to_new_code=array('PR_DRAFT'=>'Draft','PR_OPEN'=>'Opened','PR_CLOSED'=>'Closed','PR_SIGNED'=>'Signed','PR_NOTSIGNED'=>'NotSigned','PR_FAC'=>'Billed'); if (! empty($conv_to_new_code[$obj->code])) $key=$conv_to_new_code[$obj->code]; print ($langs->trans("PropalStatus".$key.($short?'Short':''))!="PropalStatus".$key.($short?'Short':''))?$langs->trans("PropalStatus".$key.($short?'Short':'')):$obj->label; } print '</option>'; $i++; } } print '</select>'; } else { dol_print_error($this->db); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProposalStatusList()\n {\n $query = \"SELECT StatusID, Name FROM ProposalStatus;\";\n $stmt = $this->conn->prepare( $query );\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n }", "public function getListCpr()\n {\n $db = $this->dblocal;\n try\n {\n ...
[ "0.68880457", "0.5902665", "0.58107495", "0.5808453", "0.5746115", "0.56819946", "0.5648069", "0.55413383", "0.55396396", "0.55171937", "0.5429772", "0.5349765", "0.5348022", "0.53479105", "0.53405845", "0.5319196", "0.5316652", "0.53141123", "0.5296049", "0.52773917", "0.526...
0.49753904
46
Get the route key for the model.
public function getRouteKeyName() { return 'hash'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRouteKey();", "public function getRouteKey();", "public function getRouteKey()\n {\n return $this->getAttribute($this->getRouteKeyName());\n }", "public function getRouteKey()\n {\n $slug = $this->slugField();\n\n return $this->$slug;\n }", "public functi...
[ "0.8331818", "0.8331818", "0.8329921", "0.82206964", "0.81144017", "0.804808", "0.804808", "0.787448", "0.7854665", "0.78247094", "0.78018355", "0.78018355", "0.77601475", "0.7715494", "0.7715494", "0.7662308", "0.76057196", "0.7566795", "0.7543832", "0.7517731", "0.7517731",...
0.68904066
45
Returns the test dataset.
protected function getDataSet() { return new ArrayDataSet($this->getDataSetArray()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDataSet()\n {\n return $this->createMySQLXMLDataSet(__DIR__ . '/../paczkolab_test.xml');\n }", "protected function getDataSet()\n {\n //Dataset TokenTest.xml has the minimal data we need to perform our tests\n $classFile = str_replace('.php', '.xml', __FILE__)...
[ "0.7723198", "0.7719603", "0.7709923", "0.7709923", "0.76564926", "0.74969155", "0.7416149", "0.7410265", "0.7383849", "0.7383849", "0.73000264", "0.7262511", "0.7208042", "0.7174706", "0.7144803", "0.70893824", "0.705882", "0.7034158", "0.70333415", "0.6942394", "0.6715493",...
0.61672574
35
>> End __construct() Establishes the expiration time (in seconds) of cache storage. An Exception will be thrown if time is less or equal to 0.
public function setExpTime( $expTime = 0 ) {//-------------------->> setExpTime() if ( (int) $expTime <= 0 ) {//---------->> if invalid $expTime throw new CacheManager_Exception( "Expiration Time ({$expTime}) must be greater than 0" ); }//---------->> End if invalid $expTime $this->_expTime = (int) $expTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n\t{\n\t\t$this->cache_ttl = intval(ee()->TMPL->fetch_param('ttl'));\n\t\t// For speed and API purposes, limit the cache to 30sec minimum\n\t\tif ($this->cache_ttl < 30)\n\t\t{\n\t\t\t$this->cache_ttl = 30;\n\t\t}\n\t}", "public function expires($time = 3600){\n\n\t\tif(!is_numeric(...
[ "0.67760265", "0.6632737", "0.6494018", "0.64309925", "0.62257385", "0.61697084", "0.61397326", "0.6121235", "0.61200494", "0.61146575", "0.6088086", "0.60651386", "0.60520744", "0.6030503", "0.60157645", "0.59920114", "0.59904605", "0.59550166", "0.59392595", "0.58948153", "...
0.62456685
4
>> End setExpTime() Retrieves a content form cache without taking care about the expiration time param. If the cache doesn't exist, the returned value will be null.
abstract public function getCacheContent( $cacheID = '', $unserialize = true );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cache() {\n\n if ( func_num_args() == 0 ) {\n return $this->expireTime;\n } elseif ( func_num_args() == 1 ) {\n if ( is_bool(($arg = func_get_arg(0))) ) {\n if ( $arg ) {\n $this->expireTime = 3600;\n } else {\n ...
[ "0.693514", "0.665393", "0.6604886", "0.64926875", "0.6409107", "0.6151491", "0.603896", "0.6023669", "0.6018186", "0.5997096", "0.5943438", "0.5936688", "0.59275585", "0.58980334", "0.5814625", "0.5812415", "0.57907104", "0.57767457", "0.5720273", "0.5718782", "0.571045", ...
0.0
-1
Retrieves a content from cache taking care about the expiration time param. If the cache doesn't exist or is invalid, the returned value will be a null value.
abstract public function getCache( $cacheID = '', $unserialize = true );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFromCache() {}", "public function get($cache_name);", "function getCache() {\n\t\t// The following line is only for classloading purposes\n\t\t$categoryEntryDao =& $this->getEntryDAO();\n\t\t$journalDao =& DAORegistry::getDAO('JournalDAO');\n\n\t\t// Load and return the cache, building it if...
[ "0.7521091", "0.7293938", "0.7276305", "0.71754813", "0.7143361", "0.71254385", "0.70932305", "0.7043015", "0.7038775", "0.70352143", "0.697849", "0.6959729", "0.69508094", "0.6870477", "0.68694645", "0.6845388", "0.68122286", "0.6805663", "0.6787952", "0.6782692", "0.6778374...
0.666551
26
Saves the received data inside an especific cache persistance layer. If the cache with the ID doesn't exist, this method will try to create it. Otherwise, the file content will be replaced with the new data definition. If the data was successfully saved, the returned value will be a true boolean value.
abstract public function save( $data = null, $cacheID = '', $serialize = true );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveCache()\n {\n if($this->isCacheExists()){\n if($this->isUpdateRequired()){\n $this->updateCache();\n }\n } else {\n $this->packData()->writeFile();\n }\n }", "private function _cache_save($data_to_cache, $cache_id, $ca...
[ "0.71868056", "0.7137549", "0.6970445", "0.696513", "0.6947165", "0.687277", "0.6760302", "0.66594326", "0.66177636", "0.65944284", "0.6548331", "0.65441805", "0.6462965", "0.6459722", "0.6451877", "0.641449", "0.64091235", "0.6366744", "0.6353055", "0.63118786", "0.63017464"...
0.6611174
9
Create the event listener.
public function __construct() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addRequestCreateListener($listener);", "public function onEvent();", "private function init_event_listeners() {\n\t\t// add_action('wp_ajax_example_action', [$this, 'example_function']);\n\t}", "public function listener(Listener $listener);", "protected function setupListeners()\n {\n ...
[ "0.65685207", "0.62875676", "0.6221792", "0.6197413", "0.61627764", "0.6129312", "0.6096226", "0.6056844", "0.6051069", "0.6041841", "0.596228", "0.596194", "0.5957539", "0.59439605", "0.58821785", "0.58821785", "0.5874665", "0.5864387", "0.5856076", "0.584338", "0.5824244", ...
0.0
-1
Display a listing of the resource.
public function index() { $Project = Project::paginate(); return ProjectResource::collection($Project); }
{ "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.7446377", "0.7361922", "0.72984487", "0.7248631", "0.7162871", "0.7148215", "0.7131838", "0.71028054", "0.7102395", "0.70988023", "0.7048243", "0.6993516", "0.6989079", "0.69341344", "0.69001913", "0.6899167", "0.68920904", "0.6887188", "0.68661547", "0.6849159", "0.683002...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75934863", "0.75934863", "0.7587591", "0.75782615", "0.75711566", "0.74992937", "0.74349296", "0.7432467", "0.7387912", "0.7351958", "0.73380226", "0.73111826", "0.72957826", "0.72812104", "0.72734547", "0.7242778", "0.72294843", "0.7225723", "0.718609", "0.71780044", "0.7...
0.0
-1