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
Generated from protobuf field string definition = 7;
public function setDefinition($var) { GPBUtil::checkString($var, True); $this->definition = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefinition(): string {\n return \"`{$this->name}` {$this->type}\";\n }", "public function getDefinition()\n {\n return \"\";\n }", "function get_field_name( $str ){\n\t\treturn 'field-'.$this->id_base.'['.$this->number.']['.$str.']';\n\t}", "public function toString(...
[ "0.5623249", "0.5564602", "0.52095574", "0.5201477", "0.51185346", "0.5055083", "0.5047299", "0.503771", "0.50083566", "0.5005499", "0.4986761", "0.49650216", "0.49616835", "0.48984745", "0.48906916", "0.48851314", "0.48671302", "0.4865965", "0.48441464", "0.48306686", "0.482...
0.45682725
56
Delete hook by name
public function delete(HookName $name): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeHook(string $name)\n {\n foreach ($this->hooks as $idx => $hook)\n {\n if ( \\strcasecmp($name, $hook->getName())==0 ) {\n # Remove it\n unset( $this->hooks[$idx] );\n\n return $this;\n }\n }\n\n return $this;\n }", "static public function del($n...
[ "0.68087876", "0.68027836", "0.6635217", "0.6635217", "0.6486505", "0.6346596", "0.62922895", "0.62806505", "0.62806505", "0.62806505", "0.6188208", "0.6097205", "0.60942996", "0.6086043", "0.6073622", "0.60649055", "0.60649055", "0.60649055", "0.60649055", "0.60649055", "0.6...
0.79035133
0
Get hook information by name
public function get(HookName $name): Hook;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get($hook_name = '')\n {\n }", "protected function getHook($name, $hook)\n {\n if (isset($this->hooks[$name][$hook])) {\n return $this->hooks[$name][$hook];\n }\n return [];\n }", "public function getHookName(): string\n {\n r...
[ "0.73576957", "0.72153944", "0.6762951", "0.6481722", "0.64741415", "0.64688927", "0.63985234", "0.627197", "0.6227921", "0.6198603", "0.6155766", "0.61042845", "0.6062111", "0.5864664", "0.5838323", "0.5826888", "0.5819178", "0.5811547", "0.57937676", "0.5779008", "0.5755325...
0.786757
0
Get path to hooks storage
public function getHookPath(?string $name = null): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHooksDir(): string\n {\n return $this->dotGitDir . DIRECTORY_SEPARATOR . 'hooks';\n }", "public function getStoragePath(){\n return $this->storageEngine->getStoragePath();\n }", "function storage_path()\n {\n return base_path() . '/storage';\n }", "publi...
[ "0.6960539", "0.67930615", "0.67847514", "0.6598684", "0.6570017", "0.6570017", "0.6570017", "0.6570017", "0.6567734", "0.65210617", "0.64358497", "0.6354079", "0.6296733", "0.6214714", "0.6214714", "0.61545396", "0.6077186", "0.60617465", "0.6045778", "0.60280603", "0.599307...
0.6673023
3
You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to know how many of the stones you have are also jewels. The letters in J are guaranteed distinct, and all characters in J and S are letters. Letters...
function solution(string $J, string $S) { $j = str_split($J); $s = str_split($S); $count = 0; foreach ($j as $value) { foreach ($s as $value2) { if ($value2 == $value) { $count++; } } } return $count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numJewelsInStones($J,$S){\n $jArr = str_split($J,1);\n $jArr = array_flip($jArr);\n $len = strlen($S);\n $r = 0;\n for($i=0;$i<$len;$i++){\n $key = $S[$i];\n if(isset($jArr[$key])){\n $r++;\n }\n }\n return $r;\n}", "function countHoles ($MyStr) {\n\n $letters = array (\n 'A' => 1,...
[ "0.8363663", "0.64525783", "0.59968877", "0.59528756", "0.5738675", "0.57164925", "0.5613633", "0.55969685", "0.54650354", "0.54533035", "0.54512143", "0.54168", "0.53998494", "0.5293583", "0.52293843", "0.5193835", "0.51238114", "0.51110286", "0.5090293", "0.50630563", "0.50...
0.78812754
1
Get the validation rules that apply to the request.
public function rules() { switch($this->method()) { case 'POST': { return [ 'name' => 'required|min:5', 'telephone' => 'string|nullable', 'website' => 'url|nullable', 'address' => 'string|nullable', 'city' => 'string|nullable', ...
{ "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
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
Constructor method for AuthenticationToken
public function __construct($_loginId = NULL,$_password = NULL,$_licenseKey = NULL,$_accountNumber = NULL) { parent::__construct(array('loginId'=>$_loginId,'password'=>$_password,'licenseKey'=>$_licenseKey,'accountNumber'=>$_accountNumber),false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(public string $token)\n {\n }", "public function __construct($token) {\n parent::__construct();\n $this->token = $token;\n }", "public function __construct()\n {\n $this->user = JWTAuth::parseToken()->authenticate();\n }", "public function __construct($to...
[ "0.7537068", "0.75002354", "0.7450454", "0.7385433", "0.7367643", "0.7341946", "0.73283356", "0.73283356", "0.73283356", "0.73283356", "0.73081046", "0.73081046", "0.7065835", "0.7009088", "0.6977902", "0.6969666", "0.6965691", "0.69431466", "0.6904627", "0.69020635", "0.6897...
0.0
-1
Method called when an object has been exported with var_export() functions It allows to return an object instantiated with the values
public static function __set_state(array $_array,$_className = __CLASS__) { return parent::__set_state($_array,$_className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ExportObject() {\n // Init object\n $plugin = new stdClass();\n // Set values\n $plugin->Name = $this->Name;\n $plugin->Version = $this->Version;\n $plugin->Author = $this->Author;\n $plugin->About = $this->About;\n $plugin->Root = $this->Roo...
[ "0.6951545", "0.69232285", "0.65775573", "0.63780814", "0.61447084", "0.6124327", "0.60560846", "0.60397184", "0.5923654", "0.5923654", "0.5923654", "0.5923654", "0.5923654", "0.5859233", "0.5837315", "0.5812245", "0.5802086", "0.5717504", "0.57162964", "0.5712339", "0.569032...
0.0
-1
Method returning the class name
public function __toString() { return __CLASS__; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClassName();", "public function getClassName();", "public function getClassName() ;", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName()\n {\n ...
[ "0.87522393", "0.87522393", "0.8751158", "0.87397957", "0.87397957", "0.87397957", "0.87397957", "0.8731564", "0.8696754", "0.8673495", "0.8638432", "0.8615335", "0.8603119", "0.8566906", "0.8562364", "0.8555002", "0.85503733", "0.85503733", "0.85425884", "0.8533183", "0.8529...
0.0
-1
Login de un usuario
function login($usuario,$pass){ // Método 1: // $usuario = self::db()->quote($usuario); // $user=self::db()->query("select * from usuarios where usuario=$usuario")->fetch(PDO::FETCH_OBJ); // Método 2: $stmt=self::db()->prepare("select * from usuarios where usuario=:usuario"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function login();", "public function login();", "public function login() {\r\n if (!empty($_POST)) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n\r\...
[ "0.7972771", "0.7972771", "0.7824892", "0.77906007", "0.7779214", "0.7583868", "0.7567928", "0.75670606", "0.7543904", "0.7527368", "0.74974775", "0.74844915", "0.747464", "0.74619037", "0.7452251", "0.74468625", "0.74401844", "0.74401677", "0.7412535", "0.74102825", "0.74058...
0.0
-1
Sets the company code on the request
protected function _setCompanyCode($storeId=null) { $config = Mage::getSingleton('avatax/config'); $this->_request->setCompanyCode($config->getCompanyCode($storeId)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCompany($company_nid);", "public function getCompanyCode(){\n\t\t/* return company code */\n\t\treturn $this->_intCompanyCode;\n\t}", "protected function companyCode(){\n return config('company.code');\n }", "public function setCompany(string $company): void\n {\n $this...
[ "0.6824985", "0.67729676", "0.6754309", "0.6581373", "0.6404025", "0.6381465", "0.636396", "0.62928736", "0.60676354", "0.5912539", "0.58679897", "0.5866091", "0.58572286", "0.5841614", "0.5838126", "0.5838126", "0.58292735", "0.5819711", "0.5819711", "0.58068526", "0.5779159...
0.72817117
0
Sends a request to the Avatax server
protected function _send($storeId) { $config = Mage::getSingleton('avatax/config')->init($storeId); $connection = $config->getTaxConnection(); $result = null; $message = null; try { $result = $connection->getTax($this->_request); } catch(Exception $exception) { $message = $exception->getMessage(); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendRequest()\n\t\t{\n\t\t\t$stream = $this->getRequestStream();\n\t\t\t$stream->write( $this->getRequestString() );\n\t\t\t$stream->close();\n\t\t}", "public function request()\n {\n $this->setParams();\n\n $jsondata = json_encode($this->getData(), JSON_UNESCAPED_SLASHES);\n\n i...
[ "0.67841196", "0.6611842", "0.6598474", "0.64484686", "0.6354286", "0.63211995", "0.62487006", "0.6200312", "0.6057006", "0.60110354", "0.5979831", "0.5938756", "0.59122574", "0.59114504", "0.590221", "0.5899329", "0.5858882", "0.58583397", "0.576791", "0.5739436", "0.5715368...
0.0
-1
Adds additional transaction based data
protected function _addGeneralInfo($object) { $storeId = $object->getStoreId(); $this->_setCompanyCode($storeId); $this->_request->setDetailLevel(DetailLevel::$Document); $this->_request->setDocDate(date('Y-m-d')); $this->_request->setExemptionNo(''); $this->_request->setDiscount(0.00);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTransaction($data) {\n\n $import = $this->getPdo()->prepare(\"INSERT into Transaction (day, amount, name, account_id, category_id) VALUES ( :date, :amount, :name, :accountId, :categoryId )\");\n\n $import->execute(array(\n 'date' \t\t=> $data['date'],\n 'amount' \t...
[ "0.6877677", "0.68373334", "0.68190765", "0.6753844", "0.6666689", "0.66106004", "0.66040033", "0.65054077", "0.64266956", "0.63649374", "0.634392", "0.634392", "0.6239117", "0.6184395", "0.61705106", "0.6145838", "0.60797167", "0.6069154", "0.6061244", "0.6038127", "0.603716...
0.0
-1
Sets the customer info if available
protected function _addCustomer($object) { $format = Mage::getStoreConfig('tax/avatax/cust_code_format', $object->getStoreId()); $customer = Mage::getModel('customer/customer'); $customerCode = ''; if($object->getCustomerId()) { $customer->load($object->getCustomerId()); $taxClass = Mage::getModel('tax...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function select_customer() {\n $data = array();\n $customer_id = $this->input->post(\"customer\");\n\n if ($this->Customer->account_number_exists($customer_id)) {\n $customer_id = $this->Customer->customer_id_from_account_number($customer_id);\n }\n\n if ($this->Custom...
[ "0.6905321", "0.6870604", "0.66836905", "0.6630586", "0.6579301", "0.65119594", "0.6505587", "0.64687395", "0.64602566", "0.64214426", "0.64042366", "0.6400823", "0.6389692", "0.6386668", "0.63471854", "0.6262302", "0.6244591", "0.62252444", "0.6169727", "0.6167018", "0.61653...
0.5958564
39
Adds the orgin address to the request
protected function _setOriginAddress($store=null) { $country = Mage::getStoreConfig('shipping/origin/country_id', $store); $zip = Mage::getStoreConfig('shipping/origin/postcode', $store); $regionId = Mage::getStoreConfig('shipping/origin/region_id', $store); $state = Mage::getModel('directory/region')->load($re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_rewrite_endpoint($name, $places, $query_var = \\true)\n {\n }", "public function getXForwardedFor();", "public static function appendCustomAuthParams($request)\r\n {\r\n // TODO: Add your custom authentication here\r\n\t\t// The following properties are available to use\r\n\t\t// ...
[ "0.5244849", "0.49339786", "0.48759738", "0.4861124", "0.48173746", "0.48070815", "0.47894713", "0.473459", "0.4728076", "0.4725611", "0.47071716", "0.46815178", "0.4676219", "0.46611896", "0.46460056", "0.46135435", "0.46059147", "0.4588351", "0.45841473", "0.45628965", "0.4...
0.0
-1
Adds the shipping address to the request
protected function _setDestinationAddress($address) { //$shippingAddress = $quote->getShippingAddress(); //$street = $address->getStreet(); $street = array(); $street1 = isset($street[0]) ? $street[0] : null; $street2 = isset($street[1]) ? $street[1] : null; $city = $address->getCity(); $zip = preg_replac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setShippingAddressAction()\n {\n $data = $this->Request()->getParams();\n //we need to set this because of a bug in the shopware models\n if (!isset($data['stateId'])) {\n $data['stateId'] = 0;\n }\n\n /** @var Shopware\\Models\\Customer\\Customer $c...
[ "0.7252138", "0.7085798", "0.69010854", "0.68710345", "0.67875946", "0.6733391", "0.67072886", "0.6679804", "0.66745394", "0.6672871", "0.6592178", "0.65876204", "0.6569526", "0.65643245", "0.6559468", "0.64622283", "0.64406526", "0.64297533", "0.6396526", "0.63875866", "0.63...
0.5794981
74
Test to see if the product carries its own numbers or is calculated based on parent or children
public function isProductCalculated($item) { try { if($item->isChildrenCalculated() && !$item->getParentItem()) { return true; } if(!$item->isChildrenCalculated() && $item->getParentItem()) { return true; } } catch(Exception $e) { } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_on_sale() {\n\t\n\t\tif ( $this->has_child() ) :\n\t\t\n\t\t\t$onsale = false;\n\t\t\t\n\t\t\tforeach ($this->children as $child) :\n\t\t\t\tif ( isset($child->product->data['sale_price']) && $child->product->data['sale_price']==$child->product->price ) :\n\t\t\t\t\treturn true;\n\t\t\t\tendif;\n\t\t\t...
[ "0.64629644", "0.5895262", "0.5830275", "0.5750999", "0.5561958", "0.55195826", "0.54768384", "0.5463156", "0.5462959", "0.5350509", "0.5348159", "0.53278416", "0.52991056", "0.5298816", "0.5272486", "0.5272486", "0.5272486", "0.5272486", "0.5272486", "0.5258085", "0.522465",...
0.64571077
1
Adds a comment to order history. Method choosen based on Magento version.
protected function _addStatusHistoryComment($order, $comment) { if(method_exists($order, 'addStatusHistoryComment')) { $order->addStatusHistoryComment($comment)->save();; } elseif(method_exists($order, 'addStatusToHistory')) { $order->addStatusToHistory($order->getStatus(), $comment, false)->save();; } re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function comment($comment)\n {\n $this->comments[] = $comment;\n }", "abstract protected function add(Comment $comment);", "public function execute()\n {\n $order = $this->_initOrder();\n if ($order) {\n try {\n $data = $this->getRequest()->getPost...
[ "0.63199556", "0.6130298", "0.60438013", "0.5939917", "0.58713245", "0.576634", "0.5742722", "0.5741079", "0.5720515", "0.5720515", "0.5720515", "0.5720515", "0.5720515", "0.5720515", "0.57150096", "0.56724715", "0.5622693", "0.56175095", "0.5589398", "0.55749345", "0.5537774...
0.6569375
0
Register widget with WordPress.
function __construct() { parent::__construct( 'getresponse-widget', __( 'GetResponse Web Form', 'Gr_Integration' ), array( 'description' => __( 'Dispaly a GetResponse Web Form on your site.', 'Gr_Integration' ), ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_widget() {\n register_widget( 'WPP_Widget' );\n }", "function wpb_load_widget()\n{\n register_widget('wpb_widget');\n}", "function wpb_load_widget() {\n register_widget( 'wpb_widget' );\n}", "function wpb_load_widget() {\n register_widget( 'wpb_widget' );\n}", "f...
[ "0.8390025", "0.83101994", "0.82505625", "0.82505625", "0.82282835", "0.80624324", "0.79771596", "0.7901524", "0.7809308", "0.77684814", "0.77520776", "0.7727257", "0.7609239", "0.75666004", "0.75445676", "0.75443226", "0.7522003", "0.75196254", "0.75170845", "0.7512498", "0....
0.0
-1
Frontend display of widget.
public function widget( $args, $instance ) { $webform_id = $instance['select']; $variants_id = $instance['variants']; $style_id = $instance['style']; $center = $instance['center']; $center_margin = $instance['center_margin']; $version = $instance['version']; $web_forms = json_decode(get_option($this->GrO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render_widget() {\n\t\t$this->get_db_values();\n\t\tif ( wponion_is_callable( $this->option( 'callback' ) ) ) {\n\t\t\techo wponion_callback( $this->option( 'callback' ), array( $this->get_db_values(), $this ) );\n\t\t}\n\t}", "public function render_widget() {\n\n return Widget::render($t...
[ "0.7524064", "0.7413105", "0.7272697", "0.72208834", "0.7036302", "0.70204395", "0.7010869", "0.6995074", "0.683868", "0.68118656", "0.6790951", "0.67549556", "0.6734825", "0.6704948", "0.66814053", "0.6669506", "0.6665668", "0.6655077", "0.66512096", "0.6646191", "0.6637128"...
0.0
-1
Sanitize widget form values as they are saved.
public function update( $new_instance, $old_instance ) { $instance = array(); $instance['select'] = !empty($new_instance['select']) ? strip_tags($new_instance['select']) : null; $instance['variants'] = $new_instance['variants'] !== '-' ? strip_tags($new_instance['variants']) : null; $instance['style'] = strip_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sanitize()\n {\n parent::sanitize();\n\n foreach ($this->_cleanData as $key => $value) {\n $this->_cleanData[$key] = strip_tags($value);\n }\n }", "public function sanitize_input_fields()\n {\n }", "protected function sanitize() {}", "public...
[ "0.7181779", "0.7148718", "0.6940822", "0.68380964", "0.68105626", "0.664147", "0.6583722", "0.6505763", "0.64504373", "0.64504373", "0.6431753", "0.64263475", "0.64247", "0.63831073", "0.6376312", "0.62935954", "0.62705755", "0.6258476", "0.6255714", "0.6251819", "0.6230945"...
0.0
-1
PUBLIC Set date format for "minutes" file output
public static function setDateFormatMinutes() { self::$settings[0] = 'Y-m-d H:i:s'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function setFormat();", "public function dateTimeFormat();", "public static function setDateFormatMonth()\n {\n self::$settings[0] = 'Y-m';\n }", "function set_date_format ($date_format)\r\n {\r\n $_SESSION[\"date_format\"] = $date_format;\r\n }", "public functi...
[ "0.6238504", "0.5967557", "0.59593093", "0.5641609", "0.55545413", "0.55327445", "0.5517266", "0.5508308", "0.54306304", "0.5411498", "0.54016", "0.54016", "0.54016", "0.5387879", "0.5375522", "0.53324187", "0.5328571", "0.5327865", "0.53097457", "0.5291934", "0.5266202", "...
0.7238904
0
Set date format for "day" file output
public static function setDateFormatDay() { self::$settings[0] = 'Y-m-d'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function formatDate($date = null);", "public function dateTimeDefaultFormat($astep) {\r\n return ($astep <= 1) ?\r\n \"d/m/y\" : \"d/m/y\";\r\n }", "function set_date_format ($date_format)\r\n {\r\n $_SESSION[\"date_format\"] = $date_format;\r\n }", "public functi...
[ "0.6323084", "0.620864", "0.6169787", "0.61058915", "0.6031912", "0.598269", "0.5981413", "0.59437716", "0.59344715", "0.593169", "0.5909878", "0.58930355", "0.58328193", "0.57859284", "0.57304966", "0.5728", "0.57247776", "0.5719202", "0.5719202", "0.57098025", "0.5707863", ...
0.73532283
0
Set date format for "month" file output
public static function setDateFormatMonth() { self::$settings[0] = 'Y-m'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function monthFormat() {\n\t\tif (func_num_args()) {\n\t\t\t$this->_monthFormat = trim(func_get_arg(0));\n\t\t}\n\t\telse return $this->_monthFormat;\n\t}", "function set_date_format ($date_format)\r\n {\r\n $_SESSION[\"date_format\"] = $date_format;\r\n }", "public function format($format)\n {...
[ "0.6700176", "0.60218817", "0.5979629", "0.59673524", "0.5932227", "0.5884007", "0.5881708", "0.5863357", "0.58482254", "0.58474714", "0.582277", "0.581795", "0.5797204", "0.57677215", "0.5755361", "0.57449156", "0.5741313", "0.57356787", "0.5696618", "0.56556606", "0.5617476...
0.75792706
0
Set date format for output
public static function getDateFormat() { return self::$settings[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function formatDate($date = null);", "function carton_date_format() {\n\treturn apply_filters( 'carton_date_format', get_option( 'date_format' ) );\n}", "public function getDateFormat(){\n\t\t$this->_dateFormat = $date;\n\t}", "public function setDateFormat($value)\n\t{\n\t\t$this->setViewState('DateF...
[ "0.7418608", "0.72170687", "0.69547254", "0.6947656", "0.6903181", "0.68597245", "0.6841", "0.6836626", "0.6835623", "0.67824215", "0.6774161", "0.67707443", "0.67600024", "0.66217047", "0.6568642", "0.65624654", "0.6547455", "0.6547455", "0.65277505", "0.6509671", "0.6502453...
0.0
-1
Set timestamp offset to consider for output
public static function setTimestampOffset($value) { self::$settings[1] = +$value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setOffset($offset) {\n\t\t$this->_offset = 3600 * $offset;\n\t}", "public static function setTimeCorrectionOffset($offset = 0)\n\t{\n\t\tif ($offset == 0)\n\t\t{\n\t\t\t$rest = new S3Request('HEAD');\n\t\t\t$rest = $rest->getResponse();\n\t\t\t$awstime = $rest->headers['date'];\n\t\t\t$systime = time();...
[ "0.69863075", "0.6933939", "0.6656472", "0.64588314", "0.61438996", "0.60986936", "0.607311", "0.5939923", "0.59325695", "0.59277666", "0.5917974", "0.5884528", "0.58098793", "0.5803052", "0.57961464", "0.5787568", "0.577886", "0.5756603", "0.5752351", "0.5752351", "0.5618105...
0.70902646
0
Get timestamp offset to consider for output
public static function getTimestampOffset() { return self::$settings[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTimeOffset()\n {\n return $this->_props['TimeOffset'];\n }", "function getOffset(){\r\n $t=time()+microtime()-$this->api->start_time;\r\n $res=$t-$this->offset;\r\n $this->offset=$t;\r\n return $res;\r\n }", "function getOffset() {\n\t\treturn ((float) $this->_of...
[ "0.7591326", "0.72070146", "0.7070877", "0.7030504", "0.6814839", "0.6706907", "0.6685663", "0.66501784", "0.6498625", "0.6498625", "0.6498625", "0.6471507", "0.6450553", "0.64366716", "0.64347166", "0.6423658", "0.64154106", "0.63833", "0.6376252", "0.6307125", "0.62729055",...
0.7834279
0
Convert an timestamp into local time,
public static function localTimestamp($timestamp) { // Transfor to timestamp if required return date( 'Y-m-d H:i:s', self::asTimestamp($timestamp) + self::$settings[1] * 3600 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function utc2local($timestamp = null) {\n\t\tif(!$timestamp) {\n\t\t\t$timestamp = time();\n\t\t}\n\n\t\t$f3 = \\Base::instance();\n\n\t\tif($f3->exists(\"site.timeoffset\")) {\n\t\t\t$offset = $f3->get(\"site.timeoffset\");\n\t\t} else {\n\t\t\t$tz = $f3->get(\"site.timezone\");\n\t\t\t$dtzLocal = new \\DateTimeZ...
[ "0.7740931", "0.7464092", "0.7126095", "0.67731786", "0.64272344", "0.6325479", "0.6258044", "0.6254964", "0.6203448", "0.6131247", "0.6129367", "0.60866755", "0.589495", "0.5835377", "0.5804004", "0.578841", "0.57881343", "0.5764446", "0.5734318", "0.5728769", "0.5694262", ...
0.769866
1
Converts degree Fahrenheit to degree Celsius Source:
public static function convertFahrenheitToCelsius($value) { if (is_array($value)) { foreach ($value as $key=>$v) { $value[$key] = self::convertFahrenheitToCelsius($v); } } else { $value = ($value - 32) * 5 / 9; } return $value; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function convertFahrenheitToCelsius($tempF){\n\t\t$tempC = ($tempF - 32)*0.556;\n\t\treturn $tempC;\n\t}", "function f2c($tempValue)\r\n{\r\n\t$celsius=($tempValue-32)*(5/9);\r\n return round($celsius,2);\r\n}", "function f2c ($value){\n $celsius=($value-32)/9*5;\n retur...
[ "0.7410081", "0.73945624", "0.7288268", "0.7222563", "0.7169441", "0.69283265", "0.6915956", "0.6640113", "0.6631088", "0.65820247", "0.65173095", "0.64709014", "0.6454186", "0.64132935", "0.6314897", "0.6239329", "0.5943448", "0.5885289", "0.5848754", "0.58189905", "0.575183...
0.6792544
7
Convert datetime to timestamp if required
public static function asTimestamp($timestamp) { // Return numerics as is if (is_numeric($timestamp)) { return $timestamp; } // Convert datetime & return on success if (($ts = strtotime($timestamp)) !== false) { return $ts; } throw ne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function time_2_timestamp(&$time) {\r\n if ($time instanceof \\DateTime)\r\n $time = $time->getTimestamp();\r\n else\r\n $time = strtotime($time);\r\n}", "function convertTimestamp($ugly){\n $date = new DateTime($ugly);\n return $date->format('l, F jS, Y');\n}", "function convert_timestam...
[ "0.6994985", "0.68751204", "0.67336977", "0.667425", "0.6666232", "0.6470565", "0.64420027", "0.641171", "0.63390946", "0.6321646", "0.632027", "0.6305848", "0.6279379", "0.6246241", "0.62109846", "0.6209737", "0.62015337", "0.6196752", "0.6189135", "0.6167675", "0.6167675", ...
0.6131606
23
Display a listing of the resource.
public function index() { return Departments::all(); }
{ "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
Store a newly created resource in storage.
public function store(Request $request) { $request->validate([ 'department_name' => 'required' ]); return Departments::create($request->all()); }
{ "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
Update the specified resource in storage.
public function update(Request $request, $id) { $department = Departments::find($id); $department->update($request->all()); return $department; }
{ "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) { $delete = Departments::destroy($id); if ($delete) { return ['message' => 'department has been deleted successfully']; } else { return ['message' => 'Oops something went wrong']; } }
{ "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
This watchdog watches for cron ticks.
function tickWatchdog($depth = null) { $things = $this->getThings("cron"); if ($things == null) { $this->response .= "No ticks found. "; return true; } // // devstack. // $test = $thing->variables['test']; // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function cronMinute()\n {\n $timedRecords = $this->app['storage.event_processor.timed'];\n if ($timedRecords->isDuePublish()) {\n $this->notify('Publishing timed records');\n $timedRecords->publishTimedRecords();\n }\n if ($timedRecords->isDueHold()) {\n...
[ "0.65979344", "0.65530014", "0.64842916", "0.6410471", "0.64058197", "0.63764656", "0.6251501", "0.62430567", "0.61791646", "0.6152695", "0.6119657", "0.6107443", "0.60973734", "0.60618156", "0.60081786", "0.5946361", "0.59160054", "0.5901183", "0.58769846", "0.58727354", "0....
0.6699991
0
check if the email address is not set
function has_logged_in() { if( $this->session->userdata('usir_nim') ) { redirect('reminders'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _check_email_exists($email = ''){\n\t\t\n\t}", "public function hasEmailAddress()\n {\n return $this->_hasVar('user_email') && $this->_getVar('user_email');\n }", "public function emailEntryIsValid() {\r\n \r\n $email = $this->getEmail();\r\n \r\n if ...
[ "0.75649357", "0.7492721", "0.7437279", "0.74316293", "0.7108669", "0.70435894", "0.7004579", "0.69915247", "0.69817847", "0.69811004", "0.697054", "0.6948235", "0.69099367", "0.69015485", "0.68737847", "0.68706095", "0.6858958", "0.6852584", "0.68466246", "0.6830629", "0.680...
0.0
-1
Test that user not logged in can't visit the account profile page.
public function testVisitUserAccountProfilePageRedirectsToLogin() { $response = $this->call('GET', $this->accountProfilePageUrl); $response->assertRedirect('login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGuestNotAccessProfilePage()\n\t{\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\t}", "public function testMa...
[ "0.7759397", "0.75381947", "0.6942299", "0.6810553", "0.67139274", "0.6675969", "0.6601072", "0.6550491", "0.64657634", "0.6423427", "0.6423136", "0.64229345", "0.6413876", "0.6409626", "0.63627875", "0.63598245", "0.63513106", "0.6341972", "0.6333638", "0.6294066", "0.627086...
0.66978306
5
Test that a logged user can visit its account profile page.
public function testLoggedUserVisitAccountProfilePageOk($withUserMeta) { // Prepare $user = factory(User::class)->create([ 'name' => 'Mario', 'password' => bcrypt('123456'), 'can_login' => true, ]); if ($withUserMeta) { $userMeta = fac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user...
[ "0.7703105", "0.76862603", "0.7526517", "0.7506219", "0.74963754", "0.73833436", "0.72476393", "0.70179343", "0.6981847", "0.67047733", "0.6704037", "0.66967225", "0.6675425", "0.6596855", "0.65867704", "0.6520833", "0.6460878", "0.63976884", "0.6355461", "0.63335913", "0.627...
0.6456538
17
Test users can update their profiles.
public function testUpdateUserProfileOk($userData, $userMetadata, $userHasMetadata) { // Prepare /** @var User $user */ $user = factory(User::class)->create(); if ($userHasMetadata) { /** @var UserMeta $userMeta */ $userMeta = factory(UserMeta::class)->create...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProfileUpdateAll()\n {\n\n }", "public function test_user_edit_its_profile()\n {\n $user = factory(User::class)->create();\n\n $newProfession = factory(Profession::class)->create();\n\n //$this->actingAs($user);\n\n $response = $this->get('/perfil/');\n $response->assert...
[ "0.7830626", "0.73956645", "0.70280325", "0.7027531", "0.6968363", "0.6965224", "0.6961997", "0.6961828", "0.6867657", "0.6827248", "0.68127936", "0.6770621", "0.67602813", "0.67362744", "0.6692876", "0.66749215", "0.66616416", "0.6608596", "0.6600718", "0.6554914", "0.654789...
0.0
-1
Test validation error on profile update.
public function testUpdateUserProfileErrorValidations() { // Prepare $user = factory(User::class)->create(); $requestData = [ 'user' => [], 'usermeta' => [ 'twitter' => '@geekytheory', 'instagram' => 'geekytheory', 'fac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateValidProfile() : void {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new profile and update it in mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID...
[ "0.7288875", "0.6990703", "0.6946653", "0.6801551", "0.6751499", "0.67002904", "0.66921353", "0.6669946", "0.66324055", "0.6624186", "0.66074485", "0.6446012", "0.6445949", "0.6411381", "0.63535625", "0.6330519", "0.62504953", "0.6244715", "0.6243925", "0.6242274", "0.6236224...
0.7530587
0
Test that a nonlogged user can't update a profile.
public function testUpdateUserProfileErrorForbidden() { // Request $response = $this->call('POST', $this->accountProfilePostUrl, []); // Assert redirect to login $response->assertStatus(302); $response->assertRedirect('login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testManagerNotAccessProfileUser()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextPresent('You don\\'t have access to this section.');\n\t}", "public function testGues...
[ "0.7777229", "0.7260776", "0.70233315", "0.69894785", "0.6918899", "0.6726046", "0.67123973", "0.6670188", "0.66519797", "0.656386", "0.6521925", "0.6516324", "0.6498633", "0.6493491", "0.6485312", "0.6462092", "0.64052385", "0.63738525", "0.63450766", "0.63059175", "0.629501...
0.7421343
1
Test logged user can visit the account page to change the password.
public function testLoggedUserVisitsChangePasswordPageOk() { // Prepare $user = factory(User::class)->create(); // Request $response = $this->actingAs($user)->call('GET', $this->accountChangePasswordPageUrl); // Asserts $response->assertStatus(200); $respons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUserPassword() {\n\t\t// make new User and save it to the database\n\t\t$newPassword = Generate::hash();\n\n\t\t// change the User password\n\t\t$this->visit('/home')\n\t\t\t->click('#user-update-button')\n\t\t\t->seePageIs('/user/update')\n\t\t\t->click('Change Password')\n\t\t\t->seePageIs('/...
[ "0.78235793", "0.7722775", "0.75935626", "0.7270856", "0.7265933", "0.71615094", "0.71007156", "0.70509136", "0.6986568", "0.694256", "0.69261557", "0.689512", "0.6885558", "0.6871294", "0.6844385", "0.68216217", "0.6814565", "0.681415", "0.6812753", "0.6812753", "0.68124205"...
0.8191769
0
Test non logged user visits change password page and is redirected to login.
public function testNonLoggedUserVisitsChangePasswordPageRedirectsToLogin() { // Request $response = $this->call('GET', $this->accountChangePasswordPageUrl); // Asserts $response->assertStatus(302); $response->assertRedirect('login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testNonLoggedUserUpdatePasswordRedirectsToLogin()\n {\n $response = $this->call('POST', $this->accountChangePasswordPostUrl);\n\n // Asserts\n $response->assertStatus(302);\n $response->assertRedirect('login');\n }", "public function testLoggedUserVisitsChangePas...
[ "0.8130224", "0.76846206", "0.74548304", "0.7331636", "0.7075464", "0.7070842", "0.702937", "0.7026317", "0.69889915", "0.6943756", "0.69010633", "0.6864637", "0.68545234", "0.6849441", "0.6838149", "0.6819933", "0.6791801", "0.6738044", "0.67214483", "0.6685236", "0.6641869"...
0.85326576
0
Test update password ok.
public function testUpdatePasswordOk() { // Config $currentPassword = '123456789'; $newPassword = 'abcdef123456'; // Prepare $user = factory(User::class)->create([ 'password' => bcrypt($currentPassword), ]); $requestData = [ 'currentp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPasswordChange(): void\n {\n // Test strong password - should pass.\n $this->setUpUserPostData(Constants::SAFE_PASSWORD);\n $this->assertIsInt(\\edit_user($this->dummy_user_id));\n\n // Test weak password - should pass as well.\n $this->setUpUserPostData(Co...
[ "0.8264717", "0.8246426", "0.77617496", "0.7682547", "0.76659894", "0.76399857", "0.76286733", "0.7627595", "0.75964403", "0.7580876", "0.75775284", "0.7561588", "0.75533015", "0.7513989", "0.7501955", "0.7501955", "0.750077", "0.742609", "0.73942196", "0.73900354", "0.738808...
0.7896249
2
Test update password throws an error if the current one is incorrect.
public function testUpdatePasswordCurrentIsIncorrectError() { // Config $currentPassword = '123456789'; $newPassword = 'abcdef123456'; // Prepare $user = factory(User::class)->create([ 'password' => bcrypt($currentPassword), ]); $requestData = [ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdatePasswordNotGiven(): void { }", "public function testUpdatePasswordValidationError()\n {\n // Config\n $currentPassword = '123456789';\n $newPassword = '123';\n\n // Prepare\n $user = factory(User::class)->create([\n 'password' => bcrypt($...
[ "0.82564646", "0.79485625", "0.7762527", "0.77401745", "0.7594728", "0.7558566", "0.752568", "0.7524672", "0.7460376", "0.7403721", "0.7399635", "0.7377772", "0.73503923", "0.7348224", "0.7317573", "0.7250018", "0.7227501", "0.7166284", "0.71307653", "0.7129662", "0.7115438",...
0.7571848
5
Test update password with invalid data returns errors.
public function testUpdatePasswordValidationError() { // Config $currentPassword = '123456789'; $newPassword = '123'; // Prepare $user = factory(User::class)->create([ 'password' => bcrypt($currentPassword), ]); $requestData = [ 'curr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdatePasswordNotGiven(): void { }", "public function testInvalidConfirmPassword()\n\t{\n\t\t$this->validator->isPassword(self::USER1_PASSWORD, self::INVALID_PASSWORD);\n\t}", "public function test_users_update_long_password_error(){\n $this->signInUser();\n $this->user['password'...
[ "0.80951166", "0.7657526", "0.75642294", "0.7556839", "0.75410205", "0.74994135", "0.74828386", "0.727857", "0.7263414", "0.72617084", "0.7240414", "0.72130615", "0.72080964", "0.71844363", "0.7133836", "0.7106586", "0.7089023", "0.70880187", "0.70252365", "0.69993776", "0.69...
0.76093113
2
Test that a nonlogged user can't update a password.
public function testNonLoggedUserUpdatePasswordRedirectsToLogin() { $response = $this->call('POST', $this->accountChangePasswordPostUrl); // Asserts $response->assertStatus(302); $response->assertRedirect('login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdatePasswordNotGiven(): void { }", "public function testverifyIfPasswordIsNotSet()\n {\n $state=Database::findAdmin($this->db->getPdo(),\"\",\"cool\");\n $this->assertFalse($state);\n }", "public function testUserEditNonMatchingPasswords()\n {\n $this->browse(funct...
[ "0.7796244", "0.76890045", "0.764302", "0.7574587", "0.7435431", "0.7415566", "0.73423636", "0.7340406", "0.7256946", "0.72518325", "0.7232729", "0.7171286", "0.7167536", "0.7141771", "0.7140488", "0.7090425", "0.7072432", "0.7060646", "0.70548844", "0.7013561", "0.7008948", ...
0.7112312
15
iterator.php Require php 7.1
function dumpAll(iterable $items) { foreach ($items as $item) { var_dump($item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function iterator();", "public function getIterator() {}", "public function getIterator() {}", "abstract public function getIterator();", "public function getIterator(): Iterator {}", "public function getIterator();", "public function getIterator();", "public function getIterator();", "publi...
[ "0.72776145", "0.7210779", "0.7210779", "0.69972295", "0.6885342", "0.6885028", "0.6885028", "0.6885028", "0.6885028", "0.6885028", "0.6885028", "0.66760206", "0.65136063", "0.6434301", "0.6434301", "0.6361123", "0.63606405", "0.6359576", "0.6261085", "0.6191362", "0.60566735...
0.0
-1
Perform an installation using the given configuration
public function install(array $config, $configKey = 'config') { // Validate source if (!is_dir($this->source) && !file_exists($this->source)) { return "No valid source given : {$this->source} is neither a folder nor a zip file"; } // Do whatever it takes with the source ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function install() {}", "public function install();", "public function install();", "function install(){}", "public function install() {\n\n\n }", "public function install(){\r\n\t\t\r\n\t}", "public static function install(){\n\t}", "public function install()\n {\n }", "public functio...
[ "0.73395854", "0.728869", "0.728869", "0.72383934", "0.69494647", "0.694625", "0.6924911", "0.6838052", "0.6838052", "0.67896235", "0.67401373", "0.6446998", "0.6415371", "0.6376755", "0.63511974", "0.6327017", "0.6307957", "0.62990814", "0.6296765", "0.6290088", "0.627937", ...
0.61865216
27
Check whether or not a Revo installation is available
protected function isAlreadyInstalled($key = 'config') { $path = $this->getCorePath(); return file_exists(realpath("{$path}/config/{$key}.inc.php")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasInstall();", "public function needs_installing() {\n\t\t$settings = red_get_options();\n\n\t\tif ( $settings['database'] === '' && $this->get_old_version() === false ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function checkInstallationStatus() {\n global $configFile, ...
[ "0.6990328", "0.6768682", "0.66783124", "0.66378236", "0.6504721", "0.6484646", "0.6481667", "0.64459", "0.64318126", "0.6416151", "0.63962257", "0.63912135", "0.63909775", "0.6390712", "0.63529384", "0.63208705", "0.6317318", "0.631451", "0.62875044", "0.62875044", "0.627773...
0.0
-1
Try to find the core_path
protected function getCorePath() { $path = $this->source . '/core/'; if (array_key_exists('core', $this->destinations)) { // Custom core destination $path = $this->destinations['core']; } return realpath($path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function discoverCurrentCoreSymlink() {}", "function core_path($path = '')\n {\n return phanda()->corePath() . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }", "public function getCoreDir()\n {\n if(!Config::has('MAIN/core_path'))\n {\n Config::set('MAIN/core_path', $this...
[ "0.7166644", "0.68837386", "0.6590716", "0.65312123", "0.65274215", "0.6433731", "0.6151726", "0.6001143", "0.5992857", "0.5898198", "0.5805828", "0.58023995", "0.5763925", "0.5707701", "0.5672437", "0.56689316", "0.56508523", "0.563743", "0.56120026", "0.5578994", "0.5570535...
0.7097137
1
Handle the source. Either Build the core.transport.zip package (git source) Extract the zip archive
public function handleSource() { if (is_dir($this->source) && file_exists("{$this->source}/_build/")) { copy("{$this->source}/_build/build.config.sample.php", "{$this->source}/_build/build.config.php"); copy("{$this->source}/_build/build.properties.sample.php", "{$this->source}/_buil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function extractSource(): void\n {\n $uncompressedDir = $this->getUncompressedRoute();\n\n $sourceZip = new ZipArchive();\n $sourceZip->open($this->getHeaderFile());\n $sourceZip->extractTo($uncompressedDir);\n $sourceZip->close();\n }", "private function extrac...
[ "0.7211379", "0.666474", "0.6203012", "0.6113041", "0.6042506", "0.59558916", "0.59172755", "0.5895852", "0.58950645", "0.5858964", "0.58176655", "0.58010423", "0.57814515", "0.57630837", "0.573223", "0.5731901", "0.57263863", "0.57170963", "0.5701911", "0.5678042", "0.561823...
0.7699186
0
Move some Revo folders to custom locations, if needed
protected function handleCustomFolders() { if (!empty($this->destinations)) { foreach ($this->destinations as $folder => $target) { $folder = $this->source .'/'. $folder; if (!file_exists($folder) || empty($target)) { // Invalid folder/target g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $f...
[ "0.6192061", "0.6138709", "0.6126001", "0.5878493", "0.58597845", "0.5845825", "0.57427096", "0.5680255", "0.5670988", "0.56697506", "0.5665553", "0.56159455", "0.5582235", "0.5567524", "0.5519631", "0.5507322", "0.5501698", "0.54823154", "0.54298943", "0.5417129", "0.5416676...
0.67734855
0
Build an XML configuration file install Revo
protected function buildConfigFile(array $config) { $dom = new \DOMDocument(); $xml = $dom->appendChild($dom->createElement('modx')); foreach ($config as $k => $v) { $xml->appendChild($dom->createElement($k, $v)); } $dom->formatOutput = true; $output = $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateConfig()\n {\n if ('' == $this->config->getName()) {\n throw new \\InvalidArgumentException('No module name given');\n }\n $target = sprintf(\n '%s/app/code/%s/%s/%s/etc/config.xml',\n $this->config->getPath(),\n $this->co...
[ "0.59866405", "0.59220266", "0.5830591", "0.56886625", "0.5678746", "0.56736124", "0.55745363", "0.5562491", "0.5556638", "0.5504562", "0.5439892", "0.53970945", "0.53956246", "0.5365915", "0.53373295", "0.5325211", "0.52837175", "0.5270281", "0.526991", "0.52666616", "0.5258...
0.5504374
10
Try to instantiate a modX instance
protected function getInstance() { if ($this->modx) { return $this->modx; } $path = $this->getCorePath(); require_once "{$path}/model/modx/modx.class.php"; $this->modx = \modX::getInstance('setup'); $this->modx->initialize('mgr'); $this->modx->ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function initMODX()\n {\n require_once MODX_CORE_PATH . 'model/modx/modx.class.php';\n\n $this->modx = new modX();\n $this->modx->initialize('mgr');\n $this->modx->setLogLevel(modX::LOG_LEVEL_INFO);\n $this->modx->setLogTarget('ECHO');\n $this->modx->getService(...
[ "0.68461514", "0.6451704", "0.6408626", "0.6257522", "0.61994493", "0.61747324", "0.61530584", "0.6142996", "0.6142996", "0.6118049", "0.6070053", "0.60338724", "0.6001725", "0.5997824", "0.59368646", "0.59211916", "0.5915931", "0.5893563", "0.588248", "0.5817001", "0.577507"...
0.63288254
3
Set ComicService before test
protected function setUp(): void { $this->comicService = new ComicService(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this->service = new ComicService();\n }", "public function setUp()\n {\n $this->service = new MockService($this->getMockInitialContext());\n }", "public function setUp() : void {\n parent::setUp();\n\n $this->companyRepositoryInterfac...
[ "0.7094955", "0.6535453", "0.6474182", "0.64081854", "0.62524587", "0.62473917", "0.61706483", "0.61212534", "0.6090572", "0.60667485", "0.60234666", "0.59047717", "0.5893108", "0.58890736", "0.5886613", "0.5830131", "0.5813924", "0.5813218", "0.58113086", "0.5795344", "0.577...
0.7655772
0
Load only on ?page=samplepage
function load_transfer_plugin_scripts( $hook ) { // if( $hook != 'toplevel_page_get-user' ) { // return; // } // Load style & scripts. wp_enqueue_style( 'getUser-css-plugin' ); wp_enqueue_style( 'bootstrap-plugin' ); wp_enqueue_script( 'my-plug...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadPage()\n {\n /*if(!isset(self::$user_id)) {\n self::$user_id = $_GET['user_id'];\n self::$id_wp_user = $_GET['id_wp_page'];\n self::$id_post = $_GET['id_post'];\n self::$nonce_img_upload = \"<input type='hidden' id='nonce_img_upload' name='n...
[ "0.6392238", "0.6209508", "0.61577487", "0.61181366", "0.5999596", "0.5904053", "0.5903599", "0.5820063", "0.57618004", "0.5745371", "0.5745371", "0.5742118", "0.571298", "0.5708434", "0.5699141", "0.5695992", "0.56959283", "0.5684688", "0.5680562", "0.5654368", "0.56199396",...
0.0
-1
Checks to see if a user exists, if so, it authorizes the user
private function attemptLogin($user){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n // TODO: Check if is authorized to create user\n return true;\n }", "public function auth() {\n\t\t\t// Check if user has not a session\n\t\t\tif (!$this->session->has('user')) return false;\n\n\t\t\t// Get the user from session\n\t\t\t$user = $this->session-...
[ "0.70663285", "0.6600494", "0.6573435", "0.6520676", "0.6442943", "0.63199544", "0.62971413", "0.62950075", "0.6275104", "0.62677544", "0.62669784", "0.6263903", "0.6246091", "0.62439114", "0.62429696", "0.62397814", "0.622074", "0.6196412", "0.61671954", "0.616646", "0.61584...
0.0
-1
This unsets the authorization cookie
private function logoutUser($hash){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function unsetAccessTokenCookie()\n {\n setcookie('accessToken', '', time() - 3600, \"/\"); \n }", "public function deAuth(){\n $this->updateIP();\n $this->updateLoginDate();\n $this->authenticated = false;\n unset($_COOKIE['authenticated']);\n setcookie(...
[ "0.766261", "0.76082915", "0.74785566", "0.73259854", "0.7305", "0.72928023", "0.7201294", "0.72011477", "0.7067654", "0.70599306", "0.70085436", "0.6956858", "0.69274396", "0.69150287", "0.68915766", "0.6823587", "0.6822054", "0.67940176", "0.67811644", "0.6764661", "0.67630...
0.0
-1
Returns a user object for a specified hash key stored as cookie
private function userForAuth($hash){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHash($hash)\n {\n return $this->user->where('hash' , '=' , $hash)->first();\n }", "public function getUserByLoginHash($loginHash)\n {\n $sql = \"SELECT `id`,`login`,`loginHash`,`email`,`emailHash`,\".\n \"`pass`,`fio`,`phone`,`photo` \".\n \"F...
[ "0.66925186", "0.6499301", "0.643256", "0.6387307", "0.636962", "0.63253236", "0.6313731", "0.6309718", "0.6299145", "0.6265376", "0.6249621", "0.6225055", "0.6172544", "0.6153799", "0.60795087", "0.60764647", "0.60629976", "0.6028445", "0.600177", "0.60000676", "0.5999475", ...
0.63537455
5
Authorize user assigns a hash and stores it as a cookie and in the database's authentication system
private function authorizeUser($user){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createCookie()\n {\n $salt = openssl_random_pseudo_bytes(16);\n $hash = hash('sha256', $salt . $this->userId);\n\n $this->db->prepare('UPDATE `' . $this->config['authTable'] . '` SET `authSalt` = ? WHERE `' . $this->config['userColumn'] . '` = ?');\n $this->db->execu...
[ "0.72424567", "0.6807739", "0.6586711", "0.6547643", "0.6097997", "0.6094497", "0.60780156", "0.60188186", "0.5942746", "0.59291637", "0.5924107", "0.58962953", "0.579546", "0.5756192", "0.5714744", "0.57141685", "0.5709384", "0.5694107", "0.5690988", "0.5643507", "0.56315607...
0.0
-1
Seed the application's database.
public function run() { DB::statement('SET FOREIGN_KEY_CHECKS = 0'); Date::truncate(); $cantidadDatos = 1625; factory(Date::class, $cantidadDatos)->create(); }
{ "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
Validate the value is null Variable passed to this function will always be a scalar
public function validate($value) { return ($value === null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueOrNull($value) {\n global $db;\n if(strlen($value) == 0) return \"NULL\";\n else return \"'\".$db->validate($value).\"'\";\n}", "public function it_can_identify_valid_values()\n {\n $this->assertTrue(Testee::isValid(self::TEST_NULL_VALUE));\n }", "function _sql_validate_value($...
[ "0.6991197", "0.6640789", "0.6336527", "0.6323882", "0.63104427", "0.62625986", "0.6257696", "0.62542975", "0.6198979", "0.6155847", "0.6143664", "0.6116001", "0.60915047", "0.607213", "0.607213", "0.6022388", "0.6016797", "0.6005649", "0.5983497", "0.5978822", "0.5971588", ...
0.0
-1
Sanitize the data, returns null Variable passed to this function will always be a scalar
public function sanitize($value) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sanitize(&$data)\n\t{\n\t\treturn $data;\n\t}", "protected function sanitize() {}", "abstract public function sanitize();", "public function getSanitizeData($data){\n\t $santiziedData = $this->sanitizeString($data);\n\t return $santiziedData;\n }", "function sanitize($data){\r\n\t\t\t$da...
[ "0.7764956", "0.7647218", "0.7634417", "0.74439245", "0.74326736", "0.7327387", "0.73249644", "0.72504514", "0.72093195", "0.720651", "0.7204841", "0.71716315", "0.7165721", "0.71600187", "0.71600187", "0.7151033", "0.7133801", "0.7120931", "0.7107685", "0.7102903", "0.707484...
0.71344846
16
Default Constructor. Determines whether or not the mcrypt extension should be used. $mode should only, at present, be CRYPT_AES_MODE_ECB or CRYPT_AES_MODE_CBC. If not explictly set, CRYPT_AES_MODE_CBC will be used.
function Crypt_AES($mode = CRYPT_AES_MODE_CBC) { if ( !defined('CRYPT_AES_MODE') ) { switch (true) { case extension_loaded('mcrypt') && in_array('rijndael-128', mcrypt_list_algorithms()): define('CRYPT_AES_MODE', CRYPT_AES_MODE_MCRYPT); bre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct( $mode = CRYPT_RC2_MODE_CBC ) {\n\t\tparent::Crypt_Base( $mode );\n\t}", "function setMode($mode)\n {\n $this->_mcryptMode = $mode;\n }", "private function _getMode()\n {\n if ($this->_mcryptMode == '') {\n $this->_mcryptMode = MCRYPT_MODE_CBC;\n ...
[ "0.70373356", "0.6823428", "0.63455945", "0.6301764", "0.61194754", "0.60630774", "0.6005595", "0.5989494", "0.59487134", "0.5876872", "0.578087", "0.56912386", "0.5678237", "0.56302", "0.56217587", "0.55871665", "0.55272985", "0.54762316", "0.5471484", "0.54683816", "0.54546...
0.7510137
0
Extended Crypt_Rijndael::_setup() Optimizing the key schedule arrays ($w, $dw) for _encryptBlock() and _decryptBlock() after Crypt_Rijndael::_setup()
function _setup() { if (!$this->changed) { return; } $this->w = $this->dw = array(); parent::_setup(); $this->dw = array_reverse($this->dw); $w = array_pop($this->w); $dw = array_pop($this->dw); foreach ($this->w as $r => $wr) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _setup()\r\n {\r\n // Each number in $rcon is equal to the previous number multiplied by two in Rijndael's finite field.\r\n // See http://en.wikipedia.org/wiki/Finite_field_arithmetic#Multiplicative_inverse\r\n static $rcon = array(0,\r\n 0x01000000, 0x02000000, 0x04000...
[ "0.7504815", "0.66660774", "0.6450248", "0.64355314", "0.5972656", "0.58532196", "0.56727195", "0.55533665", "0.5488739", "0.5255982", "0.5244018", "0.52023715", "0.5190923", "0.51331705", "0.50723475", "0.50573784", "0.503888", "0.50308675", "0.49726826", "0.49585512", "0.49...
0.49340275
23
Dummy function Since Crypt_AES extends Crypt_Rijndael, this function is, technically, available, but it doesn't do anything.
function setBlockLength($length) { return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Crypt_AES($mode = CRYPT_AES_MODE_CBC)\n {\n if ( !defined('CRYPT_AES_MODE') ) {\n switch (true) {\n case extension_loaded('mcrypt') && in_array('rijndael-128', mcrypt_list_algorithms()):\n define('CRYPT_AES_MODE', CRYPT_AES_MODE_MCRYPT);\n ...
[ "0.70600533", "0.6840477", "0.6516851", "0.64750034", "0.64164424", "0.63959247", "0.6384273", "0.63773197", "0.6264365", "0.6248467", "0.62139404", "0.6203956", "0.6203276", "0.62009025", "0.6200142", "0.6187953", "0.6156585", "0.611297", "0.60847163", "0.6053436", "0.604826...
0.0
-1
Sets the initialization vector. (optional) SetIV is not required when CRYPT_RIJNDAEL_MODE_ECB is being used. If not explictly set, it'll be assumed to be all zero's.
function setIV($iv) { parent::setIV($iv); if ( CRYPT_AES_MODE == CRYPT_AES_MODE_MCRYPT ) { $this->changed = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setIV($iv)\r\n {\r\n $this->encryptIV = $this->decryptIV = $this->iv = str_pad(substr($iv, 0, $this->block_size), $this->block_size, chr(0));;\r\n }", "private function setIVSize() {\n // Calculate the necessary IV size.\n $this->ivSize = mcrypt_get_iv_size($this->cipher, $thi...
[ "0.688854", "0.6720343", "0.67095953", "0.6704769", "0.61690897", "0.5989857", "0.59624827", "0.5898109", "0.58632225", "0.5698325", "0.55948955", "0.5588087", "0.5510615", "0.5504956", "0.54960024", "0.5405649", "0.5249301", "0.5222614", "0.5211789", "0.5163581", "0.51494163...
0.70608187
0
Decrypts a message. If strlen($ciphertext) is not a multiple of 16, null bytes will be added to the end of the string until it is.
function decrypt($ciphertext) { if ( CRYPT_AES_MODE == CRYPT_AES_MODE_MCRYPT ) { $this->_mcryptSetup(); if ($this->mode == 'ncfb' && $this->continuousBuffer) { $iv = &$this->decryptIV; $pos = &$this->debuffer['pos']; $len = strlen($cip...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function decrypt($ciphertext)\r\n {\r\n $this->_setup();\r\n // we pad with chr(0) since that's what mcrypt_generic does. to quote from http://php.net/function.mcrypt-generic :\r\n // \"The data is padded with \"\\0\" to make sure the length of the data is n * blocksize.\"\r\n $ciph...
[ "0.79142594", "0.7124871", "0.6857203", "0.6782716", "0.67569494", "0.65169835", "0.649053", "0.6482878", "0.64794", "0.6374997", "0.63651884", "0.6365097", "0.6315007", "0.6235899", "0.62346184", "0.621279", "0.61925685", "0.61866647", "0.6185431", "0.6167007", "0.6165751", ...
0.7830097
1
Setup mcrypt Validates all the variables.
function _mcryptSetup() { if (!$this->changed) { return; } if (!$this->explicit_key_length) { // this just copied from Crypt_Rijndael::_setup() $length = strlen($this->key) >> 2; if ($length > 8) { $length = 8; } el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _setupMcrypt() {\n\t\tif ( ! isset( $this->key ) ) {\n\t\t\t$this->setKey( '' );\n\t\t}\n\n\t\tparent::_setupMcrypt();\n\t}", "protected function setUp(){\n $this->hashedPass = hash('sha512', Cons::USER_PASS );\n }", "public final function setUp(): void {\n\t\tparent::setUp();\n\t\t//...
[ "0.70387685", "0.6604097", "0.63280123", "0.6327536", "0.6326665", "0.6087714", "0.60864264", "0.6014754", "0.5936855", "0.59333867", "0.5880005", "0.58623075", "0.5809043", "0.5691901", "0.5667262", "0.5649977", "0.5639558", "0.55943847", "0.5592834", "0.55908424", "0.554196...
0.6234412
5
Encrypts a block Optimized over Crypt_Rijndael's implementation by means of loop unrolling.
function _encryptBlock($in) { $state = unpack('N*', $in); $sbox = $this->sbox; $w = $this->w; $t0 = $this->t0; $t1 = $this->t1; $t2 = $this->t2; $t3 = $this->t3; // addRoundKey $s0 = $state[1] ^ $w[4]; $s1 = $state[2] ^ $w[5]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function km200_Encrypt( $encryptData ) \n{ \n $blocksize = 16;\n $encrypt_padchar = $blocksize - ( strlen( $encryptData ) % $blocksize ); \n $encryptData .= str_repeat( chr( $encrypt_padchar ), $encrypt_padchar ); \n \n return base64_encode(\n openssl_encrypt(\n $encryptData,\n ...
[ "0.615092", "0.6010846", "0.59849", "0.59708965", "0.58145046", "0.57784194", "0.5734786", "0.56484807", "0.56092525", "0.55364186", "0.54946417", "0.5492775", "0.548641", "0.5474624", "0.5423855", "0.5410865", "0.54020375", "0.53976184", "0.5324886", "0.5315803", "0.52990234...
0.66266936
0
Decrypts a block Optimized over Crypt_Rijndael's implementation by means of loop unrolling.
function _decryptBlock($in) { $state = unpack('N*', $in); $sbox = $this->isbox; $dw = $this->dw; $dt0 = $this->dt0; $dt1 = $this->dt1; $dt2 = $this->dt2; $dt3 = $this->dt3; // addRoundKey $s0 = $state[1] ^ $dw[4]; $s1 = $state[2] ^ $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function decrypt($ciphertext)\r\n {\r\n $this->_setup();\r\n // we pad with chr(0) since that's what mcrypt_generic does. to quote from http://php.net/function.mcrypt-generic :\r\n // \"The data is padded with \"\\0\" to make sure the length of the data is n * blocksize.\"\r\n $ciph...
[ "0.6647247", "0.635637", "0.62690574", "0.6163886", "0.6163886", "0.6140285", "0.60755557", "0.60455614", "0.6024571", "0.6021471", "0.5962166", "0.59214777", "0.58563095", "0.58326864", "0.58195525", "0.5787621", "0.5781791", "0.5781791", "0.5702417", "0.57016265", "0.570087...
0.6739692
0
Treat consecutive "packets" as if they are a continuous buffer. The default behavior.
function enableContinuousBuffer() { parent::enableContinuousBuffer(); if (CRYPT_AES_MODE == CRYPT_AES_MODE_MCRYPT) { $this->enbuffer['enmcrypt_init'] = true; $this->debuffer['demcrypt_init'] = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enableContinuousBuffer()\r\n {\r\n $this->continuousBuffer = true;\r\n }", "public function startBuffering(): void {}", "public function startBuffering(): void {}", "public function buffered();", "private function readFrames() {\n\t\twhile (($type = $this->buffer->getByte()) !== 7) {\...
[ "0.6038401", "0.5602343", "0.5602343", "0.54166293", "0.53583246", "0.53358763", "0.51099056", "0.50459874", "0.49316552", "0.493061", "0.4877891", "0.4867036", "0.47300482", "0.46822518", "0.45605114", "0.45447597", "0.45343298", "0.45327133", "0.45206144", "0.45147118", "0....
0.39331827
72
Treat consecutive packets as if they are a discontinuous buffer. The default behavior.
function disableContinuousBuffer() { parent::disableContinuousBuffer(); if (CRYPT_AES_MODE == CRYPT_AES_MODE_MCRYPT) { mcrypt_generic_init($this->enmcrypt, $this->key, $this->iv); mcrypt_generic_init($this->demcrypt, $this->key, $this->iv); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableContinuousBuffer()\r\n {\r\n $this->continuousBuffer = false;\r\n $this->encryptIV = $this->iv;\r\n $this->decryptIV = $this->iv;\r\n }", "function enableContinuousBuffer()\r\n {\r\n $this->continuousBuffer = true;\r\n }", "private function readFrames() {...
[ "0.5275221", "0.5238218", "0.5165273", "0.49168125", "0.466133", "0.46353117", "0.45889434", "0.45889434", "0.4530049", "0.45073107", "0.44879043", "0.4414328", "0.43742305", "0.43561366", "0.43261528", "0.42466792", "0.4161967", "0.41551846", "0.41472185", "0.41283947", "0.4...
0.37859413
41
ensures this controller and all corresponding routes are behind
function __construct(Request $request) { //the auth meaning login is required to access them $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function routeController()\n { }", "public function route()\n {\n $this->dashboardRouting($this->relativeCmsUri);\n $this->logOffRouting($this->request, $this->relativeCmsUri);\n $this->apiRouting($this->relativeCmsUri);\n $this->documentRouting($this->userRights, $this->...
[ "0.68514913", "0.65694004", "0.6508649", "0.64679736", "0.64679736", "0.6462121", "0.644508", "0.6424415", "0.64102674", "0.63995534", "0.6388593", "0.6287674", "0.6281324", "0.62795675", "0.6276876", "0.6263456", "0.6238969", "0.6162652", "0.6156628", "0.61524135", "0.609165...
0.0
-1
Display a listing of the resource.
public function index() { //get all the woodlands and make them available to use in the view $woodlands = Woodland::all(); //return the admin woodlands view return view('/admin/woodlands/index', ['woodlands' => $woodlands]); }
{ "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() { //returns the admin woodlands create view if the create controller //is activated return view('admin.woodlands.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) { /*ensures that all data created by the user is stored in the woodland database*/ $woodland = Woodland::create($request->all()); return redirect('admin/woodlands'); }
{ "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) { /*This shows the details of a woodland when selected and loads the show view if there is a woodland matching the selected woodland id*/ $woodland = Woodland::where('id', $id)->first(); if(!$woodland) { return redirect('/admin/woodlands'); ...
{ "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) { /*allows the editing of a woodland database record if the woodland id exists. Loads the edit view*/ $woodland = Woodland::findOrFail($id); return view('admin.woodlands.edit', compact('woodland')); }
{ "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) { /*allows the updating of the database record and returns the admin wooldnad view*/ $woodland = Woodland::findOrFail($id); $woodland->update($request->all()); return redirect('admin/woodlands'); }
{ "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) { /*allows the deletion of a woodland record*/ $woodland = Woodland::find($id); $woodland->delete(); return redirect('admin/woodlands'); }
{ "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
Events based on state
public function state($state = null) { $q = \App\Event::with('venue.city.states') ->whereHas('venue.city.states', function ($query) use ($state) { $query->where('abbr', strtoupper($state)); }); $q = $this->handleRequest($q); return $q->orderby('start_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function stateChanged($event)\r\n {\r\n }", "public function onEvent();", "public function onEnterState() {\n\n }", "abstract public function setState() ;", "abstract public function states();", "abstract function HookEvents();", "public function event()\n {\n switch ($...
[ "0.6769844", "0.6442808", "0.6389908", "0.60114294", "0.5905883", "0.5873452", "0.58672667", "0.5749822", "0.57391715", "0.5703815", "0.5696644", "0.56621796", "0.56332904", "0.5617514", "0.560276", "0.56009257", "0.55694604", "0.5569249", "0.55611193", "0.5545903", "0.552436...
0.0
-1
Events based on type.
public function type($type = null) { $q = \App\Event::with('venue.city.states'); $q = $this->handleRequest($q); return $q->where('type', $type) ->orderby('start_date', 'asc') ->paginate($this->paginate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setEventType()\n {\n $this->_eventType = 12;\n }", "private function getEvents($type)\r\n {\r\n if ($type == Stat::TYPE_INQUIRY) {\r\n $inqs = $this->container->get('jcs.ds')->getGroup('inquiry');\r\n return !empty($inqs) ? $inqs : [];\r\n }\r\n elseif ($typ...
[ "0.6686122", "0.65356505", "0.6291159", "0.6013523", "0.5955522", "0.5949073", "0.5948193", "0.5945075", "0.5943697", "0.59200454", "0.59026253", "0.58390546", "0.5829551", "0.5794107", "0.5778763", "0.5778671", "0.57662624", "0.5750676", "0.5746447", "0.56845444", "0.5677793...
0.0
-1
Events based on year.
public function year($year = null) { return \App\Event::with('venue.city.states') ->whereYear('start_date', $year) ->orderby('start_date', 'asc') ->paginate($this->paginate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_events_by_year() {\n\t\tswitch_to_blog( get_network()->site_id );\n\n\t\t$years = array();\n\t\tforeach ($this->get_events() as $event) {\n\t\t\t$start = get_field( 'event_start', $event->ID );\n\n\t\t\tif ( $start ) {\n\t\t\t\t$year = date( 'Y', strtotime( $start ) );\n\t\t\t\t$yea...
[ "0.74219996", "0.6665895", "0.6569918", "0.6506415", "0.6338728", "0.63292754", "0.6329065", "0.6326816", "0.6221842", "0.62181914", "0.61588883", "0.61142284", "0.60848945", "0.6035317", "0.60174537", "0.5999049", "0.5973074", "0.59514594", "0.59212697", "0.58924055", "0.585...
0.72684336
1
Events based on year and state.
public function yearMonth($year = null, $month = null) { return \App\Event::with('venue.city.states') ->whereYear('start_date', $year) ->whereMonth('start_date', $month) ->orderby('start_date', 'asc') ->paginate($this->paginate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function yearState($year = null, $state = null)\n {\n return \\App\\Event::with('venue.city.states')\n ->whereHas('venue.city.states', function ($query) use ($state) {\n $query->where('abbr', strtoupper($state));\n })\n ->whereYear('start_date', $yea...
[ "0.7101401", "0.647072", "0.6299999", "0.62542504", "0.61698705", "0.57643974", "0.5705248", "0.565853", "0.56101394", "0.555892", "0.5545499", "0.54633147", "0.543884", "0.543602", "0.54078066", "0.5337899", "0.5320634", "0.52699256", "0.5231473", "0.52196115", "0.5213453", ...
0.52273995
19
Events based on year and type.
public function yearType($year = null, $type = null) { return \App\Event::with('venue.city.states') ->whereYear('start_date', $year) ->where('type', $type) ->orderby('start_date', 'asc') ->paginate($this->paginate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_events_by_year() {\n\t\tswitch_to_blog( get_network()->site_id );\n\n\t\t$years = array();\n\t\tforeach ($this->get_events() as $event) {\n\t\t\t$start = get_field( 'event_start', $event->ID );\n\n\t\t\tif ( $start ) {\n\t\t\t\t$year = date( 'Y', strtotime( $start ) );\n\t\t\t\t$yea...
[ "0.63551474", "0.62904876", "0.5912423", "0.5691518", "0.5691501", "0.568324", "0.5666671", "0.553759", "0.5514216", "0.54915285", "0.548499", "0.5466888", "0.5386", "0.53832567", "0.5322952", "0.5302939", "0.52908856", "0.52804863", "0.5268569", "0.5262207", "0.5241857", "...
0.7334864
0
Events based on year and state.
public function yearState($year = null, $state = null) { return \App\Event::with('venue.city.states') ->whereHas('venue.city.states', function ($query) use ($state) { $query->where('abbr', strtoupper($state)); }) ->whereYear('start_date', $year) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function year($year = null)\n {\n return \\App\\Event::with('venue.city.states')\n ->whereYear('start_date', $year)\n ->orderby('start_date', 'asc')\n ->paginate($this->paginate);\n }", "public function yearTypeState($year = null, $type = null, $st...
[ "0.647072", "0.6299999", "0.62542504", "0.61698705", "0.57643974", "0.5705248", "0.565853", "0.56101394", "0.555892", "0.5545499", "0.54633147", "0.543884", "0.543602", "0.54078066", "0.5337899", "0.5320634", "0.52699256", "0.5231473", "0.52273995", "0.52196115", "0.5213453",...
0.7101401
0
Events based on type and year.
public function yearTypeState($year = null, $type = null, $state = null) { return \App\Event::with('venue.city.states') ->whereHas('venue.city.states', function ($query) use ($state) { $query->where('abbr', strtoupper($state)); }) ->whereYear('start_date',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function yearType($year = null, $type = null)\n {\n return \\App\\Event::with('venue.city.states')\n ->whereYear('start_date', $year)\n ->where('type', $type)\n ->orderby('start_date', 'asc')\n ->paginate($this->paginate);\n }", "public function get...
[ "0.72472", "0.61797494", "0.57372206", "0.5721232", "0.56760633", "0.55220526", "0.5474397", "0.5470561", "0.5463023", "0.54596037", "0.5456593", "0.54556906", "0.5452347", "0.5411459", "0.54016584", "0.5346318", "0.53227204", "0.527593", "0.52508044", "0.5244296", "0.5229964...
0.622572
1
Events based on year, month, and state.
public function yearMonthState($year = null, $month = null, $state = null) { return \App\Event::with('venue.city.states') ->whereHas('venue.city.states', function ($query) use ($state) { $query->where('abbr', strtoupper($state)); }) ->whereYear('start_date...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCalendar( $month = null, $year = null, $selected = null, $filter = null, $city = null){\n\t\tif(!$month){\n\t\t\t$month = date('m');\n\t\t\t$year = date('Y');\n\t\t}\n\t\t$start = new \\Datetime($year.'-'.$month.'-01');\n\t\t$month_first_day = clone $start;\n\t\tif($start->format('w') != 1){\...
[ "0.6175825", "0.6162063", "0.5841054", "0.58112425", "0.57283187", "0.5711853", "0.5703794", "0.56882274", "0.5682502", "0.5680761", "0.5651937", "0.54707706", "0.540894", "0.53920096", "0.5380182", "0.537313", "0.5363529", "0.53062934", "0.530338", "0.5268856", "0.5267212", ...
0.6700396
0
Events based on year, month, type and state.
public function yearMonthTypeState($year = null, $month = null, $type = null, $state = null) { return \App\Event::with('venue.city.states') ->whereHas('venue.city.states', function ($query) use ($state) { $query->where('abbr', strtoupper($state)); }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function yearTypeState($year = null, $type = null, $state = null)\n {\n return \\App\\Event::with('venue.city.states')\n ->whereHas('venue.city.states', function ($query) use ($state) {\n $query->where('abbr', strtoupper($state));\n })\n ->whereYear(...
[ "0.6040468", "0.6003769", "0.59728014", "0.5645777", "0.5570092", "0.54929346", "0.5473005", "0.5466168", "0.5433758", "0.5401978", "0.5400446", "0.5396616", "0.5381684", "0.5316299", "0.52835757", "0.5279308", "0.5258948", "0.52385557", "0.5231329", "0.5216091", "0.52133423"...
0.6783121
0
enumerate block details from hash
public static function get_block( $hash ) { if( preg_match('/^[0-9a-f]{64}$/i', $hash) !== 1 ) return RETURN_JSON ? json_encode( ['err'=>'not a valid block hash'] ) : [ 'err'=>'not a valid block hash' ]; $base = self::base(); if( isset($base['err']) ) return R...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBlock($hash);", "public function getBlockHash();", "public function getBlockInfo();", "public function getBlockHash($index);", "public function getHashIndex();", "public function hashInfo($token,$hash)\n {\n $controller = new SignaBlockController;\n $response = $contro...
[ "0.64859605", "0.63432807", "0.6139813", "0.59149665", "0.5818394", "0.55232525", "0.54541427", "0.5437273", "0.54072994", "0.54072994", "0.5292833", "0.528986", "0.52756727", "0.5261338", "0.520397", "0.5157688", "0.5142525", "0.5138767", "0.50763434", "0.507395", "0.5063275...
0.4828678
38
create summarized list from block number
public static function get_blocklist( $ofs, $n = BLOCKS_PER_LIST ) { $base = self::base(); if( isset($base['err']) ) return RETURN_JSON ? json_encode( $base ) : $base; $offset = $ofs === null ? $base['output']['num_blocks'] : abs( (int)$ofs ); if( $offset > $base[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filter_block_list ( $block_list ) {\n\t\t\t$block_list['exportsnapshot'] = _t( 'Latest Export Snapshots' );\n\t\t\treturn $block_list;\n\t\t}", "function getBlockOutputs() {\n\tglobal $settings;\n\t//echo \"getting blocks\";\n\t\n\t$blockOutput = array();\n\t\n\t$blocksTmp = file_get_contents($se...
[ "0.55285275", "0.5468423", "0.53987384", "0.53633046", "0.53461796", "0.53125405", "0.5253618", "0.52531075", "0.5194986", "0.5163947", "0.5146528", "0.51087254", "0.5097638", "0.5043628", "0.5038214", "0.50126135", "0.50125146", "0.4981652", "0.4977719", "0.49584764", "0.494...
0.5472095
1
Register user via request.
public function registerViaRequest() { return User::create(array_merge([ 'password' => bcrypt(input('password')), ], only('email', 'name', 'is_public'))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register() {\n\t\tif ($this -> Auth -> loggedIn()) {\n\t\t\t$this -> Session -> setFlash('You are already registered.');\n\t\t\t$this -> redirect($this -> referer());\n\t\t}\n\t\tif ($this -> request -> is('post')) {\n\t\t\t$this -> User -> create();\n\t\t\t$data = $this -> request -> data;\n\t\t\t...
[ "0.7621214", "0.75986886", "0.74917525", "0.7481841", "0.7403179", "0.7403179", "0.7403179", "0.7403179", "0.7403179", "0.7403179", "0.7403179", "0.73909616", "0.7306015", "0.72192657", "0.7198478", "0.71894664", "0.7184115", "0.7160245", "0.7114681", "0.70717055", "0.7065224...
0.6868604
48
Update user via request.
public function updateUserViaRequest(User $user) { upload()->check($user); $user->load('user', 'photo'); $user->update(parameters()->fill(['email', 'name', 'is_public'], $user)); return $user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function updateUser($request)\n {\n DB::table('users')\n ->where('id', $request->id)\n ->update(['name' => $request->name,\n 'last_name'=> $request->lastName,\n 'email' => $request->email,\n 'auth_id' => $request->authId]);\n }", "...
[ "0.7800408", "0.7798503", "0.7798503", "0.7784652", "0.77721477", "0.7749831", "0.7748213", "0.7732556", "0.77232254", "0.7711381", "0.7711381", "0.7711381", "0.7711381", "0.7711381", "0.7711381", "0.7711381", "0.7711381", "0.7711381", "0.7711381", "0.7711381", "0.7711381", ...
0.0
-1
Create user via request.
public function createUserViaRequest() { $photo = photos()->createPhotoViaRequest(); $user = User::create(array_merge([ 'user_uuid' => authenticated()->uuid, 'photo_uuid' => $photo->uuid, 'photo_url' => config('storage.path') . $photo->photo_url, 'pass...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUserAction() {\n $this->authService->createUser();\n die();\n }", "public function createUser($request) {\n $response = $this->...
[ "0.78471977", "0.78471977", "0.78471977", "0.78471977", "0.7579334", "0.7570741", "0.7533397", "0.7428788", "0.7406948", "0.7389362", "0.7387138", "0.73340595", "0.7333226", "0.73217547", "0.7312451", "0.72899294", "0.72792363", "0.72752625", "0.7263636", "0.7254979", "0.7247...
0.0
-1
Check if userA is same of userB
public function sameUser(User $userA, User $userB) { return $userA->uuid === $userB->uuid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sameOwner(User $userA, User $userB)\n {\n return $userA->user_uuid === $userB->user_uuid;\n }", "function compairUser($d1,$d2) {\n if (!isset($d1[\"user\"]) || !isset($d2[\"user\"]))\n return false;\n return strtolower($d1[\"user\"])==strtolower($d2[\"user\"]);\n}", "p...
[ "0.7659763", "0.70371497", "0.6932173", "0.6898482", "0.6742031", "0.66188085", "0.66070104", "0.65856224", "0.65042925", "0.64616126", "0.63735795", "0.62431204", "0.61908615", "0.6159554", "0.6024719", "0.6000024", "0.599373", "0.59719557", "0.5945403", "0.5926041", "0.5896...
0.7766447
0
Check if userA has same owner of userB
public function sameOwner(User $userA, User $userB) { return $userA->user_uuid === $userB->user_uuid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOwner(User $userA, User $userB)\n {\n return $userA->uuid === $userB->user_uuid;\n }", "public function isOwner(): bool {\n $f3 = \\Base::instance();\n\n return $f3->get('CURRENT_USER') && !is_null($this->owner) && $f3->get('CURRENT_USER') === $this->owner->id;\n }...
[ "0.7977679", "0.6912018", "0.67760634", "0.67594475", "0.6751778", "0.66718227", "0.66364187", "0.65947026", "0.6558132", "0.6530355", "0.65232664", "0.65226275", "0.649265", "0.6455727", "0.64537966", "0.6431946", "0.64031345", "0.6393206", "0.63422453", "0.6320344", "0.6309...
0.7890891
1