query stringlengths 9 43.3k | document stringlengths 17 1.17M | metadata dict | negatives listlengths 0 30 | negative_scores listlengths 0 30 | document_score stringlengths 5 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|
Return TRUE if OpenID verification was successful | function verified($proxy=NULL) {
preg_match_all('/(?<=^|&)openid\.([^=]+)=([^&]+)/',
$_SERVER['QUERY_STRING'],$matches,PREG_SET_ORDER);
foreach ($matches as $match)
$this->args[$match[1]]=urldecode($match[2]);
if (isset($this->args['mode']) &&
$this->args['mode']!='error' &&
$this->url=$this->discover... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function simpleid_checkid_ok($request) {\n global $version;\n \n $message = array(\n 'openid.mode' => 'id_res',\n 'openid.op_endpoint' => simpleid_url(),\n 'openid.response_nonce' => openid_nonce()\n );\n \n if (isset($request['openid.assoc_handle'])) $message['openid.assoc_h... | [
"0.73925734",
"0.69684803",
"0.67869836",
"0.6735506",
"0.6664794",
"0.66517764",
"0.6561427",
"0.65513575",
"0.65010786",
"0.6498432",
"0.6449355",
"0.6417599",
"0.6397924",
"0.6354561",
"0.63356715",
"0.63136905",
"0.6278225",
"0.6266145",
"0.62433296",
"0.62351215",
"0.622... | 0.76412565 | 0 |
/ This PHP file contains Cookie Ultilities Accessing Cookies with PHP | function getCookiesInfo(){
echo "Cookies information: <br>";
if( isset($_COOKIE["name"])){
echo "_COOKIE[\"name\"]: " . $_COOKIE["name"] . "<br />";
}
else{
echo "Sorry... _COOKIE[\"name\"] is not set yet !" . "<br />";
}
//echo "HTTP_COOKIE_VARS[\"name\"]: " . $HTTP_COOKIE_VARS["name"]. "<br />";
//echo "... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_cookies()\n {\n }",
"function doCookies() {\r\n setcookie(\"cli_num\", 123456789, time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_fname\", $_POST['first_name'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_lname\", $_POST['last_name'], time() + (86400 * 1), \"/\"... | [
"0.7423709",
"0.72413534",
"0.7023248",
"0.70126003",
"0.6996902",
"0.69403803",
"0.6939797",
"0.68988234",
"0.68562573",
"0.670981",
"0.67063296",
"0.66999906",
"0.667409",
"0.6648376",
"0.66480535",
"0.6637746",
"0.6601291",
"0.65902483",
"0.658814",
"0.658149",
"0.65789473... | 0.7251826 | 1 |
The only action of this controller. This action is used to rewrite the backend Config saveTemplateAction and save additional data. | public function saveTemplateAction()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function saveAction() :void\n {\n $data = $this->request->getPost();\n $record = ModuleTemplate::findFirst();\n if ($record === null) {\n $record = new ModuleTemplate();\n }\n $this->db->begin();\n foreach ($record as $key => $value) {\n ... | [
"0.6807841",
"0.6206388",
"0.61593",
"0.610639",
"0.6096789",
"0.6075421",
"0.5825599",
"0.5812048",
"0.5737642",
"0.56738055",
"0.5637621",
"0.5622439",
"0.5603154",
"0.5595343",
"0.5590436",
"0.55859154",
"0.55521786",
"0.5511519",
"0.54491484",
"0.54472715",
"0.5446891",
... | 0.74228793 | 0 |
$servicos = $this>db>query("SELECT FROM vw_listar_servicos_categoria ORDER BY data_servico DESC;")>result(); | public function getView()
{
if(!$this->base->isAdmin())
$servicos = $this->db->where('inativo IS FALSE');
$servicos = $this->db->order_by('data_servico', 'desc')->get('vw_listar_servicos_categoria')->result();
return $servicos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function noticiasActivas(){\r\n\t$objDatos = new clsDatos();\r\n\t$sql=\"select * from noticias where activo='1' order by fecha DESC\";\r\n\t$res = $objDatos->filtroListado($sql);\r\n\treturn $res;\r\n}",
"function listarServicios()\n\t{\n\t\treturn \"select servicios.servicio_id,servicios.nombre_servicio... | [
"0.72769225",
"0.6814404",
"0.6790958",
"0.67826134",
"0.6764313",
"0.67016816",
"0.6692756",
"0.6640065",
"0.6636746",
"0.65971464",
"0.65594256",
"0.6545949",
"0.65322655",
"0.65309966",
"0.65279615",
"0.65264034",
"0.651125",
"0.64916867",
"0.64806974",
"0.64722884",
"0.64... | 0.6856004 | 1 |
Flattens `Future>` into `Future` | public static function flatten ($f) {
#/home/jahred/haxelib/tink_core/1,23,0/src/tink/core/Future.hx:76: characters 5-31
return new NestedFuture($f);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static public function flatten ($f) {\n\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:71: characters 5-31\n\t\treturn new NestedFuture($f);\n\t}",
"static public function ofMany ($futures, $gather = true) {\n\t\t#/home/grabli66/haxelib/tink_core/git/src/tink/core/Future.hx:93: lines 93-108\n\t... | [
"0.65526605",
"0.47828382",
"0.4586958",
"0.45754296",
"0.45375106",
"0.44992465",
"0.43423042",
"0.43423042",
"0.4330191",
"0.4330191",
"0.4330191",
"0.43190578",
"0.43002105",
"0.42518944",
"0.4193827",
"0.40919286",
"0.40881062",
"0.40716207",
"0.40613842",
"0.40016177",
"... | 0.65837544 | 0 |
Sets autorization header telling that you need to be authenticated | public function setAuthenticateHeader()
{
$response = \Yii::$app->response;
$response->getHeaders()->set('WWW-Authenticate', "Basic realm=\"{$this->realm}\"");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAuthorization()\n\t{\n\t\t// @TODO We don't deal with a case where during your session the token expires\n\t\tif (is_null($this->access_token))\n\t\t{\n\t\t\t$response = $this->getToken();\n\t\t\t$this->access_token = $response->access_token;\n\t\t\t$this->authorization = \"Bearer \" . $this->ac... | [
"0.702322",
"0.7004076",
"0.6986348",
"0.6976852",
"0.6959325",
"0.675015",
"0.6735196",
"0.673283",
"0.6685304",
"0.66836655",
"0.6605274",
"0.6583517",
"0.64165694",
"0.64147997",
"0.63940006",
"0.6292193",
"0.6210134",
"0.617427",
"0.61313754",
"0.6114502",
"0.60141236",
... | 0.70890963 | 0 |
generate new user emails checks for generic password | public function generate_new_passwords() {
// all users added with "password" will be automatically sent a welcome message
// and new password
$resetpassword = 'password';
// get users
$user_list = $this->get_user->get_all_users();
// go through users
foreac... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function generateNewPassword($mail);",
"static function password_expired_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n\n password_expired_email($user) ?\n ... | [
"0.709545",
"0.68329805",
"0.67693996",
"0.6749227",
"0.66979414",
"0.6665304",
"0.66307354",
"0.656412",
"0.64873266",
"0.6419626",
"0.6404173",
"0.6376843",
"0.6341731",
"0.6314451",
"0.62974715",
"0.6284961",
"0.6277273",
"0.62592727",
"0.62543994",
"0.6230435",
"0.62228",... | 0.739786 | 0 |
Handle an incoming request. This middleware checks whether loggedin user is related with any account and: 1) has "write" permissions within this account 2) this account has kids to quote | public function handle(Request $request, Closure $next)
{
$permissions = AccountUserPermission::whereHas('permission', function(Builder $query){
$query->where('allow_write','=','1');
})->has('account.kids')
->where('user_id','=',Auth::id())->count();
if($permissions>... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle( $request, Closure $next, ...$guards )\n {\n if( auth()->user()->isAdmin() ) {\n return $next($request);\n } else {\n abort(403);\n }\n }",
"public static function handleRequest()\n {\n if(isset($_SESSION['user']) && $_SESSION['use... | [
"0.59198695",
"0.58551884",
"0.5820321",
"0.5749536",
"0.57371",
"0.5719621",
"0.57120746",
"0.56859833",
"0.56594825",
"0.5657772",
"0.5640749",
"0.56337804",
"0.5631338",
"0.56286514",
"0.56004035",
"0.5599671",
"0.55985546",
"0.55821586",
"0.55723053",
"0.5567394",
"0.5566... | 0.641371 | 0 |
Return true if it's a super move. | public function isSuper(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isSuper(): bool\n {\n return $this->hasRole('super');\n }",
"public function isSuper() {\n\t\treturn ($this->isAdmin() || $this->Session->read('Acl.isSuper'));\n\t}",
"private function beforeMove(): bool\n {\n $event = new MoveEvent();\n $this->trigger(self::EVENT_... | [
"0.6505717",
"0.6404016",
"0.63249946",
"0.6279315",
"0.6269793",
"0.6145727",
"0.6029503",
"0.58672625",
"0.5802306",
"0.57306886",
"0.57066023",
"0.5700708",
"0.56229925",
"0.5618475",
"0.55848074",
"0.5540841",
"0.5534597",
"0.55284506",
"0.5527662",
"0.55159444",
"0.55109... | 0.6597946 | 0 |
Return the meter gain value earned by the dealer. | public function getMeterGain(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_deliveredEnergyMeter(): float\n {\n // $res is a double;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::DELIVEREDENERGYMETER_INVA... | [
"0.6608715",
"0.63203067",
"0.62981546",
"0.62909436",
"0.6197732",
"0.61832464",
"0.6118515",
"0.6077072",
"0.60670114",
"0.60651124",
"0.606058",
"0.60189724",
"0.59712094",
"0.5930064",
"0.59287155",
"0.5925734",
"0.59255564",
"0.5923893",
"0.5911628",
"0.5908714",
"0.5900... | 0.8184569 | 0 |
Return the hit level on the target. | public function getHitLevel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLevel() {}",
"public function getLevel();",
"public function getLevel();",
"public function GetLevel()\n {\n return $this->level;\n }",
"public function getLevel()\n {\n return $this->level;\n }",
"public function getLevel()\n {\n return $this->level... | [
"0.68071246",
"0.6727809",
"0.6727809",
"0.6630325",
"0.66138345",
"0.66138345",
"0.66138345",
"0.66138345",
"0.66138345",
"0.66138345",
"0.66138345",
"0.6604302",
"0.65856564",
"0.65856564",
"0.65646714",
"0.6550286",
"0.65243006",
"0.65175945",
"0.6508514",
"0.64722013",
"0... | 0.8134625 | 0 |
Compares move by inputs. | public function equals(MoveInterface $otherMove); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testComplexMove(){\n $gm = new GamesManager();\n\n $game = $this->generateGameObjectWithTwoPlayers();\n\n\n $game->gameState->currentPlayer = 0;\n $game->gameState->isGameGoing = true;\n $game->gameState->selectChecker = false;\n $game->gameState->pickedChe... | [
"0.5544087",
"0.54747665",
"0.5387154",
"0.5273328",
"0.52665716",
"0.52562845",
"0.5227192",
"0.5180332",
"0.5176289",
"0.5160502",
"0.51169616",
"0.50695074",
"0.50054425",
"0.49992335",
"0.49589285",
"0.4948577",
"0.49212882",
"0.49166873",
"0.49122447",
"0.4900638",
"0.48... | 0.5747808 | 0 |
Validates that the given userinfo is a valid response for the requestedClaims. This must be called after other validations | public function validateMatchingResponse(array $requestedClaims, array $userinfo)
{
$rules = [];
if (isset($requestedClaims['rules'])) {
if (!is_array($requestedClaims['rules'])) {
throw new ValidationException("Rules must be array (logic expression).");
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function validUserResponse ($userResponse);",
"private function verify_request($data_active)\r\n\t\t{\r\n\t\t\t$headers = $this->input->request_headers();\r\n\r\n\t\t\t// Extract the token\r\n\t\t\t$token = $headers['Authorization'];\r\n\r\n\t\t\t// Use try-catch\r\n\t\t\t// JWT library throws exception i... | [
"0.61199075",
"0.53209674",
"0.5161927",
"0.513904",
"0.50741595",
"0.49586102",
"0.49447203",
"0.49420717",
"0.49323457",
"0.4922052",
"0.49094534",
"0.4908126",
"0.48788986",
"0.48533937",
"0.48219582",
"0.48139027",
"0.481387",
"0.48041713",
"0.47919026",
"0.47835636",
"0.... | 0.69121504 | 0 |
Validates that the requested essential claims are in the response, taking conditionals and special cases into account | private function validateMatchingResponseForToken(array $request, array $response, array $rules)
{
$logicEvaluator = new LogicEvaluator($rules, $response);
foreach ($request as $claimName => $valueInRequest) {
if (!$this->isVerificationClaim($claimName)) {
continue;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handle_claim() {\n $file = $_FILES[\"claim\"];\n\n if (!check_upload(&$file)) {\n header(\"HTTP/1.1 400 Bad Request\");\n echo \"Uploaded file missing or of wrong type!\\n\";\n return false;\n }\n\n if (($err = verify_signature(&$file)) !== \"OK\") {\n header(\"HTTP... | [
"0.5917254",
"0.58860385",
"0.5828724",
"0.5704555",
"0.5642776",
"0.55364764",
"0.55364764",
"0.55023044",
"0.5487876",
"0.5476067",
"0.5457175",
"0.54370266",
"0.54347104",
"0.53679836",
"0.5352606",
"0.53438467",
"0.5340123",
"0.53141844",
"0.5310807",
"0.53002864",
"0.528... | 0.58951604 | 1 |
Does the string end with the given ending? | private function endsWith($string, $ending)
{
$length = strlen($ending);
if ($length == 0) {
return true;
}
return (substr($string, -$length) === $ending);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ends_with($string,...$end)\n{\n if(!$string)\n return false;\n foreach( $end as $e )\n if( substr($string,strlen($string)-strlen($e)) == $e )\n return true;\n return false;\n}",
"function check_str_end(string $string, string $end, int $len, $endLength): bool\n{\n ret... | [
"0.8075019",
"0.79937583",
"0.783031",
"0.77522296",
"0.77446014",
"0.77412206",
"0.7707136",
"0.7633017",
"0.7626689",
"0.7624749",
"0.7588783",
"0.7531934",
"0.7489809",
"0.74896574",
"0.74605316",
"0.73864275",
"0.7373679",
"0.73714787",
"0.7369942",
"0.7367351",
"0.728408... | 0.8063734 | 1 |
Deletes configuration objects whose names start with a given prefix. Given the following configuration object names: node.type.article node.type.page Passing the prefix 'node.type.' will delete the above configuration objects. | public function deleteAll($prefix = ''); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function delete($prefix)\n {\n if (!is_string($prefix) or $prefix === null or $prefix === '') {\n throw new \\InvalidArgumentException(\n \"\\$prefix should be a string and cannot be null or empty\"\n );\n }\n\n $prefix = strtolower($prefix... | [
"0.59229916",
"0.5854187",
"0.58503544",
"0.5822707",
"0.57871926",
"0.552195",
"0.5466166",
"0.5421459",
"0.534045",
"0.53156245",
"0.5227362",
"0.51237273",
"0.5120324",
"0.49455112",
"0.49274817",
"0.48961696",
"0.48476747",
"0.48331958",
"0.4800423",
"0.4796945",
"0.47775... | 0.6815704 | 0 |
this three functions look for id,amount,account_type from array accounts | function emetteur_account_id() {
global $account_type;
foreach ($account_type as $key => $accounts) {
foreach ($accounts as $key => $account) {
if ($account == test_input($_POST["compte_emetteur"])) {
return $accounts["id"];
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function beneficiaire_account_id() {\n global $account_type;\n foreach ($account_type as $key => $accounts) {\n foreach ($accounts as $key => $account) {\n if ($account == test_input($_POST[\"compte_beneficiaire\"])) {\n return $accounts[\"id\"];\n }\n }\n }\n }",
"publ... | [
"0.6595377",
"0.6134952",
"0.60930204",
"0.5779701",
"0.57348096",
"0.56539696",
"0.56191105",
"0.5611026",
"0.5601746",
"0.55570155",
"0.5549037",
"0.554459",
"0.55139583",
"0.54715633",
"0.54419416",
"0.543885",
"0.5429928",
"0.54044324",
"0.5379817",
"0.5375252",
"0.537275... | 0.62901866 | 1 |
this three functions look for id,amount,account_type from array accounts | function beneficiaire_account_id() {
global $account_type;
foreach ($account_type as $key => $accounts) {
foreach ($accounts as $key => $account) {
if ($account == test_input($_POST["compte_beneficiaire"])) {
return $accounts["id"];
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function emetteur_account_id() {\n global $account_type;\n foreach ($account_type as $key => $accounts) {\n foreach ($accounts as $key => $account) {\n if ($account == test_input($_POST[\"compte_emetteur\"])) {\n return $accounts[\"id\"];\n }\n }\n }\n }",
"public funct... | [
"0.6289802",
"0.6134071",
"0.609225",
"0.5778751",
"0.57343304",
"0.5654055",
"0.561856",
"0.5610239",
"0.56008947",
"0.55561996",
"0.55483097",
"0.55452555",
"0.5513649",
"0.54710156",
"0.5441734",
"0.5439063",
"0.54292583",
"0.5402549",
"0.53785807",
"0.53743976",
"0.537309... | 0.659521 | 0 |
/ the constructor loads the necessary core files and classes, and creates a router instance | public function __construct() {
$this->loadCoreClasses();
$this->router = new Router();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n $this->uri = Fly::app()->getUri();\n Fly::log('debug', \"Router Class Initialized\");\n $this->setRouting();\n }",
"function __construct()\n {\n $routesPath = ROOT . '/core/config/routes.php';\n if (file_exists($routesPath)) {\n ... | [
"0.8297344",
"0.788802",
"0.7747912",
"0.7725001",
"0.77034354",
"0.77000535",
"0.76570654",
"0.76074505",
"0.7605644",
"0.7557966",
"0.7504764",
"0.74951476",
"0.7449673",
"0.74465173",
"0.7301544",
"0.7273089",
"0.7268058",
"0.7231878",
"0.72175306",
"0.72009236",
"0.718881... | 0.88063747 | 0 |
/ validates if a controller path exists and is readable | protected function validController($path) {
return file_exists($path) && is_readable($path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static function checkControllerIsExist () {\n\t\tif ( !isset(self::$url[0]))\n\t\t\treturn false ;\n\t\t$controller = trim(self::$url[0]);\n\t\tif ( !empty($controller)) {\n\t\t\t$controllerPatch = self::$appPatch.self::$app.DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . $controller . '.php' ;\... | [
"0.7252334",
"0.7035493",
"0.68429124",
"0.65190035",
"0.6396005",
"0.6281552",
"0.626848",
"0.62484044",
"0.61569375",
"0.60835975",
"0.606851",
"0.6057534",
"0.6037909",
"0.5993838",
"0.5947583",
"0.5947583",
"0.5938197",
"0.5896171",
"0.5877429",
"0.5872966",
"0.5851458",
... | 0.7996422 | 0 |
/ loads the core class files | protected function loadCoreClasses() {
require __DIR__ . DIRECTORY_SEPARATOR . 'Config.php';
require __DIR__ . DIRECTORY_SEPARATOR . 'Router.php';
require __DIR__ . DIRECTORY_SEPARATOR . 'Loader.php';
require __DIR__ . DIRECTORY_SEPARATOR . 'Controller.php';
require __DIR__ ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function loadClassFiles() {}",
"private function loadClasses()\n\t\t{\n\t\t\t// foreach($GLOBALS['classes'] as $var => $class)\n\t\t\t// {\n\t\t\t\t// $this->$var = $class;\n\t\t\t// }\n\t\t\t\n\t\t\t// $this->load = _new('loader');\n\t\t\t\n\t\t\t/** Registramos todos os objetos que serão necessários ... | [
"0.78886384",
"0.74368006",
"0.7236141",
"0.7230211",
"0.71069735",
"0.7071298",
"0.70692074",
"0.7036053",
"0.6996384",
"0.6929936",
"0.6881678",
"0.687795",
"0.6813528",
"0.68101895",
"0.67888033",
"0.6780812",
"0.67777777",
"0.6765415",
"0.6741987",
"0.673613",
"0.6727286"... | 0.84678334 | 0 |
Get an asset by its path | public static function path($path)
{
return Assets::all()->filter(function ($asset) use ($path) {
return $asset->resolvedPath() === $path;
})->first();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAsset($key, $path = null) {\n if (isset($path))\n return $this->m->Assets->getAsset($key, $path);\n return $this->info->getAsset($this->m->Assets, $key);\n }",
"static function asset($path)\n {\n return Assets::src($path);\n }",
"public function asset(string $path)\n... | [
"0.783336",
"0.728482",
"0.7275394",
"0.71702605",
"0.70674044",
"0.6842171",
"0.67996275",
"0.66976744",
"0.66391087",
"0.6557754",
"0.651351",
"0.651351",
"0.6472198",
"0.6446784",
"0.6430077",
"0.6422105",
"0.6416686",
"0.6400945",
"0.6394981",
"0.6370265",
"0.63701123",
... | 0.7417017 | 1 |
Lists all Examination models. | public function actionIndex()
{
$userId = Yii::$app->user->id;
$searchModel = new ExaminationSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$dataProvider->query->AndWhere(['user_id' => $userId]);
$dataProvider->query->orderBy('create_a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index()\n\t{\n\t\t$exams = Exam::with('course')->get(['id', 'name', 'type', 'course_id', 'class', 'campus_id', 'created_at']);\n\n\t\tforeach ($exams as $value) {\n\t\t\t$value['campus'] = Campus::find($value['campus_id'])->title;\n\t\t}\n\t\treturn $exams;\n\t}",
"public function index()\n\t{\n\... | [
"0.6388559",
"0.6354124",
"0.62900794",
"0.6183228",
"0.61783564",
"0.6168356",
"0.6096302",
"0.6082665",
"0.607787",
"0.6073956",
"0.60720295",
"0.60704064",
"0.6067534",
"0.6064393",
"0.60572386",
"0.5988476",
"0.59781706",
"0.5957731",
"0.59494495",
"0.5945963",
"0.5942848... | 0.70736754 | 0 |
Creates a new Examination model. If creation is successful, the browser will be redirected to the 'view' page. | public function actionCreate()
{
$model = new Examination();
if ($model->load(Yii::$app->request->post())) {
$userId = \Yii::$app->user->id;
$this->saveResult($model->result, $userId);
return $this->redirect('index');
}
return $this->render('crea... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCreate()\n\t{\n\t\t$model=new ElearningExam;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['ElearningExam']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ElearningExam'];\n\t\t\tif($model->save())\n\t\t\t\... | [
"0.75224596",
"0.70448494",
"0.69286925",
"0.6925248",
"0.6869331",
"0.6866634",
"0.6846652",
"0.68006235",
"0.6791648",
"0.67599225",
"0.6747884",
"0.67406905",
"0.67236465",
"0.67160517",
"0.66948795",
"0.6693164",
"0.6677648",
"0.6677507",
"0.6677325",
"0.667132",
"0.66658... | 0.84992194 | 0 |
Finds the Examination model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown. | protected function findModel($id)
{
if (($model = Examination::findOne($id)) !== null) {
return $model;
}
throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function findModel($id)\n {\n if (($model = PaidEmployment::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404);\n }\n }",
"public abstract function find($primary_key, $model);",
"private function findModel($key)\n {... | [
"0.67698216",
"0.66550237",
"0.6546686",
"0.6543248",
"0.6519957",
"0.64661765",
"0.6399759",
"0.6376996",
"0.63081235",
"0.6267306",
"0.6229699",
"0.61941415",
"0.6169507",
"0.61658055",
"0.6164623",
"0.6141948",
"0.6129402",
"0.61219573",
"0.6112529",
"0.6109874",
"0.610174... | 0.6949804 | 0 |
cp_js_end This adds orig_cat_url_title field to capture and post the original value after submission | function cp_js_end()
{
$data = '';
if ($this->EE->extensions->last_call !== FALSE)
{
$data = $this->EE->extensions->last_call;
}
$js = '
$(".pageContents form").has("input[name=cat_name]#cat_name").find("input[name=cat_url_title]#cat_url_title").each(function() {
var $cat_url_title = $(this);... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wp_ajax_press_this_add_category()\n {\n }",
"private function getCategoryPostData()\n {\n // Get data from form fields\n $this->data['category_title'] = $this->input->post('category_title');\n }",
"function product_category_edit(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, ... | [
"0.57493216",
"0.5638515",
"0.5587308",
"0.5583835",
"0.5576168",
"0.5532479",
"0.5492839",
"0.5468453",
"0.5453175",
"0.5439546",
"0.542789",
"0.5405437",
"0.53552526",
"0.52939606",
"0.5288841",
"0.5271692",
"0.5238602",
"0.5228893",
"0.52277046",
"0.5167096",
"0.5166725",
... | 0.7567759 | 0 |
caso: cargarAlumno (post): Se deben guardar los siguientes datos: nombre, apellido, email y foto. Los datos se guardan en el archivo de texto alumnos.txt, tomando el email como identificador. | public static function cargarAlumno()
{
throw new Exception('No implementado aun ');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cargarDatostxt(){\n // Si no existe lo creo\n $tabla=[]; \n if (!is_readable(FILEUSER) ){\n // El directorio donde se crea tiene que tener permisos adecuados\n $fich = @fopen(FILEUSER,\"w\") or die (\"Error al crear el fichero.\");\n fclose($fich);\n }\n $fich = @fopen(... | [
"0.6084217",
"0.5927711",
"0.5755315",
"0.56801736",
"0.56752354",
"0.56591696",
"0.5650602",
"0.56040895",
"0.56008196",
"0.5588999",
"0.5584097",
"0.5556028",
"0.5499985",
"0.54826623",
"0.5468537",
"0.54244405",
"0.54075575",
"0.5399108",
"0.53829056",
"0.5375976",
"0.5365... | 0.6596407 | 0 |
Query the Search API by a search term and location | function search($term, $location) {
$url_params = array();
$url_params['term'] = $term;
$url_params['location'] = $location;
$url_params['limit'] = $GLOBALS['SEARCH_LIMIT'];
return request($GLOBALS['API_HOST'], $GLOBALS['SEARCH_PATH'], $url_params);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function search($term, $location, $price, $radius, $categories, $sort) {\n $url_params = array();\n \n $url_params['term'] = $term;\n $url_params['location'] = $location;\n $url_params['limit'] = $GLOBALS['SEARCH_LIMIT'];\n\t$url_params['open_now'] = true;\n $url_params['price'] = $price;\n $u... | [
"0.7596438",
"0.74730897",
"0.7405362",
"0.7267051",
"0.716777",
"0.7147625",
"0.6984506",
"0.69432247",
"0.6934082",
"0.68978876",
"0.6779909",
"0.67794234",
"0.6776836",
"0.67475784",
"0.67475784",
"0.67432684",
"0.67276835",
"0.6668217",
"0.6656132",
"0.6567901",
"0.655249... | 0.7809321 | 0 |
Query the Business API by business_id | function get_business($business_id) {
$business_path = $GLOBALS['BUSINESS_PATH'] . urlencode($business_id);
return request($GLOBALS['API_HOST'], $business_path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_business($bearer_token, $business_id) {\n $business_path = $GLOBALS['BUSINESS_PATH'] . urlencode($business_id);\n \n return request($GLOBALS['API_HOST'], $business_path);\n}",
"function GetBusiness($businessId)\n\t{\n\t\t$result = $this->sendRequest(\"GetBusiness\", array(\"BusinessId\"=>$b... | [
"0.72874045",
"0.68762845",
"0.6643683",
"0.6613496",
"0.64544404",
"0.64544404",
"0.64544404",
"0.64544404",
"0.64544404",
"0.64386517",
"0.6426751",
"0.63784474",
"0.6187909",
"0.61160827",
"0.60744554",
"0.60321623",
"0.60273176",
"0.602034",
"0.602034",
"0.602034",
"0.602... | 0.7619095 | 0 |
Get the existing recommandation category list | function getCategoryRecommandationList(){
global $wpdb;
$query = $wpdb->prepare(
"SELECT RECOMMANDATION_CAT.*, PIC.photo
FROM " . TABLE_CATEGORIE_PRECONISATION . " AS RECOMMANDATION_CAT
LEFT JOIN " . TABLE_PHOTO_LIAISON . " AS LINK_ELT_PIC ON ((LINK_ELT_PIC.idElement = RECOMMANDATION_CAT.id) AND (t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCategories();",
"public function getCategories();",
"public function getCategories(){\n\t\t$query = \"SELECT * FROM final_categoria\";\n\t\treturn $this->con->action($query);\n\t}",
"public function getCategoryList()\n {\n// return $this->categoryList = DB::table('categories')->g... | [
"0.7073164",
"0.7073164",
"0.70191187",
"0.6952801",
"0.6952469",
"0.6925243",
"0.69237745",
"0.691156",
"0.6873652",
"0.68731844",
"0.68014926",
"0.6720509",
"0.67117107",
"0.6695676",
"0.6695676",
"0.6617632",
"0.66162014",
"0.66094625",
"0.65975153",
"0.65836245",
"0.65781... | 0.76744723 | 0 |
Get the output for the recommandation categories list for a category | function getCategoryRecommandationListOutput($outputMode = 'pictos', $selectedRecommandationCategory = '', $arguments = array()) {
$categoryListOutput = '';
$categoryList = evaRecommandationCategory::getCategoryRecommandationList();
$specific_container = !empty($arguments) && !empty($arguments['form_container'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function retrieve_category_description() {\n\t\treturn $this->retrieve_term_description();\n\t}",
"function getCategoryRecommandationList(){\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$query = $wpdb->prepare(\r\n\t\t\t\"SELECT RECOMMANDATION_CAT.*, PIC.photo\r\n\t\t\tFROM \" . TABLE_CATEGORIE_PRECONISATION . \" AS ... | [
"0.66375893",
"0.6628101",
"0.6549832",
"0.6475605",
"0.6454724",
"0.6424433",
"0.64082116",
"0.6385193",
"0.6338418",
"0.6304909",
"0.6304909",
"0.62741977",
"0.62741977",
"0.6237723",
"0.6224425",
"0.62137187",
"0.6212677",
"0.6130184",
"0.61257416",
"0.6124295",
"0.6121560... | 0.6635155 | 1 |
This command fetches the new versions of the packages.json from the known repositories This command fetches the new versions of the packages.json from the known repositories | public function updateCommand() {
$this->browser->setRequestEngine($this->browserRequestEngine);
$flowPackages = array();
foreach ($this->repositories as $baseUrl => $repository) {
$domain = parse_url($repository, PHP_URL_HOST);
#$baseUrl = dirname($repository) . '/';
$basePath = FLOW_PATH_DATA . 'Packa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function find_updatable_packages() {\n\tif ($this->updatable === null) {\n\t\t/**\n\t\t * @todo don't call installed_packages here\n\t\t * instead, make calls to installed_version find out if there are installed\n\t\t * and let them cache the composer.lock themselves\n\t\t */\n\t\t$installed_pac... | [
"0.63468957",
"0.6128971",
"0.5906176",
"0.5762853",
"0.5762853",
"0.5762853",
"0.575414",
"0.5726493",
"0.56422204",
"0.55780244",
"0.5555245",
"0.5490769",
"0.54845524",
"0.54644066",
"0.5426084",
"0.5392912",
"0.53787833",
"0.5378026",
"0.5365938",
"0.53623855",
"0.5354967... | 0.6538907 | 0 |
Get Match Now Title | public function getMatchNowTitle()
{
return $this->getData('match_now_title');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function rep_title_callback($match) {\r\n\t\t\r\n\t\t$query = substr($match[0],3,-3);\t\t\r\n\t\t$title = '<h2>'.$query.'</h2>';\r\n\t\treturn $title;\r\n\t\t\r\n\t}",
"private function titleGuess(): string {\n $collaboration = $this->containsCollaboration($this->title);\n return $collabora... | [
"0.73566365",
"0.7144896",
"0.670221",
"0.66354424",
"0.64411277",
"0.64210975",
"0.63641554",
"0.63528347",
"0.62879276",
"0.627547",
"0.6252517",
"0.624463",
"0.6240199",
"0.6239946",
"0.62379575",
"0.62182564",
"0.62112147",
"0.6208389",
"0.6202894",
"0.6190242",
"0.618897... | 0.85028267 | 0 |
Get Match Now Url | public function getMatchNowUrl()
{
return $this->getData('match_now_url');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getCurrentUrlFromRoutes()\n {\n $input = &SGL_Registry::singleton();\n $url = $input->getCurrentUrl();\n $currUrl = $url->toString();\n $baseUrl = $url->getBaseUrl($skipProto = false, $includeFc = false);\n return str_replace($baseUrl, '', $currUrl);\n }",
... | [
"0.6147555",
"0.597051",
"0.59636706",
"0.5956001",
"0.59448093",
"0.58937925",
"0.5831257",
"0.5823231",
"0.58090425",
"0.57796514",
"0.577795",
"0.577617",
"0.5774891",
"0.5774891",
"0.5774891",
"0.5774891",
"0.5774891",
"0.5774891",
"0.57267094",
"0.5710036",
"0.57099426",... | 0.8403448 | 0 |
Get Shop Now Title | public function getShopNowTitle()
{
return $this->getData('shop_now_title');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hestia_shop_title_callback() {\n\treturn get_theme_mod( 'hestia_shop_title' );\n}",
"public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}",
"protected function getTitle() {\r\n\t\treturn $this->newsItem->getTitle();\r\n\t}",
"public function get_title(): string {\n\t\tretu... | [
"0.7708132",
"0.753332",
"0.7376903",
"0.7373858",
"0.7337966",
"0.7273591",
"0.716291",
"0.7120857",
"0.7113418",
"0.71119654",
"0.70995754",
"0.70971644",
"0.7095166",
"0.7070589",
"0.70700467",
"0.7057545",
"0.70480055",
"0.70457923",
"0.70331323",
"0.70267814",
"0.7011192... | 0.86199474 | 0 |
Get Shop Now Url | public function getShopNowUrl()
{
return $this->getData('show_now_url');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getShopUri()\n {\n return sprintf(self::SHOP_URI, $this->getShopName());\n }",
"function _getHellaspayUrl($method) {\r\n\r\n\t\t$url = $method->hellaspay_production == '1' ? $method->hellaspay_production_url : $method->hellaspay_test_url;\r\n\r\n\t\treturn $url;\r\n\t}",
"public fu... | [
"0.7105449",
"0.7083607",
"0.6912421",
"0.6779383",
"0.67741054",
"0.6689031",
"0.66760945",
"0.6673764",
"0.65760225",
"0.65040964",
"0.65006465",
"0.64723665",
"0.64637905",
"0.64625484",
"0.64383256",
"0.64369553",
"0.6436007",
"0.6433064",
"0.64321524",
"0.63954127",
"0.6... | 0.851698 | 0 |
Remove nonnumeric characters from $cc_no | function clean_no ($cc_no) {
return ereg_replace ('[^0-9]+', '', $cc_no);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function cleanCCNumber($cc = '') {\n $cc = preg_replace('/[^0-9]/', '', trim($cc));\n return (string)$cc;\n }",
"protected function strip_non_numeric($cardno) {\n return preg_replace('/[^0-9]/', null, $cardno);\n }",
"function cardNumberClean($number)\n {\n return preg_replace(\... | [
"0.8084143",
"0.7543891",
"0.73490924",
"0.70768434",
"0.6868711",
"0.64037097",
"0.63835174",
"0.6351201",
"0.6348136",
"0.6306462",
"0.61999434",
"0.6092688",
"0.6074876",
"0.6041102",
"0.60364217",
"0.59928334",
"0.596019",
"0.593639",
"0.5930621",
"0.5922269",
"0.5916077"... | 0.87696636 | 0 |
Get returned result keys | public static function getReturnedResultKeys() {
return [
'ip',
'ua',
'browser',
'language',
'platform',
'mobile',
'tablet',
'pc',
'page',
'open',
'close',
'location'
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getKeys();",
"public function getKeys() {}",
"static function getKeys();",
"abstract public function getKeys();",
"public function getKeys(): array;",
"public function getKeys()\n {\n if ($this->_queryResult === null) {\n return [];\n }\n\n return $this-... | [
"0.77945185",
"0.77771175",
"0.7681449",
"0.76676846",
"0.75974745",
"0.7347882",
"0.729458",
"0.729458",
"0.729458",
"0.7294162",
"0.72029704",
"0.71652776",
"0.7152434",
"0.7105446",
"0.7105446",
"0.7054161",
"0.6992623",
"0.69894123",
"0.69894123",
"0.69894123",
"0.6989412... | 0.7790886 | 1 |
Returns $dat encoded to UTF8 | protected static function utf8Encode($dat)
{
if (is_string($dat)) {
if (mb_check_encoding($dat, 'UTF-8')) {
return $dat;
} else {
return utf8_encode($dat);
}
}
if (is_array($dat)) {
$answer = array();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function utf8Encode($dat)\n {\n if (is_string($dat)){\n return utf8_encode($dat);\n }\n if (!is_array($dat)){\n return $dat;\n }\n $ret = array();\n foreach ($dat as $i => $d){\n $ret[$i] = $this->utf8Encode($d);\n }\n ... | [
"0.70902044",
"0.6691718",
"0.6488349",
"0.6484774",
"0.63320524",
"0.61628664",
"0.6086392",
"0.60392594",
"0.60084146",
"0.6004522",
"0.5980297",
"0.5915582",
"0.59041953",
"0.5881356",
"0.5802224",
"0.5793196",
"0.575121",
"0.573841",
"0.573841",
"0.573841",
"0.5726693",
... | 0.7488785 | 0 |
Get the books by id | public function book($id)
{
return $this->get("/books/{$id}");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getBooks($id) {\n }",
"public function getBookById($id) {\n\t\t$book = null;\n\n foreach ($this->db-> query(\"SELECT * FROM book WHERE id=$id\") as $row){\n \n $book = new Book($row['title'], $row['author'], $row['description'], $row['id']);\n }\n\n r... | [
"0.8623019",
"0.81779176",
"0.8146076",
"0.7855995",
"0.7847217",
"0.7789382",
"0.7778965",
"0.77668166",
"0.7707386",
"0.7695172",
"0.76458347",
"0.7565044",
"0.75385535",
"0.7455013",
"0.7394145",
"0.73688716",
"0.733261",
"0.7307886",
"0.73040533",
"0.7281313",
"0.7171885"... | 0.8379085 | 1 |
Get list of VIN Pattern using VIN only. | public function index($vin, VinRepository $vinRepository)
{
$result = $vinRepository->getVinPatterns($vin);
if ($result instanceof ApiException) {
return ApiResponse::error(
$result->getResponseCode(),
$result->getMessage(),
$result->getDa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function findinvirtual($pattern)\n {\n $result = array();\n $virtual = null;\n\n if ($this->file)\n $virtual = file($this->file);\n\n if (empty($virtual))\n return $result;\n\n // check each line for matches\n foreach ($virtual as $line) {\... | [
"0.5229542",
"0.5206358",
"0.51823413",
"0.49076906",
"0.4897251",
"0.48405182",
"0.48405182",
"0.48068368",
"0.47646004",
"0.47254863",
"0.47246695",
"0.4722298",
"0.46968603",
"0.4687372",
"0.46547836",
"0.46456403",
"0.46222693",
"0.46099022",
"0.4602385",
"0.45938125",
"0... | 0.58806443 | 0 |
Function returns node string ready for insertion into database. If parameters are null or '', returns empty string (possibly delimited) | function new_node_str($flag = '', $parent_pos = null, $keys = null, $values_pos = null, $children_pos = null)
{
$empty_str = str_repeat(Database::$empty_char, $this->pos_len);
$flag_str = $flag ? $flag : str_repeat(Database::$empty_char, $this->n_format['flag']['length']);
$parent_pos_str ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function to_str() {\n $smt=\"INSERT \\n\"\n //\n //Get the root of the sql \n . \"INTO {$this->root->fromexp()}\\n\"\n //The values\n . \"{$this->str_values()}\\n\"\n //\n //The joins if a... | [
"0.5991256",
"0.5452782",
"0.5351307",
"0.52994555",
"0.5198407",
"0.5192369",
"0.5127906",
"0.51028",
"0.5093311",
"0.5076967",
"0.50089824",
"0.50012976",
"0.5000416",
"0.4995035",
"0.49949732",
"0.49794808",
"0.49641508",
"0.4957233",
"0.49563095",
"0.49465948",
"0.4938763... | 0.6110811 | 0 |
Function builds BNode from string given. If get_values = true, fills node data with key=>values | function get_node($str, $pos, $get_data)
{
$start = 0;
$len = $this->n_format['flag']['length'] + $this->d_len;
$flag = $this->get_substr($str, $start, $len);
$parent_pos = $this->get_pos_value($this->get_substr($str, $start, $this->pos_len + $this->d_len));
$keys = $this->... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function build($value, $key)\n {\n $key = str_replace(\"_\", \" \", $key);\n\n if ($value) {\n if (in_array($key, [\"code\", \"name\", \"native\"])) {\n $key = \"Language \" . $key;\n } else {\n $key = ucfirst($key);\n }\n ... | [
"0.4749919",
"0.4705231",
"0.46302524",
"0.4597355",
"0.44590124",
"0.44415614",
"0.4433053",
"0.44121525",
"0.43920425",
"0.43707222",
"0.43684363",
"0.43556684",
"0.43428394",
"0.43185925",
"0.4316652",
"0.4286249",
"0.42704257",
"0.42618603",
"0.4235861",
"0.4225837",
"0.4... | 0.6251009 | 0 |
Function replaces $name property on position $pos with $new value in string $str | function edit_property(&$str, $new_value, $pos, $name = 'keys')
{
$prop_str = $this->get_pos_str($new_value);
$start = $this->get_start_pos($name) + $pos * ($this->pos_len + $this->d_len);
$str = substr($str, 0, $start) . $prop_str . substr($str, $start + strlen($prop_str));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _replaceVariable($str, $pos, $var, $repl)\n {\n $expr = substr($str, $pos, strpos($str, ')', $pos + 1) - $pos + 1);\n $eqsign = strpos($expr, '=');\n if (false !== $eqsign)\n {\n $name = substr($expr, $eqsign + 1, strlen($expr) - $eqsign - 2);\n }\n return... | [
"0.59950745",
"0.5923943",
"0.58378243",
"0.5704068",
"0.5572111",
"0.54351354",
"0.5431104",
"0.5281488",
"0.52504885",
"0.5223439",
"0.52060515",
"0.5193551",
"0.5186991",
"0.5161758",
"0.5124974",
"0.5110818",
"0.5088579",
"0.5080547",
"0.50745887",
"0.5071972",
"0.5036922... | 0.7856642 | 0 |
Register and load the widget | function wpb_load_widget() {
register_widget( 'dmv_widget' );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wpb_load_widget() {\n register_widget( 'lrq_widget' );\n }",
"public static function register() {\n\t register_widget( __CLASS__ );\n\t}",
"public function register_widget() {\n register_widget( 'WPP_Widget' );\n }",
"function abc_load_widget()\n{\n register_widget('awesome... | [
"0.8110661",
"0.7967675",
"0.78804576",
"0.7738934",
"0.7702892",
"0.7682854",
"0.76820266",
"0.76244855",
"0.7621846",
"0.76101273",
"0.7574632",
"0.74874914",
"0.741399",
"0.7409604",
"0.7409604",
"0.7344513",
"0.731742",
"0.729245",
"0.726935",
"0.72691077",
"0.724296",
... | 0.8054664 | 1 |
expense report date wise | public function expenseReportDate(Request $request){
if($request->pdf=='pdf_download'){
echo "<h1>Coming soon</h1>";
}else{
$start=$request->start;
$end=$request->end;
$company=Company::first();
$data=ExpenseAmount::whereBetween('expense_date',[$start,$end])->with('Expe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function dtexpensegroupreport()\n {\n $search_type = $this->input->post('search_type');\n $date_from = $this->input->post('date_from');\n $date_to = $this->input->post('date_to');\n $head = $this->input->post('head');\n\n $data['date_type'] = $this->custo... | [
"0.67331916",
"0.66458374",
"0.65866214",
"0.64653",
"0.6350249",
"0.63116544",
"0.62193227",
"0.62185943",
"0.6195381",
"0.61095643",
"0.6077952",
"0.6049646",
"0.60457355",
"0.6018501",
"0.5996672",
"0.5992983",
"0.59608483",
"0.5937871",
"0.59226084",
"0.59129715",
"0.5895... | 0.66466373 | 1 |
The annual rate that is charged for borrowing (or made by investing), expressed as a single percentage number that represents the actual yearly cost of funds over the term of a loan. This includes any fees or additional costs associated with the transaction. | public function annualPercentageRate($value)
{
$this->setProperty('annualPercentageRate', $value);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAnnualPrice(): float\n {\n $ratio = $this->getMonths() / 12;\n return $this->getPrice() / $ratio;\n }",
"function it_returns_one_percent_for_one_payment_one_year_after_the_advance()\n {\n $this->addPayment(101, 365);\n\n $this->calculate()->shouldReturn(1.0... | [
"0.7048916",
"0.6441658",
"0.62440926",
"0.6178631",
"0.616266",
"0.61594385",
"0.60861105",
"0.60031074",
"0.5999476",
"0.59917885",
"0.59478843",
"0.5942794",
"0.59083617",
"0.5865003",
"0.5848721",
"0.58162296",
"0.5784676",
"0.5766853",
"0.5723153",
"0.5710646",
"0.564306... | 0.67632556 | 1 |
get list of rules | public function getRules(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRulesList(){\n return $this->_get(3);\n }",
"public function getRules() {}",
"abstract protected function getRules();",
"public function getRules(): Collection;",
"public static function getRules(): array;",
"public function getRules(): array;",
"public function getRules(): ar... | [
"0.8531926",
"0.8500616",
"0.83190566",
"0.8303848",
"0.8300871",
"0.8227738",
"0.8227738",
"0.8100199",
"0.80676585",
"0.80380654",
"0.80380654",
"0.80380654",
"0.79961723",
"0.7965298",
"0.7877579",
"0.78692764",
"0.7777388",
"0.77557963",
"0.77557963",
"0.77471775",
"0.771... | 0.8726984 | 0 |
$this>path = new File($certificateFolder); | function __construct(String $certificateFolder) {
$this->path = new FileLocator($certificateFolder);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct(string $file_path);",
"public function __construct($file);",
"function __construct($file_path)\n {\n $this->open($file_path);\n }",
"public function __construct($path);",
"public function getFile() {}",
"public function getFile() {}",
"public function __construct()\... | [
"0.6861805",
"0.660397",
"0.64530945",
"0.63977253",
"0.63536257",
"0.6351859",
"0.63486254",
"0.6246805",
"0.6214628",
"0.61984205",
"0.6184057",
"0.61572343",
"0.6137795",
"0.61377895",
"0.61106455",
"0.61079943",
"0.61064553",
"0.60980433",
"0.6095672",
"0.60745305",
"0.60... | 0.6901473 | 0 |
Desarrollar una funcion que reciba un array o un string, en un mismo parametro, e imprima el contenido de la varible en un archivo | function print_f($variable){
if(is_array($variable)){
//Si es un array, lo recorro y guardo el contenido en el archivo "datos.txt"
foreach($variable as $valor){
$contenido = $contenido . $valor . "\n";
}
file_put_contents("datos.txt", $contenido);
}
else{
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function readFileFromParam() {\n\t\tglobal $argv;\n\t\t$myArr = array();\n $myString = \"\";\n $len = 0;\n \n\t\tif (($file = fopen($argv[1], \"r\") or exit (\"Sorry - file not found.\")) != FALSE) {\n\t\t\twhile (($data = fgets($file)) != FALSE) {\n\t\t\t $myArr[$len] = $data;\n ... | [
"0.60956895",
"0.5862017",
"0.5849489",
"0.5704998",
"0.567625",
"0.5525777",
"0.5523403",
"0.547683",
"0.54739606",
"0.5453325",
"0.5448067",
"0.5427438",
"0.53477925",
"0.5330651",
"0.5317426",
"0.5317426",
"0.5317426",
"0.5316768",
"0.5316578",
"0.52904195",
"0.52730924",
... | 0.6409371 | 0 |
Get the value of Id_batiment | public function getId_batiment()
{
return $this->Id_batiment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getBidId(){\n return $this->bidId; \n }",
"public function getBid()\n {\n return $this->getAttribute()->getBid();\n }",
"public function getId_Boisson()\n {\n return $this->Id_Boisson;\n }",
"public function setId_batiment($Id_batiment)\n {\... | [
"0.6747695",
"0.66339815",
"0.66311955",
"0.658652",
"0.643237",
"0.6398355",
"0.6224411",
"0.6188837",
"0.6156267",
"0.6151657",
"0.6064528",
"0.58263236",
"0.5734558",
"0.57297283",
"0.57233727",
"0.56914264",
"0.5638607",
"0.56230545",
"0.5612167",
"0.56011236",
"0.5591568... | 0.86391884 | 0 |
Set the value of Id_batiment | public function setId_batiment($Id_batiment)
{
$this->Id_batiment = $Id_batiment;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getId_batiment()\n {\n return $this->Id_batiment;\n }",
"public function setId($IDabbonamento)\n {\n $this->id = $IDabbonamento;\n }",
"function setId($value) {\n $this->_id = intval($value);\n }",
"public function setId($id)\r\n {\r\... | [
"0.76356494",
"0.6097018",
"0.58651775",
"0.57700163",
"0.5764101",
"0.57294595",
"0.5657558",
"0.5611514",
"0.5577207",
"0.55523413",
"0.5541761",
"0.5527859",
"0.55245644",
"0.551988",
"0.55164087",
"0.55164087",
"0.55164087",
"0.55041605",
"0.5477404",
"0.5474623",
"0.5471... | 0.8076125 | 0 |
Returns the order mapper | public function getOrderMapper()
{
if($this->orderMapper == null) {
throw new \Exception('Please set the order mapper');
}
return $this->orderMapper;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_order() {\n return $this->get_mapped_property('order');\n }",
"public function generateOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder... | [
"0.6431113",
"0.58484906",
"0.58419657",
"0.58419657",
"0.58419657",
"0.58419657",
"0.58419657",
"0.58419657",
"0.58290136",
"0.5786071",
"0.5786071",
"0.5786071",
"0.5775523",
"0.57736933",
"0.5729906",
"0.56842107",
"0.56812525",
"0.5652704",
"0.5636372",
"0.5636219",
"0.56... | 0.7406881 | 0 |
Add a boolean param | public function addBoolean(string $name, bool $default = false) {
$this->add('boolean', $name, func_get_args());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _setBoolean($name, $value) {}",
"public function set_add($param)\n\t{\n\t\t$this->add = (bool)$param;\n\t\treturn $this;\n\t}",
"public function putBool(string $name, ?bool $value, bool $mandatory = false): string;",
"public function setBoolean($trueFalse);",
"function post_bool($boolean... | [
"0.6995609",
"0.6974047",
"0.6896783",
"0.6663273",
"0.6496533",
"0.6441607",
"0.641299",
"0.63380754",
"0.6304253",
"0.6259438",
"0.6259438",
"0.6259438",
"0.6259438",
"0.6259438",
"0.6253668",
"0.6182342",
"0.61822045",
"0.6175959",
"0.61320627",
"0.6130263",
"0.6117875",
... | 0.70515066 | 0 |
Get a list of members of a particular chamber in a particular Congress | public function listMembers(int $congress, string $chamber)
{
$this->congressValidator->isValidChamber($chamber);
switch ($chamber) {
case 'senate':
$earliestCongress = 80;
break;
case 'house':
default:
$earliestCon... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getChamberMembers($chamberID) {\r\n $sql = $this->db->prepare(\"SELECT UserID, firstname, lastname, email, businessname, expiry, archived, type\r\n FROM USER LEFT OUTER JOIN BUSINESS ON USER.businessID=BUSINESS.businessID WHERE USER.chamberID=:chamber_id\r\n ORDER BY lastname;\");\r... | [
"0.73190004",
"0.6645987",
"0.62595874",
"0.59774035",
"0.59544647",
"0.5867948",
"0.5847275",
"0.5789874",
"0.57801473",
"0.5643668",
"0.5597109",
"0.55882555",
"0.5572076",
"0.5558976",
"0.5558413",
"0.55562127",
"0.5533526",
"0.55256444",
"0.5503543",
"0.550002",
"0.548751... | 0.6867929 | 1 |
Get a list of the most recent new members of the current Congress | public function getNewMembers()
{
$uriStub = 'members/new.json';
return $this->performApiRequest($uriStub);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNewMembers($limit = 10, $offset = -1)\n\t{\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->condition = \"superuser <> 1\";\n\t\t$criteria->limit = $limit;\n\t\t$criteria->offset = $offset;\n\t\t$criteria->order = \"created DESC\";\n\t\t$newMembers = ZoneUser::model()->findAll($criteria);\n\n... | [
"0.627372",
"0.61850905",
"0.6174401",
"0.6114995",
"0.6100552",
"0.597774",
"0.59293956",
"0.5919237",
"0.58966655",
"0.5890074",
"0.5864995",
"0.5856403",
"0.5777726",
"0.5777397",
"0.5717376",
"0.57084703",
"0.56799996",
"0.56646717",
"0.56153995",
"0.5609165",
"0.5596281"... | 0.63905877 | 0 |
Compare bill sponsorship between two members who served in the same Congress and chamber | public function compareTwoMembersBillSponsorships(string $firstMemberId, string $secondMemberId, int $congress, string $chamber)
{
$this->formatValidator->isValidMemberIdFormat($firstMemberId);
$this->formatValidator->isValidMemberIdFormat($secondMemberId);
$this->congressValidator->isValidC... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function compare_citations($x, $y)\n{\n\n if( !$x->sources[0]->citation->uuid){// && !$y->sources[0]->citation->uuid){\n $res = -1;\n //var_dump($y->sources[0]->citation->uuid);\n }elseif(!$y->sources[0]->citation->uuid){\n $res = 1;\n //var_dump($x->sources[0]->citation->uuid);\n }\n else{\n\n\n ... | [
"0.5376475",
"0.5031117",
"0.49625513",
"0.49073452",
"0.48976406",
"0.48951378",
"0.48256844",
"0.46761075",
"0.46516463",
"0.46340224",
"0.46296656",
"0.46080282",
"0.4603489",
"0.45780826",
"0.4576223",
"0.4570238",
"0.4570038",
"0.45478666",
"0.45273718",
"0.45207253",
"0... | 0.66868687 | 0 |
Method returning list of attributes (data columns) in selected dataset | public function getPpAttributes(PpDataset $ppDataset) {
$query=$this->db->prepare('SHOW COLUMNS IN `'.$ppDataset->id.'`;');
$query->execute();
$columns=$query->fetchAll(PDO::FETCH_CLASS);
$result=[];
foreach ($columns as $column){
$result[]=new PpAttribute($column->Field, $ppDataset->id, null,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getColumnsAttribute()\n {\n return $this->fetchData[self::COLUMNS];\n }",
"public function getAttributesNames(){\n\t\t$this->_connect();\n\t\treturn ActiveRecordMetaData::getAttributes($this->_source, $this->_schema);\n\t}",
"public function getData(){\n $values = array()... | [
"0.6912565",
"0.67044073",
"0.66587377",
"0.6645676",
"0.6625465",
"0.6570991",
"0.65597194",
"0.6544039",
"0.65066284",
"0.64955425",
"0.6456338",
"0.6456338",
"0.6456338",
"0.6456338",
"0.6456338",
"0.6456338",
"0.6456338",
"0.6456338",
"0.6456338",
"0.63712233",
"0.6339038... | 0.705272 | 0 |
Method returning list of available preprocessing types | public static function getSupportedPreprocessingTypes() {
return [Preprocessing::TYPE_EACHONE, Preprocessing::TYPE_EQUIDISTANT_INTERVALS, Preprocessing::TYPE_INTERVAL_ENUMERATION, Preprocessing::TYPE_NOMINAL_ENUMERATION];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_desired_types();",
"function wp_get_ext_types()\n {\n }",
"public static function getTypes();",
"public static function getStandardTypes()\n {\n }",
"public static function get_possible_types()\n {\n }",
"public static function get_possible_types()\n ... | [
"0.6598652",
"0.64527637",
"0.64381003",
"0.64247364",
"0.6379551",
"0.6379551",
"0.6379551",
"0.63713324",
"0.63643444",
"0.63504547",
"0.6295311",
"0.62837964",
"0.6280552",
"0.62575877",
"0.62489337",
"0.62489337",
"0.62489337",
"0.62489337",
"0.62391174",
"0.6199816",
"0.... | 0.7659145 | 0 |
This part is save houses data from API | public function saveHousesData($data) {
$now = date('Y-m-d H:i:s');
$data['mdate'] = $now;
file_put_contents('_save_house_model.txt', json_encode($data));
if (isset($data['id']) && intval($data['id'] <= 0)) {
unset($data['id']);
}
if (!isset($data['id'])) {
// if (empty($data['Housesname'])) {
// ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store(Request $request)\n {\n\t\t$request->validate([\n\t\t\t'title' => 'required|max:250',\n\t\t\t'nr_of_rooms' => 'required|integer|min:0',\n\t\t\t'nr_of_beds' => 'required|integer|min:0',\n\t\t\t'nr_of_bathrooms' => 'integer|min:0|nullable',\n\t\t\t'square_mt' => 'integer|min:1|nullable',\n\t... | [
"0.6158201",
"0.61282796",
"0.6126096",
"0.6077741",
"0.6012739",
"0.59959525",
"0.5984435",
"0.59579444",
"0.59231687",
"0.588005",
"0.58591515",
"0.5828687",
"0.5826385",
"0.5815575",
"0.57798016",
"0.5759381",
"0.57567835",
"0.5684596",
"0.56678474",
"0.56493664",
"0.56486... | 0.7213015 | 0 |
Clear the list of booted models so they will be rebooted. | public static function clearBootedModels()
{
static::$booted = [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function clearBootedModels();",
"public function clearModels();",
"protected static function booted(): void\n {\n static::deleting(function (Model $model) {\n $model->removeAllImages();\n });\n }",
"protected function forgetAddedModels()\n {\n $this->qua... | [
"0.8700318",
"0.72563404",
"0.66823345",
"0.66046894",
"0.6544441",
"0.63992864",
"0.63572377",
"0.6318385",
"0.6299947",
"0.62808114",
"0.6279543",
"0.6196935",
"0.616978",
"0.6148886",
"0.6119523",
"0.61061716",
"0.6072173",
"0.6064169",
"0.6059776",
"0.6058886",
"0.6057026... | 0.89517516 | 1 |
Returns the directory name corresponding to the object type. For pages the directory name is "pages", for layouts "layouts", etc. | public function getObjectTypeDirName()
{
return $this->dirName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function dirName()\n {\n return str_plural(strtolower($this->itemClass()));\n }",
"private function _getTypeDirectory( $type )\n\t\t{\n\t\t\t$config = Config::getInstance();\n\t\t\t$directory = null;\n\t\t\tswitch ( $type ) {\n\t\t\t\tcase 'installed':\n\t\t\t\tcase 'uninstalled':\n\t\t\t\t\... | [
"0.69865394",
"0.67635524",
"0.6652575",
"0.6649803",
"0.66300887",
"0.6527499",
"0.6215122",
"0.61566806",
"0.61389947",
"0.6063629",
"0.6054397",
"0.6043413",
"0.60420436",
"0.6017169",
"0.60124964",
"0.6008611",
"0.59829533",
"0.59541494",
"0.59476876",
"0.593549",
"0.5918... | 0.8279505 | 0 |
Returns the maximum directory nesting allowed by this template. | public function getMaxNesting()
{
return $this->maxNesting;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function maxDepth()\n {\n if ($this->maxDepth === null) {\n return static::DEFAULT_MAX_DEPTH;\n }\n\n return $this->maxDepth;\n }",
"public static function getMaximumPathLength() {}",
"public function getDepth(): int\n {\n return count(explode('/', $this->... | [
"0.6367185",
"0.6237618",
"0.6235076",
"0.6183445",
"0.6144252",
"0.612431",
"0.60825133",
"0.59626013",
"0.59626013",
"0.5907675",
"0.5822726",
"0.5790901",
"0.57689506",
"0.57647324",
"0.5746729",
"0.572063",
"0.56975687",
"0.56738526",
"0.56526834",
"0.5572018",
"0.5532492... | 0.7226511 | 0 |
Returns true if the object was loaded from the cache. | public function isLoadedFromCache()
{
return $this->loadedFromCache;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function loadCacheData()\n\t{\n\t\t//is it enabled?\n\t\tif ($this->useObjectCaching)\n\t\t{\n\t\t\t//get our cache data... is it there?\n\t\t\t$data = $this->getCache();\n\t\t\tif ($data)\n\t\t\t{\n\t\t\t\t//load it, and we're good.\n\t\t\t\t$this->hydrate($data);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n... | [
"0.8096812",
"0.7640676",
"0.7482657",
"0.74748504",
"0.74692136",
"0.74615556",
"0.74591196",
"0.7450629",
"0.7428408",
"0.74026287",
"0.7331308",
"0.7271206",
"0.72503763",
"0.72425246",
"0.7219823",
"0.71931124",
"0.7180526",
"0.71777904",
"0.71598095",
"0.7149306",
"0.714... | 0.8554659 | 0 |
Get the fillable attributes of a given array. | protected function fillableFromArray(array $attributes)
{
$defaults = ['fileName'];
if (count($this->fillable) > 0) {
return array_intersect_key(
$attributes,
array_flip(array_merge($defaults, $this->fillable))
);
}
return $at... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function fillableFromArray(array $attributes)\n {\n if (count($this->fillable) > 0 && !static::$unguarded)\n return array_intersect_key($attributes, array_flip($this->fillable));\n\n return $attributes;\n }",
"protected function fillableFromArray(array $attributes)\n {... | [
"0.7485169",
"0.7431268",
"0.65387875",
"0.6369011",
"0.6369011",
"0.61958706",
"0.61957335",
"0.61303127",
"0.61303127",
"0.61303127",
"0.61303127",
"0.61298674",
"0.6035263",
"0.60131687",
"0.59887",
"0.5970922",
"0.5961864",
"0.59574443",
"0.59520197",
"0.59307975",
"0.592... | 0.7535031 | 0 |
Convert the model's attributes to an array. | public function attributesToArray()
{
$attributes = $this->attributes;
$mutatedAttributes = $this->getMutatedAttributes();
// We want to spin through all the mutated attributes for this model and call
// the mutator for the attribute. We cache off every mutated attributes so
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function attributesToArray()\n {\n $attributes = $this->getArrayableAttributes();\n\n return $attributes;\n }",
"public function toArray()\n {\n return $this->attributesToArray();\n }",
"public function toArray()\n {\n return $this->attributesToArray();\n }"... | [
"0.80428535",
"0.7896457",
"0.7896457",
"0.78604525",
"0.7803931",
"0.77749693",
"0.77749693",
"0.77749693",
"0.77749693",
"0.7734881",
"0.77163154",
"0.77087635",
"0.7693619",
"0.7691863",
"0.763805",
"0.7616516",
"0.7616516",
"0.7614991",
"0.7529832",
"0.7518526",
"0.746092... | 0.80184025 | 1 |
Determine if a get mutator exists for an attribute. | public function hasGetMutator($key)
{
return $this->methodExists('get'.Str::studly($key).'Attribute');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasGetMutator($key)\n {\n return method_exists($this, 'get' . Str::studly($key) . 'Attribute');\n }",
"public function hasGetMutator($key)\n {\n return method_exists($this, 'get' . studly_case($key) . 'Attribute');\n }",
"public function hasGetMutator($key)\n {\n ... | [
"0.7768784",
"0.77530867",
"0.7690894",
"0.7690894",
"0.7635883",
"0.75039136",
"0.72599494",
"0.711803",
"0.65001476",
"0.64817536",
"0.6368092",
"0.63547635",
"0.6345683",
"0.6345683",
"0.6326818",
"0.62785614",
"0.6278046",
"0.62641793",
"0.6239149",
"0.62237495",
"0.61550... | 0.7816478 | 0 |
Determine if a set mutator exists for an attribute. | public function hasSetMutator($key)
{
return $this->methodExists('set'.Str::studly($key).'Attribute');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . Str::studly($key) . 'Attribute');\n }",
"public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . studly_case($key) . 'Attribute');\n }",
"public function hasSetMutator($key)\n {\n ... | [
"0.7262567",
"0.72312343",
"0.7197799",
"0.7197799",
"0.6677842",
"0.664554",
"0.6518645",
"0.65154284",
"0.64689076",
"0.64689076",
"0.64452624",
"0.62474126",
"0.6231419",
"0.62125957",
"0.6177204",
"0.6177204",
"0.61649835",
"0.6161747",
"0.6148717",
"0.61353886",
"0.61332... | 0.7232248 | 1 |
Sync the original attributes with the current. | public function syncOriginal()
{
$this->original = $this->attributes;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final public function sync() {\n\t\t$this->original = $this->attributes;\n\n\t\treturn true;\n\t}",
"public function syncOriginal()\n {\n $this->original = $this->toArray();\n\n return $this;\n }",
"public function syncOriginal(): Model\n {\n $this->original = $this->getAttributes... | [
"0.74845415",
"0.680344",
"0.6802746",
"0.6786014",
"0.63640785",
"0.63399667",
"0.63048583",
"0.60904676",
"0.6056318",
"0.6033761",
"0.590117",
"0.5896081",
"0.589403",
"0.5851019",
"0.58411443",
"0.5820354",
"0.5798619",
"0.5727194",
"0.57045454",
"0.5635495",
"0.56159526"... | 0.74856496 | 0 |
Sync a single original attribute with its current value. | public function syncOriginalAttribute($attribute)
{
$this->original[$attribute] = $this->attributes[$attribute];
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final public function sync() {\n\t\t$this->original = $this->attributes;\n\n\t\treturn true;\n\t}",
"public function syncOriginal()\n {\n $this->original = $this->attributes;\n\n return $this;\n }",
"public function syncOriginalAttribute(string $attribute): Model\n {\n return $thi... | [
"0.6735541",
"0.64017737",
"0.63092816",
"0.6272924",
"0.6106774",
"0.5659271",
"0.56214356",
"0.5590092",
"0.5521869",
"0.5507411",
"0.5492286",
"0.546862",
"0.54089236",
"0.5399785",
"0.53850245",
"0.53487664",
"0.532935",
"0.53268903",
"0.53224164",
"0.53037477",
"0.528034... | 0.6416313 | 1 |
Determine if the new and old values for a given key are numerically equivalent. | protected function originalIsNumericallyEquivalent($key)
{
$current = $this->attributes[$key];
$original = $this->original[$key];
return is_numeric($current) && is_numeric($original) && strcmp((string) $current, (string) $original) === 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function originalIsNumericallyEquivalent($key)\n {\n $current = $this->attributes[$key];\n $original = $this->original[$key];\n\n // Date comparison.\n if (in_array($key, $this->getDates())) {\n $current = $current instanceof Timestamp ? $this->asDateTime($curren... | [
"0.7722886",
"0.60779005",
"0.545446",
"0.53319126",
"0.5328782",
"0.5290431",
"0.51420885",
"0.51365614",
"0.5067573",
"0.5048477",
"0.49768052",
"0.49618724",
"0.49539602",
"0.49462232",
"0.49450853",
"0.49256834",
"0.49012312",
"0.48968127",
"0.48750275",
"0.48686787",
"0.... | 0.72838795 | 1 |
Register a model event with the dispatcher. | protected static function registerModelEvent($event, $callback, $priority = 0)
{
if (isset(static::$dispatcher)) {
$name = get_called_class();
static::$dispatcher->listen("halcyon.{$event}: {$name}", $callback, $priority);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getModelEvents();",
"public function registerDocumentModelEvent(ModelEvent $event)\n {\n if (!$this->enabled) {\n return;\n }\n if ((!($dbEvents = $this->getConfigValue('database', 'array')))) {\n return;\n }\n if (!in_array($event->getA... | [
"0.6501016",
"0.6453853",
"0.60835004",
"0.60735255",
"0.6029853",
"0.56127524",
"0.55811983",
"0.5530698",
"0.54611063",
"0.5442325",
"0.54347765",
"0.5424129",
"0.5386761",
"0.53820634",
"0.53743255",
"0.53215265",
"0.5313584",
"0.5302551",
"0.5290838",
"0.5286662",
"0.5283... | 0.6459546 | 1 |
Get the current datasource name for the model. | public function getDatasourceName()
{
return $this->datasource;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getDataSourceName() {\r\n // Example: Use a local SQLite3 database\r\n return 'sqlite:' . dirname(__FILE__) . '/counter.sqlite3';\r\n \r\n // Example use mySQL\r\n // return 'mysql:host=localhost;port=3306;dbname=demo';\r\n }",
"public static function getDataSourceKey()\n ... | [
"0.7160904",
"0.7128389",
"0.7120785",
"0.6970749",
"0.6970749",
"0.686984",
"0.6869673",
"0.6817336",
"0.67749864",
"0.6697576",
"0.65902865",
"0.64754593",
"0.64501506",
"0.644604",
"0.639903",
"0.63811195",
"0.6365092",
"0.63477874",
"0.634556",
"0.63448626",
"0.6340736",
... | 0.8409692 | 0 |
Resolve a datasource instance. | public static function resolveDatasource($datasource = null)
{
return static::$resolver->datasource($datasource);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getDatasourceResolver()\n {\n return static::$resolver;\n }",
"public function getDatasource()\n {\n return static::resolveDatasource($this->datasource);\n }",
"public static function getConnectionResolver();",
"public static function getDataSource()\n {\n ... | [
"0.6254908",
"0.5897958",
"0.5827101",
"0.5559807",
"0.55424845",
"0.55424845",
"0.551143",
"0.54690635",
"0.54495233",
"0.5303409",
"0.53020084",
"0.53020084",
"0.52671164",
"0.5264699",
"0.5243511",
"0.52429086",
"0.52256596",
"0.52160084",
"0.520504",
"0.509803",
"0.508639... | 0.73382974 | 0 |
Get the datasource resolver instance. | public static function getDatasourceResolver()
{
return static::$resolver;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getConnectionResolver()\n {\n return static::$resolver;\n }",
"public static function getConnectionResolver()\n {\n return static::$resolver;\n }",
"public function getConnectionResolver()\n {\n return $this->resolver;\n }",
"public static functio... | [
"0.74746126",
"0.74746126",
"0.73314303",
"0.7196785",
"0.6959201",
"0.6614767",
"0.6291765",
"0.61531407",
"0.61505747",
"0.6123957",
"0.61236215",
"0.6103618",
"0.6086765",
"0.6069854",
"0.6024955",
"0.6020866",
"0.6020866",
"0.5958177",
"0.5931751",
"0.5924971",
"0.5905664... | 0.8466631 | 0 |
Set the datasource resolver instance. | public static function setDatasourceResolver(Resolver $resolver)
{
static::$resolver = $resolver;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function setConnectionResolver(Resolver $resolver);",
"public function set_resolver(Resolver $resolver);",
"public static function setConnectionResolver(Resolver $resolver)\n {\n static::$resolver = $resolver;\n }",
"public static function getDatasourceResolver()\n {\n re... | [
"0.70538473",
"0.6986677",
"0.6957359",
"0.6792438",
"0.6722543",
"0.66289234",
"0.66157186",
"0.6512312",
"0.6101639",
"0.5945581",
"0.59298414",
"0.59298414",
"0.589466",
"0.58686596",
"0.58485174",
"0.581797",
"0.57792646",
"0.5719786",
"0.5640163",
"0.5609125",
"0.5604885... | 0.7941913 | 0 |
Unset the datasource resolver for models. | public static function unsetDatasourceResolver()
{
static::$resolver = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function unsetDalResolver()\n {\n static::$_resolver = null;\n }",
"public static function unsetConnectionResolver()\n {\n static::$resolver = null;\n }",
"public static function unsetConnectionResolver()\n {\n static::$resolver = null;\n }",
"public static functi... | [
"0.6991766",
"0.67543536",
"0.67543536",
"0.65499735",
"0.60841894",
"0.5916611",
"0.5754598",
"0.5667877",
"0.5643645",
"0.56382513",
"0.5610049",
"0.5541841",
"0.5490016",
"0.5461307",
"0.5368551",
"0.53546363",
"0.53523505",
"0.5347345",
"0.53370273",
"0.53142",
"0.5304529... | 0.7958001 | 0 |
Get the event dispatcher instance. | public static function getEventDispatcher()
{
return static::$dispatcher;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getEventDispatcherService()\n {\n if (isset($this->shared['event_dispatcher'])) return $this->shared['event_dispatcher'];\n\n $class = $this->getParameter('event_dispatcher.class');\n $instance = new $class($this);\n $this->shared['event_dispatcher'] = $instance;\n... | [
"0.81160486",
"0.80278236",
"0.79869395",
"0.7969047",
"0.7869225",
"0.785308",
"0.7763506",
"0.77522147",
"0.75496876",
"0.75269914",
"0.7480979",
"0.7477476",
"0.7353422",
"0.72507995",
"0.71986276",
"0.71884865",
"0.71487474",
"0.70782775",
"0.70391905",
"0.70391905",
"0.7... | 0.80964833 | 1 |
Unset the event dispatcher for models. | public static function unsetEventDispatcher()
{
static::$dispatcher = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function unsetEventDispatcher()\n {\n $this->events = null;\n }",
"public function unsetDispatcher(): void\n {\n $this->dispatcher = null;\n }",
"public function reset() {\n $this->_events->reset();\n }",
"public function unsetEventTypes(): void\n {\n $thi... | [
"0.7311602",
"0.67983913",
"0.63313633",
"0.62176996",
"0.6075609",
"0.6002631",
"0.58648247",
"0.57652485",
"0.57640064",
"0.57521355",
"0.57027155",
"0.5669808",
"0.5664629",
"0.5622729",
"0.5581341",
"0.55378693",
"0.55290747",
"0.5523264",
"0.552272",
"0.5500164",
"0.5478... | 0.71739745 | 1 |
Get the cache manager instance. | public static function getCacheManager()
{
return static::$cache;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getCacheManager()\n {\n if (!$this->cacheManager) {\n $this->cacheManager = $this->getContainer()->get('fos_http_cache.cache_manager');\n }\n\n return $this->cacheManager;\n }",
"protected function cache(): CacheManager\n {\n $cache = cache();\n ... | [
"0.8094249",
"0.76013684",
"0.74770063",
"0.72327316",
"0.72218835",
"0.7214601",
"0.71625143",
"0.71580964",
"0.7146208",
"0.70696044",
"0.70076454",
"0.6980484",
"0.6976852",
"0.69767827",
"0.69588304",
"0.69588304",
"0.69588304",
"0.69519055",
"0.69373894",
"0.68777776",
"... | 0.78533554 | 1 |
Set the cache manager instance. | public static function setCacheManager($cache)
{
static::$cache = $cache;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setManager( $manager )\n {\n $this->manager = $manager;\n }",
"public function setCache() {\n \n // Set our cache to an instance of Cache\n $this->oCache = Cache::getInstance();\n \n // Return instance\n return $this;\n... | [
"0.6428454",
"0.63055575",
"0.6299985",
"0.6266025",
"0.62029254",
"0.6153924",
"0.6131992",
"0.6082044",
"0.6079378",
"0.60624725",
"0.59687716",
"0.59674877",
"0.5965505",
"0.5912485",
"0.589939",
"0.5892556",
"0.5889972",
"0.5887504",
"0.588552",
"0.58648443",
"0.58599263"... | 0.6834452 | 0 |
Unset the cache manager for models. | public static function unsetCacheManager()
{
static::$cache = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _clearCache() {\n\t\t\tCache::clear(false, '_cake_model_');\n\t\t\tClassRegistry::flush();\n\t\t}",
"public function clearCache()\n {\n flush_model_cache($this);\n }",
"public static function clearCache(){\n\t\t\n\t\t\\GO::config()->getCacheFolder(false)->delete();\t\t\n\t\t\n\t... | [
"0.6979484",
"0.67925805",
"0.67106956",
"0.6576163",
"0.6487907",
"0.64638853",
"0.63941264",
"0.63070506",
"0.6282042",
"0.6263471",
"0.62426007",
"0.6231064",
"0.61633855",
"0.6141962",
"0.613829",
"0.6118608",
"0.6101948",
"0.6080217",
"0.6071932",
"0.60490143",
"0.604901... | 0.73109895 | 0 |
Get the mutated attributes for a given instance. | public function getMutatedAttributes()
{
$class = get_class($this);
if (!isset(static::$mutatorCache[$class])) {
static::cacheMutatedAttributes($class);
}
return static::$mutatorCache[$class];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMutatedAttributes()\n {\n $class = get_class($this);\n\n if (!isset(static::$mutatorCache[$class]))\n static::cacheMutatedAttributes($class);\n\n return static::$mutatorCache[$class];\n }",
"public function getMutatedAttributes()\n {\n $mutAt = $... | [
"0.8180421",
"0.7936646",
"0.7774545",
"0.72141427",
"0.6458633",
"0.6380718",
"0.6332305",
"0.6315623",
"0.63148695",
"0.6247602",
"0.6207506",
"0.6207506",
"0.6207506",
"0.6207506",
"0.6207506",
"0.6207506",
"0.6207506",
"0.6207506",
"0.6207506",
"0.6207506",
"0.6207506",
... | 0.81447494 | 1 |
Extract and cache all the mutated attributes of a class. | public static function cacheMutatedAttributes($class)
{
$mutatedAttributes = [];
// Here we will extract all of the mutated attributes so that we can quickly
// spin through them after we export models to their array form, which we
// need to be fast. This'll let us know the attribu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function cacheMutatedAttributes($class)\n {\n $mutatedAttributes = [];\n\n // Here we will extract all of the mutated attributes so that we can quickly\n // spin through them after we export models to their array form, which we\n // need to be fast. This'll let us know ... | [
"0.79108083",
"0.76778585",
"0.7668186",
"0.7661906",
"0.74005735",
"0.69607615",
"0.6657722",
"0.6311943",
"0.6294863",
"0.6174845",
"0.6158515",
"0.6082689",
"0.60549265",
"0.60042226",
"0.5920544",
"0.58771735",
"0.5847044",
"0.57913285",
"0.5782104",
"0.5662671",
"0.56579... | 0.79209965 | 0 |
Update Gal Image Caption | public function updateGalCaption($galImageID)
{
// Get user input
$caption = $_POST['caption'];
// Update DB
$this->db->update('galImage', array('caption' => $caption), "`galImageID` = ".$galImageID);
echo json_encode(array('error' => false));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function image_add_caption($html, $id, $caption, $title, $align, $url, $size, $alt = '')\n {\n }",
"public function actionUpdateImageCaption() \r\n {\r\n extract($_POST);\r\n $res=0;\r\n \r\n\r\n $fileMaster= FileMaster::model()->findByPk($id);\r\n ... | [
"0.6862487",
"0.65053725",
"0.62238157",
"0.61842364",
"0.60865736",
"0.6045289",
"0.59946823",
"0.59423345",
"0.57884777",
"0.57455033",
"0.57424396",
"0.57090324",
"0.5696177",
"0.5695939",
"0.5677674",
"0.564076",
"0.56226057",
"0.55413264",
"0.5514369",
"0.55143183",
"0.5... | 0.6788886 | 1 |
Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; | public function setSubject($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Subject::class);
$this->subject = $arr;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setSubject($var)\n {\n GPBUtil::checkString($var, True);\n $this->subject = $var;\n\n return $this;\n }",
"public function setSubject($var)\n {\n GPBUtil::checkString($var, True);\n $this->subject = $var;\n\n return $this;\n }",
"function Su... | [
"0.67051154",
"0.67051154",
"0.62397915",
"0.61822516",
"0.61822516",
"0.61822516",
"0.61764055",
"0.61764055",
"0.61764055",
"0.61764055",
"0.61764055",
"0.61764055",
"0.61764055",
"0.6152795",
"0.6084841",
"0.6022674",
"0.6022352",
"0.60057884",
"0.5988485",
"0.5988485",
"0... | 0.7399568 | 0 |
` for SlsaProvenance. Generated from protobuf field string predicate_type = 3; | public function getPredicateType()
{
return $this->predicate_type;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getXsiTypeName() {\n return \"Predicate\";\n }",
"public function setPredicateType($var)\n {\n GPBUtil::checkString($var, True);\n $this->predicate_type = $var;\n\n return $this;\n }",
"public function getSlsaProvenance()\n {\n return $this->readOneof(5)... | [
"0.60628766",
"0.59220856",
"0.5573107",
"0.4837793",
"0.45543426",
"0.44325393",
"0.4421502",
"0.43902925",
"0.42896333",
"0.42843154",
"0.4241898",
"0.42232013",
"0.41924918",
"0.4179866",
"0.41772372",
"0.41759098",
"0.4161281",
"0.41504654",
"0.4114715",
"0.41031533",
"0.... | 0.59416854 | 1 |
Generated from protobuf field .grafeas.v1.InTotoProvenance provenance = 4; | public function getProvenance()
{
return $this->readOneof(4);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setProvenance($var)\n {\n GPBUtil::checkMessage($var, \\Grafeas\\V1\\InTotoProvenance::class);\n $this->writeOneof(4, $var);\n\n return $this;\n }",
"public function getSlsaProvenance()\n {\n return $this->readOneof(5);\n }",
"public function show(Provena... | [
"0.86480546",
"0.6265936",
"0.5119285",
"0.4937678",
"0.47725877",
"0.47548842",
"0.45455673",
"0.4478809",
"0.43322435",
"0.43037298",
"0.42801547",
"0.42291778",
"0.42053944",
"0.4181276",
"0.41480342",
"0.41445112",
"0.4117383",
"0.4081836",
"0.40627143",
"0.40520898",
"0.... | 0.68928325 | 1 |
Generated from protobuf field .grafeas.v1.InTotoProvenance provenance = 4; | public function setProvenance($var)
{
GPBUtil::checkMessage($var, \Grafeas\V1\InTotoProvenance::class);
$this->writeOneof(4, $var);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProvenance()\n {\n return $this->readOneof(4);\n }",
"public function getSlsaProvenance()\n {\n return $this->readOneof(5);\n }",
"public function show(Provenance $provenance)\n {\n //\n }",
"public function update(Request $request, Provenance $proven... | [
"0.6892416",
"0.62663794",
"0.5119239",
"0.4937939",
"0.4773753",
"0.47563207",
"0.45458546",
"0.44798374",
"0.43313125",
"0.43037367",
"0.42821127",
"0.4229252",
"0.42054564",
"0.41815272",
"0.41488364",
"0.4144229",
"0.41187602",
"0.40831792",
"0.40640992",
"0.40542245",
"0... | 0.8648496 | 0 |
Generated from protobuf field .grafeas.v1.SlsaProvenance slsa_provenance = 5; | public function getSlsaProvenance()
{
return $this->readOneof(5);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setSlsaProvenance($var)\n {\n GPBUtil::checkMessage($var, \\Grafeas\\V1\\SlsaProvenance::class);\n $this->writeOneof(5, $var);\n\n return $this;\n }",
"public function setSlsaProvenanceZeroTwo($var)\n {\n GPBUtil::checkMessage($var, \\Grafeas\\V1\\SlsaProvenan... | [
"0.82513446",
"0.59556067",
"0.57351255",
"0.56474423",
"0.533182",
"0.49478623",
"0.44876257",
"0.42357317",
"0.39970246",
"0.39701355",
"0.39572632",
"0.39508253",
"0.39434958",
"0.39434958",
"0.39381585",
"0.3903843",
"0.38975328",
"0.38828385",
"0.3871688",
"0.38629025",
... | 0.8110073 | 1 |
Generated from protobuf field .grafeas.v1.SlsaProvenance slsa_provenance = 5; | public function setSlsaProvenance($var)
{
GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance::class);
$this->writeOneof(5, $var);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSlsaProvenance()\n {\n return $this->readOneof(5);\n }",
"public function setSlsaProvenanceZeroTwo($var)\n {\n GPBUtil::checkMessage($var, \\Grafeas\\V1\\SlsaProvenanceZeroTwo::class);\n $this->writeOneof(6, $var);\n\n return $this;\n }",
"public funct... | [
"0.8110073",
"0.59556067",
"0.57351255",
"0.56474423",
"0.533182",
"0.49478623",
"0.44876257",
"0.42357317",
"0.39970246",
"0.39701355",
"0.39572632",
"0.39508253",
"0.39434958",
"0.39434958",
"0.39381585",
"0.3903843",
"0.38975328",
"0.38828385",
"0.3871688",
"0.38629025",
"... | 0.82513446 | 0 |
Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; | public function getSlsaProvenanceZeroTwo()
{
return $this->readOneof(6);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setSlsaProvenanceZeroTwo($var)\n {\n GPBUtil::checkMessage($var, \\Grafeas\\V1\\SlsaProvenanceZeroTwo::class);\n $this->writeOneof(6, $var);\n\n return $this;\n }",
"public function getSlsaProvenance()\n {\n return $this->readOneof(5);\n }",
"public funct... | [
"0.885856",
"0.598365",
"0.5416365",
"0.43689844",
"0.4243492",
"0.4190934",
"0.41383106",
"0.41075718",
"0.41056344",
"0.40692857",
"0.40600303",
"0.40562642",
"0.4025134",
"0.40137738",
"0.39824584",
"0.39663893",
"0.3960904",
"0.3954369",
"0.39019033",
"0.3899117",
"0.3898... | 0.8590598 | 1 |
Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; | public function setSlsaProvenanceZeroTwo($var)
{
GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo::class);
$this->writeOneof(6, $var);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSlsaProvenanceZeroTwo()\n {\n return $this->readOneof(6);\n }",
"public function getSlsaProvenance()\n {\n return $this->readOneof(5);\n }",
"public function setSlsaProvenance($var)\n {\n GPBUtil::checkMessage($var, \\Grafeas\\V1\\SlsaProvenance::class);\n... | [
"0.8590371",
"0.59883463",
"0.5419901",
"0.43704906",
"0.42466873",
"0.41912127",
"0.41371742",
"0.41075215",
"0.4107362",
"0.4069287",
"0.4058884",
"0.40563935",
"0.40237805",
"0.40135035",
"0.39819425",
"0.39711174",
"0.3960179",
"0.3952438",
"0.39012656",
"0.39007732",
"0.... | 0.8856708 | 0 |
Function: reads all publications from the current pubtype list and creates an array with previous and next links for browsing through the publications. The first and the last link go the the list of the pubtype. Usage: Customize the settings below. There's a customization area below. Don't edit anything outside of this... | function smarty_function_pagesetter_pubBrowser($args, &$smarty)
{
//*****************************************
// Customization area
//*****************************************
// Define the text attributes for the links (size, color...)
$style = "color: black; text-decoration: none;";
// Define a symbol. It is d... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPagePublishableList($page = 1, $format = 0, $msv=1){\n\t\t\n\t\tglobal $db;\n\t\t//print \"gppL($page, $format, $msv)<br />\";\n\t\t$this->from = $this->getPerPage()*($this->getPage()-1);\n\t\t$this->to = $this->getPerPage()*$this->getPage();\n\t\t\n\t\tswitch($format){\n\t\t\tcase 'panel':\n\t\... | [
"0.5744485",
"0.57262945",
"0.57041144",
"0.5616822",
"0.5608698",
"0.5559315",
"0.55447",
"0.5514282",
"0.5469317",
"0.5389588",
"0.5385524",
"0.5381958",
"0.5378772",
"0.53763646",
"0.5365509",
"0.5351702",
"0.5324719",
"0.52980936",
"0.5293411",
"0.5272681",
"0.526629",
... | 0.6487439 | 0 |
Set if the payment method should be enforced. This field can be used to send or, after a failed payment, the consumer can or can not select another payment method to still pay the payment. Valid values are: static::PAYMENT_METHOD_ENFORCE_ONCE static::PAYMENT_METHOD_ENFORCE_ALWAYS In the case of FORCE_ONCE, the indicate... | public function setEnforcePaymentMethod($value)
{
return $this->setParameter('enforcePaymentMethod', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setDefaultActivePaymentMethod()\n {\n $criteria = new CDbCriteria;\n $criteria->select = 't.name, t.value';\n $criteria->condition = \"t.name LIKE 'payment_method_%' AND t.value = 1\";\n\n $data = Option::model()->findAll($criteria);\n\n $payment_method_options... | [
"0.5388515",
"0.534212",
"0.52513963",
"0.5211061",
"0.51993185",
"0.5190853",
"0.50417364",
"0.5037711",
"0.50114244",
"0.48525178",
"0.4734758",
"0.47331938",
"0.47291714",
"0.470839",
"0.47006637",
"0.46893728",
"0.46621343",
"0.46448672",
"0.46322578",
"0.46276504",
"0.46... | 0.6538562 | 0 |
The the input, rules and custom messages. The class, custom and config messages will be merged at this point. | public function __construct($input, $rules, $messages = array())
{
$this->input = $input;
$this->rules = $rules;
$this->messages = array_merge($this->messages, (array) Config::get('validator'), $messages);
$this->process();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function setupRules()\n {\n // Validator::extend('rule', 'App\\Support\\Rules\\Rule@validate');\n // Validator::replacer('rule', 'App\\Support\\Rules\\Rule@message');\n }",
"public function __construct()\n {\n $lines = require __DIR__ .DS .'messages.php';\n\n $this->m... | [
"0.5571182",
"0.5570542",
"0.53720295",
"0.5334528",
"0.53065085",
"0.5226777",
"0.52040917",
"0.51960176",
"0.51867706",
"0.5170089",
"0.51700413",
"0.5146467",
"0.5121792",
"0.50972146",
"0.5080358",
"0.5079079",
"0.5071267",
"0.50671375",
"0.5060158",
"0.50416815",
"0.5016... | 0.58393407 | 0 |
Get all errors for a specfic key. Add formatting to $wrap to have output 'wrapped' (the original message will be replaced at :message): // Example using required: $validator>get('username', 'Failed: :message'); // Yields: Failed: The username field is required | public function get($key, $wrap = ':message')
{
$result = array();
foreach (($this->has($key) ? $this->errors[$key] : array()) as $error)
{
$result[] = str_replace(':message', $error, $wrap);
}
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get($key = null)\n {\n return $key ? $this->errors[$key] : $this->errors;\n }",
"public function all($wrap = ':message')\n {\n $result = array();\n\n foreach ($this->errors as $key => $error)\n {\n $result[$key] = $this->get($key, $wrap);\n }\n\n re... | [
"0.6994177",
"0.65171075",
"0.62357885",
"0.61995965",
"0.6124119",
"0.59410465",
"0.5878711",
"0.5747908",
"0.5709658",
"0.5597807",
"0.55976063",
"0.55904186",
"0.55904186",
"0.55904186",
"0.55904186",
"0.55863374",
"0.55746555",
"0.5570421",
"0.5558939",
"0.55123585",
"0.5... | 0.79381937 | 0 |
Does a value only contain alphanumeric characters and hyphen $rule = array('username' => 'alphanumhyphen'); | private function process_alphanumhyphen($value)
{
return ! preg_match('/[^a-zA-Z0-9-]/', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static function _alphaNumeric(){\n if (self::$_ruleValue) {\n $str = trim(self::$_elementValue);\n if (!preg_match('/[a-zA-z0-9]/', $str)) {\n self:: setErrorMessage(\"Alphanumeric only\");\n self::setInvalidFlag(true);\n } else {\n ... | [
"0.72674924",
"0.72103804",
"0.71864104",
"0.7124771",
"0.71141285",
"0.7093402",
"0.700634",
"0.70035607",
"0.6901776",
"0.68929225",
"0.68920124",
"0.6830163",
"0.6808117",
"0.6805563",
"0.67930293",
"0.67650265",
"0.6763107",
"0.67511755",
"0.67378145",
"0.6731889",
"0.669... | 0.742126 | 0 |
Wrapper for is_array $rule = array('ids' => array('1','2','3'); | private function process_array($value) {
return is_array($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function makeIsArrayValidator() : Closure\n {\n return function ($value) {\n if (!is_array($value)) {\n return [\n 'message' => \"{$value} is not an array\",\n 'result' => false\n ];\n } else {\n ... | [
"0.60809493",
"0.5999555",
"0.5885403",
"0.5848715",
"0.58381534",
"0.5760799",
"0.574287",
"0.5729256",
"0.57115895",
"0.5694543",
"0.563859",
"0.56356615",
"0.5593658",
"0.554811",
"0.5513434",
"0.5513434",
"0.5480104",
"0.5462608",
"0.54562473",
"0.54333705",
"0.54333705",... | 0.61283475 | 0 |
Is a value 'in' a given set of values $rule = array('id' => 'in:1,2,3'); | private function process_in($value, $param = null)
{
return in_array($value, explode(',', $param));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function in(array $values);",
"function has_inclusion_in($value,$set) {\n\t\treturn in_array($value,$set);\n\t\t}",
"function has_inclusion_in($value, $set) {\n\treturn in_array($value, $set);\n}",
"function has_inclusion_in($value, $set) {\n\treturn in_array($value, $set);\n}",
"public function in(... | [
"0.73466647",
"0.6641783",
"0.66189027",
"0.66189027",
"0.66184",
"0.658305",
"0.6574956",
"0.65687126",
"0.6516381",
"0.6437039",
"0.63461596",
"0.63260674",
"0.62862796",
"0.6252471",
"0.62310106",
"0.6228441",
"0.61634755",
"0.61172915",
"0.61148363",
"0.61049634",
"0.6091... | 0.6676657 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.