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
Enable the login on registration feature.
public static function loginOnRegistration(): string { return 'login-on-registration'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_user()\n {\n \n return true;\n \n }", "public function register(){\n\n\t\t$this->Login_model->register();\t\n\n\t}", "function login_form_register()\n {\n }", "public static function hasLoginOnRegistrationFeatures(): bool\n {\n return static...
[ "0.7113661", "0.6960683", "0.6734446", "0.66813546", "0.6681164", "0.6681164", "0.6678527", "0.6574599", "0.6571733", "0.65401506", "0.6517677", "0.6490876", "0.64236575", "0.6393114", "0.6349308", "0.63349956", "0.62997705", "0.62870204", "0.6285766", "0.6272844", "0.6257646...
0.6810158
2
Enable the provider avatars feature.
public static function providerAvatars(): string { return 'provider-avatars'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function hasProviderAvatarsFeature(): bool\n {\n return static::enabled(static::providerAvatars());\n }", "function register_block_core_avatar()\n {\n }", "protected function validateSortAndInitiateAvatarProviders() {}", "public function setAvatar(string $avatar);", "protec...
[ "0.69890743", "0.59169054", "0.584463", "0.570177", "0.56707203", "0.5527663", "0.54596096", "0.5410329", "0.5303599", "0.52932936", "0.52829087", "0.5276283", "0.5201598", "0.5201598", "0.5190485", "0.5148705", "0.51397544", "0.51092833", "0.50556517", "0.5026802", "0.502168...
0.68847126
1
Enable the remember session feature for logging in.
public static function rememberSession(): string { return 'remember-session'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enableRememberMe()\n {\n $this->rememberMe = true;\n }", "public function loginCheckedRememberMe()\n {\n echo \"<script>document.getElementById('rememberme').checked = true;</script>\";\n }", "public function rememberLogin()\n {\n $token = new Token();\n ...
[ "0.81611353", "0.6912591", "0.68618864", "0.6769611", "0.6709135", "0.66840404", "0.66109407", "0.65919", "0.6560248", "0.6560248", "0.653286", "0.65289813", "0.65211445", "0.650802", "0.6450558", "0.63362855", "0.63027996", "0.6235641", "0.6234458", "0.62228537", "0.6188872"...
0.6617742
6
Enable the automatic refresh token update on token retrieval.
public static function refreshOauthTokens(): string { return 'refresh-oauth-tokens'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function refreshToken()\n {\n $token = $this->getToken();\n }", "protected function forceRefreshTokens()\n\t{\n\t\t/** @var ConnectorBox $connector */\n\t\t$connector = $this->getConnector();\n\t\t$config = Factory::getConfiguration();\n\t\t$pingResult = $connector->ping(true);\n\n\t\tFa...
[ "0.75224024", "0.69166297", "0.6758304", "0.6659941", "0.6636422", "0.6552055", "0.6474853", "0.64723873", "0.643404", "0.6346468", "0.63425463", "0.6241886", "0.6241886", "0.6241886", "0.6241886", "0.6241886", "0.6241886", "0.6241886", "0.6241886", "0.6241886", "0.6241886", ...
0.0
-1
Setup before running any test case
public static function setUpBeforeClass() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "...
[ "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8435112", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "0.8434914", "...
0.0
-1
Setup before running each test case
public function setUp() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "...
[ "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136364", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "0.8136321", "...
0.0
-1
Clean up after running each test case
public function tearDown() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public fu...
[ "0.7987785", "0.7987785", "0.7987785", "0.7987785", "0.7987785", "0.7987785", "0.7987785", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "0.7986567", "...
0.0
-1
Clean up after running all test cases
public static function tearDownAfterClass() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public fu...
[ "0.79781395", "0.79781395", "0.79781395", "0.79781395", "0.79781395", "0.79781395", "0.79781395", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.7976836", "0.797683...
0.0
-1
Detect is a current version compatible with a given one.
public function compatible($other) { $cmp = $this->major - $other->getMajor(); if ($cmp != 0) return FALSE; return $this->minor - $other->getMinor() >= 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_php_version_compatible($required)\n {\n }", "public function compatVersionConditionMatchesSameRelease() {}", "public function compatVersionConditionMatchesSameRelease() {}", "public function compatVersionConditionMatchesOlderRelease() {}", "public function compatVersionConditionMatchesOld...
[ "0.74003553", "0.7226277", "0.7225879", "0.7157196", "0.71565586", "0.69552886", "0.6954265", "0.6787495", "0.6785874", "0.6784257", "0.6669837", "0.6568022", "0.6567794", "0.6530429", "0.65104926", "0.64372855", "0.6408648", "0.64077747", "0.64055943", "0.63715523", "0.63636...
0.6249424
28
Returns a current protocol version supported be plugin.
public static function getCurrent() { return new amvonetroom_Version(AMVONETROOM_PROTOCOL_VERSION); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_protocol_version(): string {\n return $this->protocol_version ?? '1.1';\n }", "public function GetProtocolInfo()\r\n {\r\n $this->checkDatabaseManager();\r\n return $this->_DatabaseHandler->protocol_version; \r\n }", "public function ge...
[ "0.7576553", "0.75652975", "0.7545476", "0.7539783", "0.7433779", "0.72467715", "0.72448134", "0.7197946", "0.71660906", "0.7146725", "0.7106861", "0.70915383", "0.7071719", "0.7071719", "0.70294964", "0.70195633", "0.7010494", "0.700459", "0.6843568", "0.6814779", "0.6809308...
0.6077722
74
Returns a protocol version of the current HTTP request.
public static function getFromRequest() { // there is no suitable PARAM_XXX flag in Moodle to clean this parameter but // don't worry it will be split and parsed as two int and it's never used in raw form $param = @$_GET['protoVersion']; if ($param && !empty($param)) return n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_request_protocol()\n{\n return Request::GetProtocol();\n}", "public function version()\n {\n return $this->protocol;\n }", "function getProtocol() {\n\t\treturn $this->getParam(self::PARAM_PROTOCOL);\n\t}", "public function get_protocol_version(): string {\n return $this->...
[ "0.79475594", "0.7611117", "0.75215816", "0.7438235", "0.7431877", "0.7429254", "0.730948", "0.7277163", "0.726366", "0.7234121", "0.72198904", "0.7190087", "0.7187419", "0.7186932", "0.71843225", "0.71666515", "0.7134317", "0.7126224", "0.7120659", "0.71193904", "0.7114901",...
0.6327691
63
Check a compatibility of a protocol version of the current request.
public static function checkRequest($ver = null) { $requestVersion = empty($ver) ? amvonetroom_ProtoVersion::getFromRequest() : new amvonetroom_Version($ver); $currentVersion = amvonetroom_ProtoVersion::getCurrent(); $v20 = new amvonetroom_Version(2,0); if (!$currentVersion->compatible(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkConnection(){\n\t\t\t\n\t\t\t$request = $this->url.$this->getMode(\"version\").\"?\".$this->key_string;\n\t\t\t$this->http->setURL($request);\n\t\t\t$response = $this->http->send();\n\t\t\t//echo $this->http->HTMLizeErrlog();\n\t\t\t$this->bn_version = str_replace(\"_\", \".\", $response[\"ve...
[ "0.6421515", "0.64097184", "0.6248191", "0.62018716", "0.6170367", "0.6107512", "0.6091714", "0.6089244", "0.6046947", "0.60134834", "0.60111284", "0.59792584", "0.5924806", "0.5901813", "0.5901513", "0.58950216", "0.58864415", "0.58789337", "0.58784485", "0.5869566", "0.5839...
0.65318626
0
Returns a current version of the plugin.
public static function getCurrent() { global $CFG; if ($data = file_get_contents("$CFG->dirroot/mod/amvonetroom/revision")) return new amvonetroom_Version($data); else return new amvonetroom_Version(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrentVersion();", "static function get_plugin_version() {\n\t\t$plugin_data = get_file_data(__FILE__, array('version' => 'Version'), 'plugin');\n\t\tself::$version = $plugin_data['version'];\n\t\treturn $plugin_data['version'];\n\t}", "private function getLocalVersion()\n {\n $pl...
[ "0.7989453", "0.7961599", "0.78250456", "0.77458227", "0.7729827", "0.7729827", "0.758653", "0.7570084", "0.752616", "0.7488087", "0.7472138", "0.7471158", "0.7395239", "0.7395239", "0.73888165", "0.73291594", "0.7302229", "0.7302229", "0.7302229", "0.7302229", "0.7302229", ...
0.70797575
48
Display a listing of the resource.
public function index() { $links = Link::all(); return view('admin.links.index',compact('links')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { $resources = Material::all(); return view('admin.links.create',compact('resources')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $this->validate($request,[ 'url'=>'required' ]); $material = Material::findOrFail($request->get("resource")); $link = new Link($request->only('url')); $link->material()->associate($material); $link->save(); return redirect(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { $link = Link::findOrFail($id); return view('admin.links.show',compact('link')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $resources = Material::all(); $link = Link::with('material')->findOrFail($id); return view('admin.links.edit',compact('link','resources')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $this->validate($request,[ 'url'=>'required' ]); $material = Material::findOrFail($request->get("resource")); $link = Link::findOrFail($id); $link->fill($request->only('url')); $link->material()->associate($material); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $link= Link::findOrFail($id); $link->delete(); return redirect()->route('link')->with('message','Record Deleted !!!!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
echo "This is a MAJOR update please be patient while database updates are running...";
function update_main( $table, $objGeoIP ) { global $wpdb; //Modify each record to include country based on IP $q2 = "SELECT id, user_id FROM `" . $table . "` WHERE country_code IS NULL LIMIT 1000"; $r2 = $wpdb->query( $q2 ); $changed = false; while ( $a2 = $wpdb->fetchNextAssoc( $r2 ) ) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function upgrade_echo($message)\n{\n echo $message;\n // Flush the message, so that there's some progress information\n // output to the browser even when the upgrade is taking a while\n if (ob_get_length() !== FALSE)\n {\n ob_flush();\n }\n flush();\n}", "final function what_is_good() {\n\t\t\techo \"...
[ "0.6713284", "0.61402744", "0.6093801", "0.6033369", "0.5963025", "0.5961374", "0.59531677", "0.59422797", "0.59159935", "0.5907624", "0.5881321", "0.5850375", "0.5813596", "0.5813073", "0.58106875", "0.57955074", "0.5764324", "0.5761401", "0.57588214", "0.57499355", "0.57270...
0.0
-1
Seed the application's database.
public function run() { $this->call(BarangsSeeder::class); $this->call(TravellerSeeder::class); $this->call(ActivityTravellerSeeder::class); $this->call(RequesterSeeder::class); $this->call(ActRequesterSeeder::class); $this->call(UsersSeeder::class); $this->ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function dbSeed(){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Turn foreign key checks off\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');// <- USE WITH CAUTION!\n\t\t\t//Seed tables\n\t\t\tArtisan::call('db:seed');\n\t\t\t//Turn foreign key checks on\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=...
[ "0.8064933", "0.7848158", "0.7674873", "0.724396", "0.7216743", "0.7132209", "0.70970356", "0.70752203", "0.704928", "0.699208", "0.6987078", "0.69839287", "0.6966499", "0.68990964", "0.6868679", "0.68468624", "0.68307716", "0.68206114", "0.6803113", "0.6803113", "0.6801801",...
0.0
-1
Return a sorted list object
public function getList();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sort();", "public function getSorting();", "function wp_list_sort($input_list, $orderby = array(), $order = 'ASC', $preserve_keys = \\false)\n {\n }", "public function &getOrderBy();", "protected function orderList()\n {\n return ksort($this->callbackList, \\SORT_REGULAR);\n...
[ "0.69468474", "0.66617936", "0.6541892", "0.64371854", "0.6356873", "0.6281121", "0.61487806", "0.6141705", "0.60801065", "0.60801065", "0.60801065", "0.607271", "0.6018271", "0.601227", "0.60061514", "0.59961003", "0.5981593", "0.5933787", "0.5903337", "0.58925813", "0.58485...
0.5277788
86
Receive and process the contents of an annotation
public function __construct(array $data) { $this->setParam($data, 'param'); $this->setParam($data, 'value'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function parseAnnotations ($ary) {\n if (isset($ary['description'])) {\n $this->output.= $this->getTab() . $ary['description']['0'] . $this->getNL();\n } else {\n $this->output.= $this->getTab() . \"No description\" . $this->getNL();\n }\n \n if (i...
[ "0.60306334", "0.5898158", "0.5859481", "0.5824147", "0.5678775", "0.5561853", "0.54022205", "0.52998465", "0.5277175", "0.5251466", "0.5230088", "0.51718646", "0.5168481", "0.51498723", "0.5136478", "0.512975", "0.50766766", "0.503749", "0.49889198", "0.49399802", "0.4914696...
0.0
-1
Retrieve the parameter name.
public function getParam() { return $this->param; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getParameterName(): string\n {\n return \\str_replace('-', '_', $this->parameter->parameter->__toString());\n }", "public function getParameterName()\n {\n return $this->parameterName;\n }", "public function getParameterName();", "private function getNamedParam()\n ...
[ "0.8529051", "0.8436751", "0.83102685", "0.79593366", "0.7821001", "0.751129", "0.7495868", "0.74808973", "0.71601844", "0.7118954", "0.70829666", "0.7047581", "0.70213246", "0.70080173", "0.69898957", "0.6898659", "0.6898659", "0.6898659", "0.68597496", "0.6817973", "0.68163...
0.6780371
24
Store a newly created resource in storage.
public function store() { $service = new Service; $service->name = Input::get('name'); $service->icon = Input::get('icon'); $service->description = Input::get('description'); $service->long_desc = Input::get('long_desc'); $service->img_detail = I...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $service = Service::find($id); $service->delete(); return Redirect::to('/admin/services'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
echo $d = \Helpers::encrypt(4);
public function index() { // echo \Helpers::decrypt($d); try{ $data['title'] = 'Dashboard'; $data['js_array'] = array('morris.min.js','raphael.min.js','dashboard.js'); // $contactCount = Contact::count(); // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encrypt($str) {\n return Crypt::encrypt($str);\n}", "public function encrypt();", "function encrypt($string) { \r\n\tglobal $key;\r\n\t$result = Cryptor::Encrypt($string,$key);\r\n\treturn $result;\r\n}", "public function encryptPass()\n {\n return \"RASAHolaRSSA\";\n }", "function do...
[ "0.7397771", "0.7049035", "0.70283306", "0.6908627", "0.66777456", "0.6553728", "0.6415885", "0.6407693", "0.63882494", "0.63412756", "0.63311416", "0.62252945", "0.6217367", "0.6192916", "0.61740404", "0.61563826", "0.6153071", "0.6133801", "0.61155415", "0.60402226", "0.603...
0.0
-1
Fetch Business by City id
public function getCityWiseBusiness() { $start=0; $limit=20; $city_id=$_REQUEST['city_id']; $fromdate=$_REQUEST['fromdate']; $todate=$_REQUEST['todate']; $topClickedBusinesses = Business::where('approved_by_admin','1')->where('status','Active'); if(!empty($city_id)) { $topClickedBusinesses...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find($id_city){\n\n //-- return all query and use the object result in update-profile\n return $search = mysql_query(\"SELECT id_city, states.id_state, states.state, city FROM cities INNER JOIN states ON(cities.id_state = states.id_state ) WHERE id_city='\".$id_city.\"' LIMIT 1\"); ...
[ "0.6639894", "0.6566907", "0.6478065", "0.6268527", "0.6225092", "0.6204726", "0.62000656", "0.6171063", "0.6161848", "0.61611676", "0.616001", "0.6108149", "0.60548276", "0.60414016", "0.5997809", "0.59919524", "0.59669214", "0.59598655", "0.5919749", "0.59109735", "0.586671...
0.57340926
30
Function Name : getCityWiseCustomers Purpose : This function is use for on change get city realated Customers Count. Author : Created Date : 14012021 Modified date : Input Params : \Illuminate\Http\Request $request Return Value : void
public function getCityWiseCustomers($id) { // Fetch Customers by City id $customerCount=DB::table('users')->select(DB::raw('COUNT(*) as total,date(created_at) as pp')) ->whereRaw('created_at > now() - INTERVAL 7 day') ->where('user_type','CU') ->where('city_id',$id) ->groupby ('pp') ->orderby('crea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cities_get()\n {\n $em = $this->doctrine->em;\n $citiesRepo = $em->getRepository('Entities\\City');\n $cities = $citiesRepo->findAll();\n foreach ($cities as $city) {\n $city->servicesCount = $city->getServices()->count();\n }\n $response[\"da...
[ "0.65063965", "0.6504285", "0.64686984", "0.6360002", "0.63480943", "0.63078284", "0.6265198", "0.61875325", "0.61639804", "0.6136134", "0.6091443", "0.60901475", "0.60092384", "0.5995947", "0.5934302", "0.58667684", "0.58196485", "0.5798688", "0.57982856", "0.57390857", "0.5...
0.67667896
0
Function Name : change_password Purpose : This function is use for change password of a user. Author : Created Date : 18032019 Modified date : Input Params : \Illuminate\Http\Request $request Return Value : void
public function change_password(Request $request) { try{ $data['title'] = 'Change Password'; if ($request->isMethod('post')) { $Validator = Validator::make($request->all(), [ 'old_password' => 'required', 'new_password' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function changePassword(Request $request){\n DB::table('users')\n ->where('id', 1)\n ->update(['password' => $request->get('password')]);\n return view('updatePassword') ; \n }", "public function changeUserPassword($request)\r\n {\r\n $user = $this->userRep...
[ "0.8424435", "0.82620424", "0.820156", "0.81923896", "0.8136362", "0.81112427", "0.8102437", "0.8043626", "0.8034415", "0.8019988", "0.79944927", "0.7984865", "0.7976581", "0.79620016", "0.7918457", "0.78915465", "0.78853357", "0.78698653", "0.7862728", "0.78496385", "0.78362...
0.82353103
2
Complex test with exception
public function testAssertInvalidDataShouldRaiseException() { $this->expectException(ValidatorException::class); Validator::alphaNumeric('_')->length(1, 15)->noWhitespace()->assert('invalid username'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testinternalRateOfReturnException2()\n\t{\n\t\t$this->expectException(Exception::class);\n\t\tMath_Finance::internalRateOfReturn(array(70000, 12000, 15000, 18000, 21000));\n\t}", "public function testErrorHandling()\n\t{\n\t\tR::nuke();\n\t\tR::store( R::dispense( 'book' ) );\n\t\tR::freeze( FALSE );\n\...
[ "0.6820131", "0.67768663", "0.6766147", "0.67593277", "0.6757242", "0.67557573", "0.6585012", "0.65822196", "0.657971", "0.64814454", "0.64608073", "0.6443251", "0.6433486", "0.64041495", "0.6399382", "0.63974535", "0.63873833", "0.63611245", "0.63611245", "0.6341694", "0.633...
0.0
-1
Display a listing of the resource.
public function getIndex() { //获取所有的数据 // $res =DB::table('user')->get(); //获取单条数据 // $res =DB::table('user')->where('uid','=','2')->first(); //插入数据 // $res =DB::table('user')->insert([ // 'username'=>'lijian' // ]); //更新数据 // $res ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Display a listing of the resource.
public function index(Request $request) { $nombre = $request->user()->name; $coordi = DB::table('coordinador')->where('nombre',$nombre)->first(); $carreras = DB::table('carreras')->where('state','1')->get(); return view('admin/agregar_carrera_admin', compact('carreras','coordi')); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $carrera = new Carreras(); $carrera->id = $request->input('clave'); $carrera->nombre = $request->input('nombre'); $carrera->save(); return redirect(action('CarrerasController@index'))->with('success','Carrea creada exitosamente'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit(Request $request) { $id = $request->input('clave'); $carrera = Carreras::whereId($id)->firstOrFail(); $carrera->id = $request->input('clave'); $carrera->nombre = $request->input('nombre'); $carrera->save(); return redirect(action('CarrerasContro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Insertar los videos ya vostos
public function insertReproduccion(){ $query = "INSERT INTO reproduccion (videoVisto, Usuario_codUsuario, Video_codVideo) VALUES (true, ".parent::string($this->getUsuario_codUsuario()).", ".parent::string($this->getVideo_codVideo()).");"; $result = mysqli_query(parent::conexion(), $query); if($result)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n \\DB::table('videos')->insert(array(\n 'name' => \"Video 1\",\n 'url' => \"http://localhost/geometryapi/public/files/Credenciales Digitales Geometry Global Colombia.mp4\",\n ));\n \\DB::table('videos')->insert(array(\n 'name' => ...
[ "0.6879314", "0.6626046", "0.6540052", "0.6482503", "0.6312326", "0.6234024", "0.6233246", "0.6205327", "0.62025154", "0.6143599", "0.6131805", "0.61113507", "0.610103", "0.6074896", "0.6051232", "0.6024688", "0.60225195", "0.6011578", "0.6010721", "0.59870297", "0.5982311", ...
0.0
-1
Comprobar si ya existe existe la reproduccion de video con usuario
public function comprobarReproduccion(){ $query = "SELECT COUNT(*) AS existe FROM reproduccion WHERE Usuario_codUsuario = ".parent::string($this->getUsuario_codUsuario())." AND Video_codVideo = ".parent::string($this->getVideo_codVideo()).";"; $result = mysqli_query(parent::conexion(), $query); if($re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasVideo() {}", "function comprobar_si_existe_ya_video_lse_acepcion($id_palabra) {\n\t\t$query = \"SELECT palabra_imagen.*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,im...
[ "0.6682125", "0.60557985", "0.59236294", "0.58717525", "0.58493084", "0.5775372", "0.5751489", "0.5747257", "0.5722758", "0.5552585", "0.55412745", "0.5498349", "0.5433884", "0.54167235", "0.54151773", "0.53951454", "0.53884536", "0.5380844", "0.5372399", "0.53534067", "0.534...
0.6268705
1
Cargas las reproducciones cargadas en base al id del usuario
public function cargarVideosYaVistos(){ $query = "SELECT Video_codVideo FROM reproduccion WHERE Usuario_codUsuario = ".parent::string($this->getUsuario_codUsuario())." ORDER BY Video_codVideo ASC;"; $result = mysqli_query(parent::conexion(), $query); $arreglo = null; if(!$result){ die...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function consultar_usuario_por_id() {\n\n if (is_numeric($this->referencia_a_buscar)) {\n $id_a_buscar = intval($this->referencia_a_buscar);\n $sentencia = \"select id,nombrecompleto ,correo,token from usuario u where u.id= {$id_a_buscar};\";\n $this->respuesta = $th...
[ "0.5825038", "0.57198113", "0.5691479", "0.56822336", "0.5675066", "0.55764306", "0.5572753", "0.55459803", "0.5541851", "0.55253863", "0.55000377", "0.54976654", "0.5490647", "0.546465", "0.5454428", "0.54462576", "0.5430842", "0.5428828", "0.54269904", "0.5416816", "0.54153...
0.0
-1
Run the migrations. s
public function up() { Schema::create('projects', function (Blueprint $table) { $table->increments('id')->unsigned(); $table->integer('created_by')->unsigned(); $table->string('code'); $table->string('name'); $table->integer('status')->unsigned(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function migrate()\n {\n\n // If there is not a declaration that migrations have been run'd\n if( ! isset($GLOBALS['migrated_test_database']))\n {\n // Run migrations\n require path('sys').'cli/dependencies'.EXT;\n\n $which_db = \\Config::get('...
[ "0.69315296", "0.69084895", "0.6746124", "0.673231", "0.67109936", "0.66935515", "0.6673207", "0.66370326", "0.6618804", "0.661742", "0.6605316", "0.65605783", "0.65578973", "0.65321714", "0.6513112", "0.6507098", "0.6482512", "0.6465836", "0.6436942", "0.6404248", "0.6400211...
0.0
-1
/ this is to be retrieved by implementation (hosting customer) when SaaS public $menu = array( array('label'=>'Home', 'url'=>array('supplier/routes')), ); Used to retrieve the users with granted access to this controller's actions.
public function getValidUsers() { $result = array(); $logins = Login::model()->findAll("LoginRoleId=:role OR LoginRoleId=:admin OR LoginRoleId=:sadmin", array(":role"=>LoginRole::SUPPLIER, ':admin' => LoginRole::ADMINISTRATOR, ":sadmin" => LoginRole::SUPER_ADMIN)); foreac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMenuItems() {\n\n $url = $this->urlHelper;\n $items = [];\n\n //Links Visible always to everyone logged in or not.\n //default Home page - no login required. \n\n /* $items[] = [\n 'id' => 'home',\n 'label' => 'Home',\n 'link' => $url...
[ "0.69153506", "0.6757936", "0.6752253", "0.6637171", "0.6478192", "0.6414114", "0.63979673", "0.6364151", "0.6362905", "0.6362905", "0.6362905", "0.63623935", "0.63623136", "0.63623136", "0.63518006", "0.6347403", "0.6346227", "0.6340928", "0.6335682", "0.6316333", "0.6307121...
0.0
-1
Fill Backup Option in delete
public function fillForm(array $data, SimpleElement $element = null) { $mapping = $this->dataMapping($data); $this->_fill($mapping, $element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_backup(){\n\t\t$file = $this->pfh->FolderPath('backup', 'eqdkp').$this->in->get('backups');\n\t\t$metafile = $this->pfh->FolderPath('backup/meta/', 'eqdkp').str_replace(substr($this->in->get('backups'), strpos($this->in->get('backups'), '.')), \"\", $this->in->get('backups')).'.meta.php';\n\...
[ "0.6767327", "0.6604233", "0.6200085", "0.61515266", "0.6100696", "0.6095625", "0.60843015", "0.605026", "0.59537905", "0.58624715", "0.58305544", "0.58263695", "0.5792715", "0.57247156", "0.5703343", "0.5700802", "0.5677226", "0.5662525", "0.5660134", "0.56213355", "0.560038...
0.0
-1
Constructor of an sfImageReflection transformation
public function __construct($reflection_height=20, $start_transparency=30) { $this->setReflectionHeight($reflection_height); $this->setStartTransparency($start_transparency); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transform(sfImage $image)\r\n {\r\n\r\n // Get the actual image resource\r\n $resource = $image->getAdapter()->getHolder();\r\n\r\n //get the resource dimentions\r\n $width = $image->getWidth();\r\n $height = $image->getHeight();\r\n\r\n $reflection = $image->copy();\r\n\r\n $...
[ "0.65810734", "0.5751777", "0.56694704", "0.5645388", "0.5523482", "0.5435533", "0.5394683", "0.53942305", "0.53505343", "0.53191453", "0.5273299", "0.52680194", "0.5261706", "0.5187083", "0.5161405", "0.5161405", "0.5158899", "0.5125734", "0.51200116", "0.5053963", "0.505115...
0.5440203
5
Sets the reflection height
public function setReflectionHeight($reflection_height) { if (is_numeric($reflection_height)) { $this->reflection_height = (int)$reflection_height; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setHeight($height) {}", "public function setHeight($height);", "public function setHeight($height);", "function set_height($height) {\n $this->height = $height;\n }", "public function setHeight($height) {\n $this->h = $height;\n }", "public function setHeight($he...
[ "0.74369156", "0.72017986", "0.72017986", "0.7192791", "0.67549103", "0.66660833", "0.66660833", "0.6662472", "0.6655143", "0.6621353", "0.6537371", "0.6536875", "0.6398766", "0.6393899", "0.63867325", "0.63680416", "0.62719893", "0.62236655", "0.6198926", "0.6198861", "0.617...
0.71712685
4
Gets the reflection height
public function getReflectionHeight() { return $this->reflection_height; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHeight()\n {\n return $this->getProperty(\"Height\");\n }", "public function getHeight()\n {\n if (array_key_exists(\"height\", $this->_propDict)) {\n return $this->_propDict[\"height\"];\n } else {\n return null;\n }\n }", "publi...
[ "0.7776123", "0.765625", "0.7608425", "0.75245243", "0.7518394", "0.7516475", "0.7486375", "0.7486375", "0.7486375", "0.7486375", "0.7486375", "0.7486375", "0.7486375", "0.7486375", "0.7486375", "0.7486375", "0.74523824", "0.744277", "0.7417937", "0.73934263", "0.7363607", ...
0.903171
0
Sets the start transparency
public function setStartTransparency($start_transparency) { if (is_numeric($start_transparency)) { $this->start_transparency = (int)$start_transparency; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStartTransparency()\r\n {\r\n return $this->start_transparency;\r\n }", "protected function setTransparencyColor():void{\n\n\t\tif(!$this->options->imageTransparent){\n\t\t\treturn;\n\t\t}\n\n\t\t$transparencyColor = $this->background;\n\n\t\tif($this::moduleValueIsValid($this->options->t...
[ "0.7295902", "0.69557166", "0.6845795", "0.63296485", "0.59367144", "0.5861437", "0.5700456", "0.5630525", "0.5604222", "0.5500081", "0.54913753", "0.54913753", "0.5425511", "0.5393143", "0.53355974", "0.5273752", "0.5170394", "0.51665926", "0.51208997", "0.5081462", "0.50782...
0.73084086
0
Gets the start transparency
public function getStartTransparency() { return $this->start_transparency; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setStartTransparency($start_transparency)\r\n {\r\n if (is_numeric($start_transparency))\r\n {\r\n $this->start_transparency = (int)$start_transparency;\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "public function getOpacity() {}", "private function getAlpha() {...
[ "0.6580756", "0.6454634", "0.59673285", "0.5934663", "0.5894233", "0.58935803", "0.58935803", "0.58386916", "0.5805726", "0.5793521", "0.57534885", "0.57283217", "0.5726788", "0.5726788", "0.5707437", "0.5650272", "0.5600017", "0.54338074", "0.5424237", "0.5408973", "0.540218...
0.91026735
0
Apply the opacity transformation to the sfImage object
public function transform(sfImage $image) { // Get the actual image resource $resource = $image->getAdapter()->getHolder(); //get the resource dimentions $width = $image->getWidth(); $height = $image->getHeight(); $reflection = $image->copy(); $reflection->flip()->resize($w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function transform(sfImage $image)\r\n {\r\n $new_img = $image->getAdapter()->getTransparentImage($image->getWidth(), $image->getHeight());\r\n\r\n imagealphablending($new_img, false);\r\n imagesavealpha($new_img, true);\r\n\r\n $opacity = (int)round(127-((127/100)*$this->getOpacity()));\r\...
[ "0.75872093", "0.59292674", "0.5822969", "0.5822969", "0.5822969", "0.5822969", "0.5741829", "0.57286924", "0.5635671", "0.5533958", "0.5518543", "0.548572", "0.54534686", "0.5363476", "0.53465366", "0.52536803", "0.52138495", "0.5168737", "0.5166057", "0.5142587", "0.5133603...
0.6452402
1
Update child pages URLs
function updateChildPageUrls($id, $oldUrl, $newUrl) { $children = $this->children($id); if (!empty($children)) { foreach ($children as $page) { // Just resave, beforeSave does the magic $this->create($page); $this->save(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function company_addUrl() {\n $this->layout = \"ajax\";\n if (isset($_POST['child'])) {\n $child = $_POST['child'] + 1;\n $this->set('child', $child);\n }\n }", "public function onAfterWrite() {\n\n\t\tparent::onAfterWrite();\n\n\t\t// Determine whether the de...
[ "0.63975614", "0.63432276", "0.619601", "0.6061517", "0.6007782", "0.5872733", "0.5858648", "0.582612", "0.5810113", "0.577018", "0.5760534", "0.570477", "0.56791854", "0.56671816", "0.56643504", "0.5658041", "0.5611799", "0.55655754", "0.55655", "0.55655", "0.5555176", "0....
0.73686093
0
Mark a page(s) as a draft
function draft($ids) { if (!is_array($ids)) { $ids = array(intval($ids)); } $ids = join(', ', $ids); $this->query("UPDATE {$this->useTable} SET draft = 1 WHERE id IN ($ids)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAsDraft();", "public function isDraft();", "public function isDraft();", "public function isDraft();", "public function moveContentAndCopyDraftPage() {}", "public function createContentAndCopyDraftPage() {}", "public function draft_publish()\n\t{\n\t\t$where = array(\n\t\t\t'parent_e...
[ "0.73212045", "0.63144994", "0.63144994", "0.63144994", "0.6159477", "0.61202013", "0.60926974", "0.60233706", "0.60225785", "0.5997254", "0.59617937", "0.59500796", "0.58891255", "0.5865054", "0.5825467", "0.5787281", "0.56615436", "0.5652611", "0.55780053", "0.55590653", "0...
0.60022277
9
Find all pages ordered alphabetically
function findAllForSidebar($fields = array('id', 'title')) { return $this->findAll(null, $fields, "{$this->name}.title ASC", null, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPageNames()\n{\n $all = array_merge(getSinglepageNames(), getMultipageNames());\n uasort($all,'cmpByName');\n return $all;\n}", "function pageList(){\n\t\t$path = ROOT . DS . 'pages';\n\t\t$pagesArray = array_diff(scandir($path), array('..', '.', '.svn','.htaccess'));\n\n\t\tforeach ($pag...
[ "0.6904093", "0.64596665", "0.6014721", "0.5966445", "0.5941344", "0.587833", "0.58601964", "0.5849311", "0.58485967", "0.5835674", "0.58120817", "0.57708496", "0.5765892", "0.5759099", "0.5735826", "0.5709691", "0.5696208", "0.56101966", "0.5606863", "0.5590436", "0.5586214"...
0.0
-1
Return [title => url] pairs of children pages
function getChildrenForMenu($pageSlug) { $page = $this->findBySlug($pageSlug); $pages = $this->children($page[$this->name]['id']); if (empty($pages)) { return null; } $titles = Set::extract($pages, "{n}.{$this->name}.title"); $urls = Set::extract($pages, "{n}....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function children_of_parent_page($parent_title){\n $my_wp_query = new WP_Query();\n $all_wp_pages = $my_wp_query->query(array('post_type' => 'page', 'order' => 'ASC', 'orderby' => 'menu_order', 'posts_per_page' => -1));\n $parent_page = get_page_by_title($parent_title);\n $page_children = get_page_children($pa...
[ "0.6774894", "0.6751045", "0.65878326", "0.6485927", "0.6336978", "0.6332378", "0.63045114", "0.62785727", "0.6269282", "0.6233091", "0.62106895", "0.6143181", "0.6141816", "0.6137188", "0.61356294", "0.6126929", "0.61257195", "0.61252743", "0.6109096", "0.60968757", "0.60910...
0.6148176
11
Find possible parents of a page for select box
function getListThreaded($skipId = null, $alias = 'title') { $parentPages = $this->findAll(null, null, "{$this->name}.lft ASC", null, 1, 0); // Array for form::select $selectBoxData = array(); $skipLeft = false; $skipRight = false; if (empty($parentPages...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSelectableParents()\n {\n $roles = $this->all();\n $tree = $this->findChildren($roles, 0, 1);\n\n //recursively go trough the array and delete....\n\n $trimmed_tree = $this->removeTreeNode($tree, $this->id);\n return $trimmed_tree;\n\n\n\n\n }", "private funct...
[ "0.65439755", "0.64416367", "0.6376704", "0.6268239", "0.6172778", "0.6162202", "0.6142517", "0.6124593", "0.6118205", "0.6088184", "0.6065478", "0.6009062", "0.587701", "0.5870825", "0.58507276", "0.58234084", "0.57657063", "0.57542336", "0.5638678", "0.5595661", "0.557677",...
0.0
-1
Mark a page(s) as published
function publish($ids) { if (!is_array($ids)) { $ids = array(intval($ids)); } $ids = join(', ', $ids); $this->query("UPDATE {$this->useTable} SET draft = 0 WHERE id IN ($ids)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function has_published_pages()\n {\n }", "public function setPublished()\n\t{\n\t\t$this->published_at = $this->published_at ? $this->published_at : Carbon::now();\n\t\t$this->save();\n\t}", "public function setPublished( $published );", "public function setPublished($published);", "pu...
[ "0.71139246", "0.687771", "0.67618763", "0.6747875", "0.6747875", "0.6747875", "0.6747875", "0.6747875", "0.6747875", "0.6747875", "0.6747875", "0.6747875", "0.6747875", "0.6747875", "0.6667724", "0.6507065", "0.6504608", "0.6497351", "0.64960593", "0.6478948", "0.64309466", ...
0.0
-1
Search title and content fields
function search($query) { $query = Sanitize::escape($query); $fields = null; $titleResults = $this->find( 'all', array( 'conditions' => "{$this->name}.title LIKE '%$query%' and {$this->name}.draft=0", 'fields' => $fields ) ); $contentResults = array(); if (empty($titleResu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ccontent_search()\n\t{\n\t\t$post_data = linput_post();\n\t\t$table = llang_table('content');\n\t\t$cols = array('body', 'name');\n\t\t$keywords = $post_data['keywords'];\n\n\t\tif (strlen($keywords) >= 3)\n\t\t{\n\t\t\t$data['content'] = lcrud_search($table, $cols, $keywords, 'AND `published`=\\'1\\' ORD...
[ "0.72183716", "0.70303917", "0.67699736", "0.6767789", "0.6767789", "0.6734254", "0.67186576", "0.65807337", "0.65126055", "0.6484028", "0.64552015", "0.6444967", "0.6430597", "0.64257157", "0.63807803", "0.6352992", "0.6330596", "0.6320153", "0.63171023", "0.62858206", "0.62...
0.6775688
2
Return Global variables for use in templates.
static public function get_template_global_variables() { return array ( "FacebookConnectURL" => "connect_url", "FacebookLoginURL" => "login_url", "FacebookDisconnectURL" => "disconnect_url" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_template_global_variables()\n {\n return [\n 'FoxyStripe' => 'current_foxystripe_setting',\n ];\n }", "public static function get_template_global_variables()\n {\n return [\n 'TemplateConfig' => 'current_template_config',\n ];\...
[ "0.8152529", "0.814563", "0.7395513", "0.7395513", "0.7341268", "0.73349106", "0.7307145", "0.7288892", "0.72833073", "0.7258923", "0.7258572", "0.7245442", "0.7208314", "0.71917146", "0.714222", "0.7090933", "0.70851", "0.7043076", "0.69130445", "0.6877768", "0.6867696", "...
0.7806888
2
Returns a URL for logged in users to connect their Facebook accounts
static public function connect_url() { return Controller::join_links("facebook", "connect"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function login_url() {\n\t\t$facebook = FacebookApp::get()->first();\n\t\tif($facebook && $facebook->EnableFacebookLogin == 1)\n\t\t\treturn Controller::join_links(\"facebook\", \"login\");\n\t\treturn false;\n\t}", "public function getLoginURL(){\r\n\t\treturn $this->facebook_obj->getLoginURL($thi...
[ "0.76212835", "0.7248789", "0.7133725", "0.69577545", "0.6945127", "0.6885505", "0.6881639", "0.6876044", "0.68355554", "0.677314", "0.6623878", "0.65806276", "0.65580374", "0.65437037", "0.65159124", "0.6508603", "0.6496274", "0.6483534", "0.6470449", "0.63961726", "0.639305...
0.7928876
0
Returns a URL for users to login with their facebook accounts.
static public function login_url() { $facebook = FacebookApp::get()->first(); if($facebook && $facebook->EnableFacebookLogin == 1) return Controller::join_links("facebook", "login"); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function GetLoginURL()\n\t{\n\t\tinclude 'config.php';\n\t\t\n\t\t$params = array();\n\t\t$params['scope'] = $facebookSettings['scope'];\n\t\t$params['redirect_uri'] = $facebookSettings['loginRedirect'];\n\t\t\n\t\treturn self::GetFB()->getLoginUrl($params);\n\t}", "public function getLoginU...
[ "0.7643123", "0.75614494", "0.74745053", "0.733766", "0.7313974", "0.7090495", "0.7045158", "0.7040429", "0.6914003", "0.68349594", "0.6789818", "0.67384154", "0.6703494", "0.66237485", "0.6601222", "0.6591256", "0.6576827", "0.6573013", "0.65680456", "0.6565774", "0.65538615...
0.7957775
0
Return a URL to allow users to disassociate their Facebook accounts.
static public function disconnect_url() { return Controller::join_links("facebook", "disconnect"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLogoutURL(){\r\n\t\treturn $this->facebook_obj->getLogoutURL(array('next' => Config::$url));\r\n\t}", "public function get_log_out_URL(){\n\t\tif(isset($_SESSION[FB_ACCESS_TOKEN]))\n\t\t\treturn $this->facebookLogin->get_Facebook_Logout_URL();\n\t\telse\n\t\t\treturn LOGOUT_URL;\n\t}", "publ...
[ "0.65225893", "0.6388669", "0.636367", "0.63306195", "0.63095576", "0.62887615", "0.6283927", "0.6189685", "0.596363", "0.59509325", "0.5794324", "0.577498", "0.57664245", "0.5744816", "0.5740486", "0.57153845", "0.5695704", "0.5684772", "0.5667853", "0.5626614", "0.55863154"...
0.7648933
0
Setup a default Facebook app
public function requireDefaultRecords() { $facebook = FacebookApp::get()->count(); if(!$facebook) { $facebook = FacebookApp::create(); $facebook->write(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function facebookAppId()\r\n\t{\r\n\t\treturn Mage::getStoreConfig('ezfacebook/facebook/appid');\r\n\t}", "function facebook_instance()\r\n{\r\n\tglobal $settings;\r\n\t\r\n\treturn new Facebook(array(\r\n\t\t'appId' => $settings['facebook_app_id'],\r\n\t\t'secret' => $settings['facebook_app_secret'],\r\n...
[ "0.6366262", "0.6142396", "0.6097376", "0.60842925", "0.6034297", "0.591252", "0.5863162", "0.5761693", "0.57455254", "0.5712274", "0.5689433", "0.56876326", "0.5661608", "0.56552696", "0.5598725", "0.55864817", "0.5583034", "0.5568322", "0.55638903", "0.5550729", "0.55376476...
0.0
-1
Creates and returns an instance of Facebook if the Consumer key & secret are set.
public function getFacebook() { if($this->facebook) { return $this->facebook; } if($this->FacebookConsumerKey && $this->FacebookConsumerSecret) { return $this->facebook = new Facebook(array( "appId" => $this->FacebookConsumerKey, "secret" => $this->FacebookConsumerSecret )); } return false;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function facebook_instance()\r\n{\r\n\tglobal $settings;\r\n\t\r\n\treturn new Facebook(array(\r\n\t\t'appId' => $settings['facebook_app_id'],\r\n\t\t'secret' => $settings['facebook_app_secret'],\r\n\t));\r\n}", "public static function factory() \n {\n return new FacebookAuth();\n }", "function ge...
[ "0.792079", "0.78750944", "0.749932", "0.73303646", "0.6874606", "0.68550384", "0.6796952", "0.66617537", "0.6572197", "0.64454466", "0.6423624", "0.63234943", "0.632176", "0.62983805", "0.627861", "0.6223618", "0.6189025", "0.613789", "0.6135563", "0.6088896", "0.60311866", ...
0.7287245
4
Returns the parameters to pass to Facebook>getLoginUrl()
public function getLoginUrlParams() { return array( "scope" => array_values($this->config()->get("permissions")) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLoginURL(){\r\n\t\treturn $this->facebook_obj->getLoginURL($this->getParamsForLogin());\r\n\t}", "public function login_url()\n\t{\n\t\treturn $this->login_url = $this->_facebook->getLoginUrl(\n\t\t\tarray\n\t\t\t( \n\t\t\t\t'scope'\t\t\t=> $this->_config->get('scope'),\n\t\t\t\t'redirect_uri...
[ "0.79769963", "0.7607471", "0.76037455", "0.7530712", "0.74724346", "0.70852387", "0.70010793", "0.6886439", "0.6831059", "0.6826939", "0.6791701", "0.6791419", "0.6683526", "0.66791666", "0.6652469", "0.6631571", "0.6618973", "0.6601239", "0.6587395", "0.6542964", "0.653787"...
0.7768422
1
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.
protected function setUp() { $container = include 'config/container.php'; InsideConstruct::setContainer($container); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }", "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_conn...
[ "0.7594359", "0.71718794", "0.6927686", "0.6909226", "0.6890869", "0.6883452", "0.68154573", "0.6802897", "0.6753053", "0.67515224", "0.67450434", "0.6732158", "0.6713064", "0.6706926", "0.6701315", "0.6682986", "0.6682986", "0.6682986", "0.6682986", "0.6682986", "0.66785055"...
0.0
-1
Tears down the fixture, for example, closes a network connection. This method is called after a test is executed.
protected function tearDown() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tearDown(): void\n {\n parent::tearDown();\n\n Mockery::close();\n\n unset($this->faker, $this->waqi);\n }", "public function teardown()\n {\n //\n }", "protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test dat...
[ "0.7305884", "0.72363096", "0.72212136", "0.7186411", "0.7185969", "0.7147698", "0.7139477", "0.71342164", "0.71195495", "0.71028876", "0.70804775", "0.7078321", "0.7076728", "0.7052231", "0.7047989", "0.7032463", "0.70217025", "0.7014006", "0.7001004", "0.7000039", "0.699954...
0.0
-1
for the closing html / This function contructs the title of the specific view.
function __construct($title = "Default") { $this->_title = $title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function renderTitle()\n\t{\n\t\treturn '<h1 class=\"block-new-title\">' . $this->title . '</h1>';\n\t}", "protected function renderPageTitle() {}", "public function get_document_title_template()\n {\n }", "function _block_template_render_title_tag()\n {\n }", "public function r...
[ "0.6719923", "0.6619914", "0.6559236", "0.6539286", "0.65304154", "0.6517653", "0.64956313", "0.64174056", "0.6400705", "0.6400705", "0.63820285", "0.6362772", "0.6359092", "0.63445693", "0.6344505", "0.6344505", "0.6344505", "0.6344505", "0.6344505", "0.6344505", "0.6344505"...
0.0
-1
end construct / This function adds the requested html elements to the document head section.
function addHeadElement($include) { $this->_headSection .= $include . "\n"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildHeadMarkup(){\n\n echo file_get_contents(\"head/home.html\");\n\n $this->head_script_tags = \"\";\n\n foreach( $this->head_scripts as $value ){\n\n $this->head_script_tags .= \"<script src=\\\"\" . $value . \"\\\"></script>\";\n\n }\n\n $this->head ...
[ "0.72852397", "0.7087167", "0.69024575", "0.6890113", "0.6826593", "0.6809671", "0.67863977", "0.6750602", "0.6749531", "0.6738786", "0.6718956", "0.6712248", "0.67097646", "0.67047036", "0.6683756", "0.66802967", "0.6651625", "0.6630208", "0.66138643", "0.6593981", "0.658886...
0.6377587
30
end function addHeadElement Top HTML Header Section / This function creates the top html or beginning html code
function finalizeTopHTML() { $returnVal = ""; $returnVal .= "<!doctype html>\n"; $returnVal .= "<html lang=\"en\">\n"; $returnVal .= "<head><title>"; $returnVal .= $this->_title; $returnVal .= "</title>\n"; $returnVal .= $this->_headSection; $returnVal .= "</head>\n"; $returnVal .= "<body>\n"; $ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function displayHeader(){\n\t\t\t$html = '<!doctype html>'.\"\\n\";\n\t\t\t$html .= '<!--[if LT IE 9]>'.\"\\n\";\n\t\t\t$html .= '<html class=\"ie\">'.\"\\n\";\n\t\t\t$html .= '<![endIF]-->'.\"\\n\";\n\t\t\t$html .= '<!--[if !IE]><!-->'.\"\\n\";\n\t\t\t$html .= '<html>'.\"\\n\";\n\t\t\t$html .= '<!--<![end...
[ "0.74177355", "0.72927105", "0.7132003", "0.7017262", "0.69321734", "0.6894451", "0.6887539", "0.6865145", "0.68378186", "0.68192357", "0.67524695", "0.67443466", "0.6742606", "0.6737936", "0.6710304", "0.6696011", "0.668724", "0.6662437", "0.6650457", "0.66434157", "0.664154...
0.7201959
2
end finalizeTopHTML / This function returns the top html to the calling class.
function getTopHTML() { return $this->_topHTML; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function finalizeTopHTML() {\n\t\t$returnVal = \"\";\n\t\t$returnVal .= \"<!doctype html>\\n\";\n\t\t$returnVal .= \"<html lang=\\\"en\\\">\\n\";\n\t\t$returnVal .= \"<head><title>\";\n\t\t$returnVal .= $this->_title;\n\t\t$returnVal .= \"</title>\\n\";\n\t\t$returnVal .= $this->_headSection; \n\t\t$returnVal .= \...
[ "0.8472016", "0.72416776", "0.6745781", "0.6709954", "0.64838374", "0.6476084", "0.64143443", "0.6407887", "0.63638717", "0.63367194", "0.6308927", "0.6270594", "0.6219036", "0.62119126", "0.6158142", "0.61194694", "0.6046438", "0.6023109", "0.6018311", "0.60080636", "0.60080...
0.77454543
1
end getTopHTML Bottom HTML Section /This function creates the bottom html or ending html code
function finalizeBottomHTML() { $returnVal = ""; $returnVal .= "</div>\n"; // Closes Container $returnVal .= "</body>\n"; $returnVal .= "</html>\n"; $this->_bottomHTML = $returnVal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Get_Standard_Bottom_Section_HTML()\n {\n $HTML = \"\";\n //$HTML .= Get_File_Contents(\"static_html/stfc_footer.html\");\n $HTML .= \"</div>\";\n // empty div so that page container is\n // correct size\n\n // end page container\n $HTML .= \"</div>\";\n ...
[ "0.76424545", "0.73680514", "0.6993539", "0.698574", "0.69126433", "0.68041354", "0.6747653", "0.666309", "0.66619563", "0.6633017", "0.6595982", "0.6534183", "0.64448845", "0.64385897", "0.63487357", "0.6338072", "0.62932634", "0.62653387", "0.6229789", "0.616888", "0.616410...
0.75811625
1
end function finalizeBottomSection /This function returns the bottom html to the calling class.
function getBottomHTML() { return $this->_bottomHTML; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function finalizeBottomHTML() {\n\t\t$returnVal = \"\";\n\t\t$returnVal .= \"</div>\\n\"; // Closes Container\n\t\t$returnVal .= \"</body>\\n\";\n\t\t$returnVal .= \"</html>\\n\";\n\t\t$this->_bottomHTML = $returnVal;\n\t}", "function Get_Standard_Bottom_Section_HTML()\n {\n $HTML = \"\";\n //$H...
[ "0.7810672", "0.7465339", "0.68236285", "0.68000805", "0.6791196", "0.6768468", "0.6768468", "0.66753477", "0.6667897", "0.6667897", "0.6616711", "0.6610576", "0.6576755", "0.64742893", "0.6421377", "0.6394567", "0.6334091", "0.6321777", "0.6285799", "0.6284416", "0.62712497"...
0.7639022
1
Initialize the categories form
public function initialize($entity = null, $send_to) { if (!is_null($entity)) { $this->view->data = $entity->getData(); } $this->view->form_action = $send_to; $this->view->parent_categories = $this->getParentCategories(); $this->view->pick("categories/form"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\n {\n $config = new Zend_Config_Ini(\n APPLICATION_PATH . '/configs/forms/category.ini',\n 'category'\n );\n $this->setConfig($config->category);\n $this->_populateSelectWithCategories();\n $select = $this->getElement('preferentialC...
[ "0.7470447", "0.7234751", "0.70818573", "0.69539213", "0.68671346", "0.65911096", "0.658379", "0.65500045", "0.651963", "0.6511316", "0.64970934", "0.6457811", "0.644399", "0.6438342", "0.64102316", "0.64098185", "0.6397564", "0.6390939", "0.63762385", "0.63659465", "0.636339...
0.0
-1
Run the database seeds.
public function run() { factory(User::class, 10)->create()->each(function ($user) { $user->emails()->saveMany(factory(Email::class, 2)->make()); $user->phones()->saveMany(factory(Phone::class, 2)->make()); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Constructor use to get connected to server and selecting database
function __construct(){ $con = mysql_connect(HOSTNAME,USERNAME,PASSWORD); if(!$con){ $response['error'] = 1; $response['response']['error'] ='unable to connect to server'; echo json_encode($response); die; } if($con){ $rec = mysql_select_db(DBNAME,$con); if(!$rec){ $response['...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $gl_config = Tools::getConfig();\n\n\n $this->_server = $gl_config['database_master']['params']['host'];\n $this->_user = $gl_config['database_master']['params']['username'];\n $this->_password = $gl_config['database_master']['params']['password'];\n ...
[ "0.78863835", "0.773024", "0.76730525", "0.7642769", "0.76376104", "0.76265347", "0.76168025", "0.76142603", "0.7609701", "0.75906605", "0.75386673", "0.75238657", "0.75219053", "0.7510426", "0.7488682", "0.7488682", "0.7486154", "0.74787134", "0.7470428", "0.74667263", "0.74...
0.0
-1
function is used to set the query and will return the resource identifier
function query($query){ if($query){ $result = mysql_query($query); return $result; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queryId( $query, $type='f' )\n\t{\n\t\treturn $type.\"_\".MANUFACTURER_ID.\"_\".crc32 ( $query );\n\t}", "protected function getIdQuery()\n {\n return $this->idQuery;\n }", "public function getResourceID()\n {\n return $this->get('ResourceID');\n }", "public function getRes...
[ "0.61131465", "0.58975387", "0.58565223", "0.58565223", "0.58557063", "0.58557063", "0.5791263", "0.57820714", "0.57602996", "0.57602996", "0.574147", "0.57366544", "0.5694592", "0.56921256", "0.5669476", "0.56639874", "0.5659127", "0.56484735", "0.56422174", "0.56422174", "0...
0.0
-1
function is used to set and get the password
function setPassword($password){ $password = base64_encode($password); $salt5 = mt_rand(10000,99999); $salt3 = mt_rand(100,999); $salt1 = mt_rand(0,25); $letter1 = range("a","z"); $salt2 = mt_rand(0,25); $letter2 = range("A","Z"); $password = base64_encode($letter2[$salt2].$salt5.$letter1[$salt1].$p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPassword(){\n\n}", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword()...
[ "0.8498597", "0.84889394", "0.84889394", "0.84889394", "0.84889394", "0.84889394", "0.84889394", "0.84889394", "0.847767", "0.8379514", "0.8256277", "0.82170206", "0.82170206", "0.82170206", "0.82170206", "0.82170206", "0.82170206", "0.8089938", "0.8083054", "0.80457836", "0....
0.0
-1
function is used to register device Params required: first_name,lase_name,phone,email,user_name,password. return status, message and user_id
function userRegistration($data){ $response = array(); $requiredData['email'] = @trim($data->email); $requiredData['user_name'] = @trim($data->user_name); $requiredData['password'] = $this->setPassword(@trim($data->password)); foreach($requiredData AS $key=>$val){ if(trim($val) == ''){ $response['stat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registration(){\n\t\t\n\t\tif (($name = $this->input->get_post('name')) && ($emailId = $this->input->get_post('emailId')) && \n ($mobileNo = $this->input->get_post('mobileNo')) && ($password = $this->input->get_post('password')) && \n ($branchId...
[ "0.74560726", "0.7257391", "0.7234609", "0.7226053", "0.71596366", "0.7157977", "0.71506876", "0.710598", "0.7092913", "0.70532876", "0.69730145", "0.6960298", "0.6945626", "0.6927674", "0.6923858", "0.69100624", "0.689768", "0.6859483", "0.6847696", "0.68453395", "0.68403995...
0.70618844
9
function is used for User Confirmation Params required: action. return ???.
function userConfirmation($data){ $requiredData['action'] = $this->getPassword(@trim($data->action)); $user_name_id = explode("#/#",$requiredData['action']); $rec = $this->query("UPDATE `users` SET `status`=1 where `user_name` = '".@$user_name_id[0]."' AND `id`= ".@$user_name_id[1]); if($rec){ $url = HTTP_HO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function confirmAction() {\n if (Zend_Auth::getInstance()->hasIdentity())\n $this->_redirect($this->getUrl());\n\n $errors = array();\n\n $action = $this->getRequest()->getParam('a');\n\n switch ($action) {\n case 'email':\n $id = $this->getRe...
[ "0.6938741", "0.6871067", "0.68649226", "0.68606925", "0.6702972", "0.6686289", "0.6494769", "0.64932954", "0.64883083", "0.6452348", "0.6396363", "0.6393949", "0.637466", "0.6352716", "0.63022244", "0.6293017", "0.6269882", "0.62572324", "0.6246413", "0.62438107", "0.6239237...
0.6728388
4
function is used to check User exist or not By email Params required: email. return true or false. used within class.
function checkUserByEmail($email){ $rec = $this->query("SELECT `id` from `users` where `email` = '$email' AND `user_type` = '1'"); if($rec && mysql_num_rows($rec)>0){ //if user with the email got found return true; }else{ //if user with the email got not found return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function userExists($email) {\r\n\t\t\tif ($this->getUser($email) != false)\r\n\t\t\t\treturn true;\r\n\t\t\treturn false;\r\n\t\t}", "public function checkUserExist($email) {\n try {\n $result = User::model()->checkUserExist($email);\n return $result;\n } catch (Exception $ex...
[ "0.8646915", "0.82477397", "0.81878406", "0.8106403", "0.80828124", "0.8007472", "0.80041355", "0.7985071", "0.7973582", "0.79314417", "0.79310966", "0.7857776", "0.7855363", "0.78465116", "0.78439546", "0.7839178", "0.7838538", "0.78371876", "0.7826863", "0.7812455", "0.7810...
0.79360294
9
function is used to check User exist or not By UserName Params required: user_name. return true or false. used within class.
function checkUserByUserName($user_name){ $rec = $this->query("SELECT `id` from `users` where `user_name` = '$user_name' "); if($rec && mysql_num_rows($rec)>0){ //if user with the user_name got found return true; }else{ //if user with the user_name got not found return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function userExists( $user_name ) { return true;}", "public function userExists()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\n\t\t$users = self::getRawUsers('uname...
[ "0.8987246", "0.84156466", "0.811867", "0.8110338", "0.80471605", "0.7977374", "0.79446906", "0.7928968", "0.7926099", "0.79135585", "0.779491", "0.7770162", "0.76913923", "0.7670861", "0.7659823", "0.76480514", "0.7631853", "0.76238114", "0.76181686", "0.76115304", "0.757752...
0.8215185
2
function is used to check User exist or not By UserID Params required: user_id. return true or false. used within class.
function checkUserByUserID($user_id){ $rec = $this->query("SELECT * from `users` where `id` = ".$user_id); if($rec && mysql_num_rows($rec) == 1){ //if user with the user_name got found return $rec; }else{ //if user with the user_name got not found return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function user_exists() {\n\t\t$user = $this->search(\"(uid=\".$this->user.\")\");\n\t\treturn $user !== false;\n\t}", "function checkUserIdBL() {\n\t $isExisting = false;\n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t\t $isExisting = true;\n\t }\n\t return $isExistin...
[ "0.8153765", "0.81507945", "0.81420386", "0.8043655", "0.80211204", "0.7995807", "0.79812294", "0.78201056", "0.78151596", "0.7765341", "0.77622575", "0.77563715", "0.7737876", "0.770566", "0.76796275", "0.76281714", "0.7627959", "0.7605623", "0.7599155", "0.75728184", "0.755...
0.80534756
3
function is used to login Params required: user_name,password. return status, message and user_id
function userLogin($data){ //die($data); $response = array(); $requiredData['user_name'] = @trim($data->user_name); $requiredData['password'] = @trim($data->password); foreach($requiredData AS $key=>$val){ if(trim($val) == ''){ $response['status'] = 'Error'; $response['message'] = '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function userLogin(){\n\t\t\tif (isset($_POST['user_name']) && isset($_POST['password'])){\n\t\t\t\t$response = $this->model->getUser(\"*\", \"user_name = \".\"'\".$_POST['user_name'].\"'\");\n\t\t\t\t$response = $response[0];\n\t\t\t\t$user_rol = null;\n\t\t\t\t//The user is valid\n\t\t\t\tif ($response['p...
[ "0.79128355", "0.7779438", "0.7697035", "0.7689193", "0.76629335", "0.76427066", "0.76314116", "0.75956595", "0.75869507", "0.75869507", "0.7540176", "0.7522943", "0.75073534", "0.7459436", "0.74426806", "0.7440539", "0.7407491", "0.7403313", "0.73901427", "0.7375578", "0.736...
0.7570047
10
function is used to setplaces Params required: user_id,city,country,year,lat,long. return status, message
function addPlaces($data) { $response=array(); $requiredData['user_id'] = @trim($data->user_id); $requiredData['user_city']=@trim($data->user_city); $requiredData['user_country']=@trim($data->user_country); $requiredData['user_year']=@trim($data->user_year); $requiredData['us...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, $id)\n {\n //\n $user = JWTAuth::parseToken()->authenticate();\n $userId = $user->id;\n $GetUserType=User::where('id','=',$userId)->select('userType')->first();\n $userType=$GetUserType->userType; \n $toBeEdited=$id;\n if(...
[ "0.6179382", "0.61420256", "0.572364", "0.5721085", "0.57192254", "0.5703008", "0.56173295", "0.561422", "0.54750013", "0.5452578", "0.5443833", "0.54310584", "0.54150033", "0.5410679", "0.53732204", "0.53675807", "0.53476477", "0.5330172", "0.5327018", "0.5308758", "0.53019"...
0.6366761
0
Display a listing of summaries
public function index() { $summaries = Summary::all(); return View::make('summaries.index', compact('summaries')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function summaryAction()\n {\n // handle unfiltered collection\n $collection = $this->getCollection();\n return $this->toJson([\n 'numberOfTotalItems' => $collection->queryCount(),\n ]);\n }", "public function index()\n {\n // Create Summary for libra...
[ "0.72245854", "0.7125255", "0.6964007", "0.68833447", "0.67833734", "0.67833734", "0.67833734", "0.67470205", "0.66440135", "0.6590939", "0.6548849", "0.64934707", "0.6492391", "0.64636064", "0.64316684", "0.6407456", "0.63297063", "0.6318976", "0.6317237", "0.6315878", "0.63...
0.7588896
0
Show the form for creating a new summary
public function create() { return View::make('summaries.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "protected function addShowForm() \n {\n return view('dashboard.article.add');\n }", "public function addForm() {\n $this->view...
[ "0.6642981", "0.6596088", "0.65905017", "0.65787107", "0.652507", "0.6524237", "0.6498433", "0.6488183", "0.6470251", "0.6452301", "0.64511615", "0.64496976", "0.64374363", "0.64304864", "0.6414343", "0.6397362", "0.6390753", "0.63803744", "0.6378605", "0.63565904", "0.635539...
0.7400211
0
Store a newly created summary in storage.
public function store() { $validator = Validator::make($data = Input::all(), Summary::$rules); if ($validator->fails()) { return Redirect::back()->withErrors($validator)->withInput(); } Summary::create($data); return Redirect::route('summaries.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSummary(string $summary): void;", "public function store(Request $request)\n {\n $request->validate([\n 'evaluatorId'=>'required',\n 'remarks'=>'required',\n 'evaluationDate'=>'required',\n 'userTypeId'=>'required'\n ]);\n\n $...
[ "0.59264636", "0.5795525", "0.57839495", "0.57735044", "0.57464194", "0.57464194", "0.57464194", "0.5719892", "0.5719892", "0.5719892", "0.5719892", "0.5719892", "0.5719892", "0.5719892", "0.5719892", "0.5719892", "0.5719892", "0.5719892", "0.5719892", "0.5719892", "0.5719892...
0.69186705
0
Display the specified summary.
public function show($id) { $summary = Summary::findOrFail($id); return View::make('summaries.show', compact('summary')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display_summary() {\n // FIXME\n }", "public function summary();", "public function setSummary($summary)\n {\n $this->summary = $summary;\n }", "public function summary($summary = null)\n {\n if(null === $summary)\n {\n return $this->child('s...
[ "0.8169734", "0.718636", "0.71636087", "0.71013874", "0.69998616", "0.6787889", "0.6745351", "0.6673561", "0.6657333", "0.6606337", "0.65804404", "0.65731394", "0.65646315", "0.6556759", "0.65393704", "0.65329343", "0.653188", "0.65298164", "0.65181786", "0.65152246", "0.6467...
0.6099588
51
Show the form for editing the specified summary.
public function edit($id) { $summary = Summary::find($id); return View::make('summaries.edit', compact('summary')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(evaluationSummary $evaluationSummary)\n {\n //\n }", "private function showConfirmationForm( $summary, $undidRevision = 0 ) {\n\t\t$req = $this->getRequest();\n\n\t\t$args = array(\n\t\t\t'action' => 'submit',\n\t\t);\n\n\t\tif ( $req->getInt( 'undo' ) ) {\n\t\t\t$args[ 'undo' ]...
[ "0.71452236", "0.6981046", "0.68195707", "0.67479897", "0.6722708", "0.6716508", "0.662612", "0.64748806", "0.6457006", "0.6407958", "0.6406284", "0.6395663", "0.63723445", "0.6369635", "0.6303251", "0.628466", "0.624427", "0.6237623", "0.6236822", "0.62367845", "0.62367845",...
0.704775
1
Update the specified summary in storage.
public function update($id) { $summary = Summary::findOrFail($id); $validator = Validator::make($data = Input::all(), Summary::$rules); if ($validator->fails()) { return Redirect::back()->withErrors($validator)->withInput(); } $summary->update($data); return Redirect::route('summaries.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSummary(string $summary): void;", "public function setSummary($summary)\n {\n $this->summary = $summary;\n }", "function update_summary() {\n\tinclude 'get_data.php';\n\t//find the relevant info from db_data.json and store it in summary.json\n\tinclude 'summary_data.php';\n}", ...
[ "0.63005435", "0.60593593", "0.60291433", "0.6005186", "0.5889169", "0.5719127", "0.56831247", "0.5624298", "0.54238397", "0.5396803", "0.523858", "0.52265847", "0.5226203", "0.5152949", "0.51264477", "0.5117411", "0.5073", "0.5053286", "0.5051876", "0.5047366", "0.50387645",...
0.5652784
7
Remove the specified summary from storage.
public function destroy($id) { Summary::destroy($id); return Redirect::route('summaries.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(evaluationSummary $evaluationSummary)\n {\n //\n }", "public function setSummary(string $summary): void;", "public function delMetadata() {}", "public function delMetadata() {}", "public function delMetadata() {}", "public function delete()\n {\n $sql = \"DE...
[ "0.6238651", "0.54819953", "0.54771644", "0.54771644", "0.54771644", "0.53807324", "0.5191973", "0.5167672", "0.5148113", "0.5148113", "0.5148113", "0.5148113", "0.5142891", "0.51358014", "0.50743943", "0.5059085", "0.5040985", "0.50153977", "0.5014402", "0.4990574", "0.49804...
0.55613863
1
Method for getting the name of the bean Is called for breadcrumb generation
public static function getLabels() { return [ 'singular' => 'Website', 'multiple' => 'Websites' ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBeanClassName(): string;", "protected function getName()\r\n {\r\n return app::values()->page();\r\n }", "public function getBeanClassName(): string\n {\n return $this->namingStrategy->getBeanClassName($this->foreignKey->getLocalTableName());\n }", "public functio...
[ "0.6848594", "0.67197895", "0.6530931", "0.64841455", "0.6447056", "0.64437115", "0.6440642", "0.64387894", "0.64387894", "0.64387894", "0.6413379", "0.63964915", "0.6387177", "0.6369975", "0.6347376", "0.6347287", "0.6330126", "0.630594", "0.6288674", "0.6279255", "0.6249693...
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }"...
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.789145...
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }"...
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.789145...
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'x_axis' => [ 'required', 'numeric', ], 'y_axis' => [ 'required', 'numeric', ], 'z_axis' => [ 'required', 'numeric', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the sche...
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.76830...
0.0
-1
Rotate the image with Image Magick.
private function rotate_imagick($imagePath, $orientation) { $imagick = new Imagick($imagePath); $imagick->setImageOrientation(imagick::ORIENTATION_TOPLEFT); $deg = 0; switch ($orientation) { case 2: $deg = 180; $imagick->flipImage(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autoRotateImage($image) {\n $orientation = $image->getImageOrientation();\n\n switch($orientation) {\n case imagick::ORIENTATION_BOTTOMRIGHT:\n $image->rotateimage(\"#000\", 180); // rotate 180 degrees\n break;\n\n case imagick::ORIENTATION_RIGHTTOP:\n ...
[ "0.7323277", "0.7013823", "0.6971205", "0.68941", "0.6790373", "0.66628873", "0.6656036", "0.65954405", "0.6588603", "0.6568754", "0.65577924", "0.65132767", "0.65132767", "0.6474326", "0.6440907", "0.6429413", "0.6409457", "0.6399886", "0.6396504", "0.6395086", "0.6337945", ...
0.67551154
5
Rotate the gif with GD.
private function rotate_gif_with_gd($path, $orientation) { $image = $this->rotate_gd(imagecreatefromgif($path), $orientation); imagegif($image, $path, 100); imagedestroy($image); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RotatedImage($file,$x,$y,$w,$h,$angle)\n{\n $this->Rotate($angle,$x,$y);\n $this->Image($file,$x,$y,$w,$h);\n $this->Rotate(0);\n}", "public function image_rotate_gd()\n\t{\n\t\t// Create the image handle\n\t\tif ( ! ($src_img = $this->image_create_gd()))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\...
[ "0.65460527", "0.6533886", "0.6475705", "0.6451623", "0.64404666", "0.6186443", "0.6150605", "0.61073315", "0.608577", "0.608577", "0.6081208", "0.6020371", "0.6007515", "0.5999949", "0.5995706", "0.5992648", "0.59853005", "0.5984262", "0.59477067", "0.59476906", "0.592948", ...
0.684556
0
Rotate the jpg with GD.
private function rotate_jpg_with_gd($path, $orientation) { $image = $this->rotate_gd(imagecreatefromjpeg($path), $orientation); imagejpeg($image, $path, 100); imagedestroy($image); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function image_rotate_gd()\n\t{\n\t\t// Create the image handle\n\t\tif ( ! ($src_img = $this->image_create_gd()))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Set the background color\n\t\t// This won't work with transparent PNG files so we are\n\t\t// going to have to figure out how to determine the color...
[ "0.73732585", "0.73423475", "0.73134047", "0.7132019", "0.7039652", "0.703506", "0.701727", "0.69531566", "0.6896156", "0.67415434", "0.67370105", "0.66659", "0.66573334", "0.6621482", "0.65659106", "0.65589774", "0.65589774", "0.6542442", "0.65270835", "0.6525392", "0.648237...
0.65913707
14