query stringlengths 7 5.25k | document stringlengths 15 1.06M | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Get the Project (aka list) that tasks belongs to | function project () {
return $this->belongsTo('App\Project');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProjects();",
"function getProjectList() {\n global $logger;\n\n $projects = Project::getProjects();\n if($projects != NULL) {\n $extproj_id = Config::getInstance()->getValue(Config::id_externalTasksProject);\n $smartyProjects = array();\n foreach($projects as $id => $name... | [
"0.7634686",
"0.75420916",
"0.73413384",
"0.7323148",
"0.7288481",
"0.72396207",
"0.71639544",
"0.71624696",
"0.71464735",
"0.70548004",
"0.7042036",
"0.69417673",
"0.6915769",
"0.68842375",
"0.68442404",
"0.6798166",
"0.67946637",
"0.67923003",
"0.6785621",
"0.6777376",
"0.6... | 0.0 | -1 |
Method for displaying the location his inventory. | public function index(Item $items): Renderable
{
$items = $items->userLocation()->paginate();
return view('inventory.coordinator.index', compact('items'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(InventoryLocation $location)\n {\n return view('ims::inventory_location.show', compact('location'));\n }",
"public function show(Inventory $inventory)\n {\n //\n }",
"public function show()\n {\n return view('inventory::show');\n }",
"function showL... | [
"0.71094733",
"0.70829487",
"0.67656285",
"0.6498799",
"0.6498799",
"0.64895517",
"0.6260395",
"0.6222347",
"0.6159522",
"0.6159522",
"0.6159522",
"0.6048778",
"0.6016226",
"0.6001091",
"0.5986605",
"0.59700495",
"0.593639",
"0.59221834",
"0.59189767",
"0.58934575",
"0.588222... | 0.0 | -1 |
Method for searching items in the application. | public function search(Request $request, Item $items): Renderable
{
$items = $items->userLocation()->where('item_code', 'LIKE', "%{$term}%")
->orWhere('name', 'LIKE', "%{$term}%");
return view('inventory.index', compact('items'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function search_items()\n\t\t{\n\t\t\t$inputsearch = str_replace(\"\\\\\",\"\\\\\\\\\",$this->inputsearch); // SRX_BACKSLASH_FIX_ISSUE\n\t\t\tif(substr($this->inputsearch,0,1) == \"\\\\\")\n\t\t\t{\n\t\t\t\t$pre_jocker = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pre_jocker = '%';\n\t\t\t}\n\t\t\t\n\t\t\t... | [
"0.7736727",
"0.70116454",
"0.70116454",
"0.70027107",
"0.6957029",
"0.69046044",
"0.6824751",
"0.67501706",
"0.6626849",
"0.6626849",
"0.6602712",
"0.6602712",
"0.65696985",
"0.64953846",
"0.64404714",
"0.64404714",
"0.63912034",
"0.6307893",
"0.6307891",
"0.62957203",
"0.62... | 0.62105924 | 24 |
Method for displaying the create view of new item. | public function create(): Renderable
{
$categories = Category::pluck('name', 'id');
return view('inventory.coordinator.create', compact('categories'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n\t{\n\t\treturn view('item.create');\n\t}",
"public function create()\n {\n /* display create form */\n return view('item.item');\n }",
"public function create()\n {\n //\n return view('backend.item.new');\n }",
"public function create()\n ... | [
"0.8521509",
"0.8513242",
"0.8471215",
"0.84537995",
"0.8431904",
"0.8402875",
"0.8331901",
"0.8313873",
"0.8249103",
"0.824609",
"0.8226069",
"0.8134991",
"0.8131095",
"0.812354",
"0.812354",
"0.8118362",
"0.80606484",
"0.7960095",
"0.7900867",
"0.7866851",
"0.7858469",
"0... | 0.0 | -1 |
Method for storing the new item in the application. | public function store(ItemFormRequest $request, Item $item): RedirectResponse
{
$request->merge(['item_code' => $item->generateItemCode()]);
DB::transaction(static function () use ($request, $item): void {
$location = auth()->user()->location->id;
$item = $item->create($request->except(['location', 'category']));
$item->location()->associate($location)->save();
$item->category()->associate($request->category)->save();
flash(ucfirst($item->name) . ' is toegevoegd in de applicatie');
});
return redirect()->route('coordinator.home');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createNewItem();",
"public function insert()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->newItemEntry();\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $this->getEntry()->setItemType($this->_getItemT... | [
"0.7153127",
"0.6742037",
"0.6681948",
"0.65785134",
"0.6573818",
"0.65452904",
"0.65388566",
"0.65338904",
"0.652992",
"0.6483176",
"0.6462975",
"0.64616394",
"0.6441762",
"0.6386628",
"0.63806474",
"0.63806474",
"0.63806474",
"0.63798577",
"0.63760185",
"0.6335225",
"0.6319... | 0.0 | -1 |
Get the created at in a more readable userfriendly format | public function getDateCreatedAttribute()
{
return Carbon::parse($this->created_at)->format('d-m-Y');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCreatedAtText()\n {\n return Yii::$app->getFormatter()->asDateTime($this->created_at);\n }",
"function getFormattedCreatedDateTime()\r\n {\r\n return $this->created_at->format('d/m/Y H:i:s');\r\n }",
"public function getFormattedCreatedAt(): string\n {\n\n ... | [
"0.8116333",
"0.8014908",
"0.7867258",
"0.78535014",
"0.77972764",
"0.77972764",
"0.77828866",
"0.7692976",
"0.7689015",
"0.765734",
"0.7614347",
"0.7614347",
"0.7608014",
"0.75539625",
"0.75257903",
"0.7497665",
"0.74621",
"0.7442",
"0.7442",
"0.74393976",
"0.74393976",
"0... | 0.0 | -1 |
Get the code attribute | public function getCodeAttribute()
{
return $this->id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCode() {\n return @$this->attributes['code'];\n }",
"public function getAttributeCode()\r\n {\r\n return $this->getAttribute()->getAttributeCode();\r\n }",
"public function get_code() {\n\t\treturn $this->code;\n\t}",
"public function getCode()\n {\n return $this... | [
"0.8766521",
"0.8017696",
"0.7929307",
"0.7892651",
"0.7877565",
"0.78488374",
"0.78488374",
"0.78488374",
"0.78488374",
"0.78488374",
"0.78488374",
"0.78412217",
"0.78412217",
"0.78412217",
"0.7833364",
"0.7825513",
"0.7825513",
"0.7820288",
"0.7820288",
"0.7820288",
"0.7805... | 0.71291703 | 84 |
Many to many relation with users departments | public function users() : BelongsToMany
{
return $this->belongsToMany(User::class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userdepartments()\n {\n return $this->belongsToMany(\n config('core.acl.department'), \n config('core.acl.user_role_department')\n )->withPivot('user_id');\n }",
"public function departments()\n {\n return $this->belongsToMany('App\\Models\\Depa... | [
"0.7609636",
"0.7300985",
"0.7280795",
"0.72631794",
"0.68693084",
"0.664126",
"0.65675545",
"0.6417519",
"0.62982017",
"0.6127191",
"0.60717773",
"0.6062713",
"0.5999376",
"0.5984964",
"0.5959175",
"0.59463763",
"0.5932918",
"0.5917276",
"0.59156764",
"0.5893821",
"0.5888364... | 0.5584343 | 68 |
Get minimized values for request body | public function getValues(): stdClass
{
$res = [];
foreach (get_object_vars($this) as $attrib => $value)
{
if (!is_null($value))
{
if ($value instanceof self)
{
$value = $value->getValues();
}
$res[$attrib] = $value;
}
}
return (object) $res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getRequestBody() {}",
"abstract public function getRequestBody();",
"public function body()\n {\n $entityBody = file_get_contents('php://input');\n\n foreach ((array)json_decode($entityBody) as $field => $value) {\n $this->requestStack[$field] = $value;\n ... | [
"0.65630114",
"0.6321832",
"0.6314384",
"0.6240643",
"0.6147378",
"0.6140751",
"0.6107435",
"0.6089362",
"0.6087342",
"0.60554665",
"0.6049181",
"0.6024815",
"0.60130256",
"0.5954696",
"0.5914939",
"0.58982086",
"0.58672243",
"0.5860333",
"0.58530796",
"0.5847302",
"0.5835988... | 0.0 | -1 |
Determine if the user is authorized to make this request. | public function authorize()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }"... | [
"0.8401071",
"0.8377486",
"0.8377486",
"0.8344406",
"0.8253731",
"0.824795",
"0.8213121",
"0.8146598",
"0.81115526",
"0.8083369",
"0.7991986",
"0.79907674",
"0.79836637",
"0.79604936",
"0.79516214",
"0.79494005",
"0.79265946",
"0.7915068",
"0.79001635",
"0.7894822",
"0.789145... | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
return [
"add_member" => [
'required',
'exists:users,user_name',
function ($attribute, $value, $fail) {
$member = User::where('user_name', $value)->first();
if (isset($member->team_id) && $member->team_id == Auth::user()->team_id) {
return $fail('既にチームに所属しています。');
}
if (isset($member->team_id) && $member->team_id != Auth::user()->team_id) {
return $fail('既に他のチームに所属しています。');
}
if (isset($member->child_id) && $member->child->team->id != Auth::user()->team_id) {
return $fail("既に他のチームの部門に所属しています。");
}
}
],
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the sche... | [
"0.8342703",
"0.80143493",
"0.7937251",
"0.79264987",
"0.79233825",
"0.79048395",
"0.78603816",
"0.7790699",
"0.77842164",
"0.77628785",
"0.7737272",
"0.7733618",
"0.7710535",
"0.7691693",
"0.76849866",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.76830... | 0.0 | -1 |
Get all cells grid informations | public function handle_grid($attributes, $content, $block_instance)
{
$cellsLayout = [];
foreach ($block_instance->parsed_block["innerBlocks"] as $innerBlock) {
if ($innerBlock["blockName"] != "custom/wpe-column") {
continue;
}
if( !isset($innerBlock["attrs"]["id_component"]) ) {
continue;
}
$cellsLayout[$innerBlock["attrs"]["id_component"]] =
$innerBlock["attrs"]["layout"] ?? null;
}
// Generate Coffeekraken CSS layout string
$layout = [];
$media = $this->get_config()->get_spec("media");
if (
$media &&
is_array($media) &&
isset($media["queries"]) &&
is_array($media["queries"]) &&
count($media["queries"]) > 0
) {
foreach ($media["queries"] as $device => $query) {
$layout[$device] = Css::generate_coffeekraken_css_layout(
$cellsLayout,
$device
);
}
}
// Generate grid ID
$grid_id =
isset($attributes["anchor"]) && !empty($attributes["anchor"])
? $attributes["anchor"]
: "grid_" . mt_rand();
// Prepare data
$attributes = array_merge($attributes, [
"id" => $grid_id,
"media" => $layout,
"frontspec" => [
"media" => $media,
],
"container" => true,
"attributes" => [
"class" => $attributes["className"] ?? "",
],
]);
// Return
return $attributes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCells();",
"public function getCells()\n {\n return $this->cells;\n }",
"public function getGrid()\n {\n return $this->all();\n }",
"public function getGrid()\n {\n return $this->all();\n }",
"public function cells();",
"public function getCells()... | [
"0.816132",
"0.7498548",
"0.72881174",
"0.72881174",
"0.7136754",
"0.6959496",
"0.6794501",
"0.6749108",
"0.67091",
"0.65088576",
"0.65007776",
"0.6479085",
"0.62507814",
"0.62147814",
"0.6127746",
"0.6103049",
"0.6096594",
"0.60762733",
"0.606526",
"0.60621285",
"0.606179",
... | 0.0 | -1 |
to trigger and error 403 | function defaultAction($args) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function notAuthorized()\n {\n $this->response = $this->response->withStatus(403);\n $this->jsonBody($this->payload->getInput());\n }",
"public function redirect403(){\n\t\t\n\t\t$this->page = new PageGenerator($this->app);\n\t\t$this->page->setContentFile(__DIR__ . '/../Errors/403'... | [
"0.6952284",
"0.69005924",
"0.68416655",
"0.6822391",
"0.68119377",
"0.6811357",
"0.672441",
"0.67243093",
"0.67163354",
"0.6589626",
"0.65779656",
"0.6577362",
"0.65682805",
"0.6558972",
"0.6554696",
"0.6542789",
"0.65160173",
"0.6514854",
"0.64951324",
"0.64753973",
"0.6454... | 0.0 | -1 |
Set the Collection data to the Table Object. | public function setData(Collection $Collection): void
{
$this->Collection = $Collection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCollection()\n {\n $cl = $this->nameCollection;\n $this->collection = self::$database->$cl;\n }",
"public function setCollection(\\Magento\\Framework\\Data\\Collection $collection) {\n $this->collection = $collection;\n }",
"public function setUp()\n {\n ... | [
"0.61740935",
"0.5982793",
"0.5805614",
"0.5736228",
"0.5708509",
"0.5701421",
"0.5687937",
"0.56327903",
"0.5616224",
"0.5604099",
"0.55113167",
"0.5484863",
"0.5455524",
"0.54291433",
"0.5416777",
"0.5415401",
"0.5396353",
"0.53894746",
"0.53751767",
"0.53708917",
"0.536649... | 0.6440375 | 0 |
Add field labels to the existing labels. | public function setLabels(array $labels): void
{
foreach ($labels as $field_name => $label) {
if (isset($this->display_fields[$field_name])) {
$this->labels[$field_name] = $label;
} else {
throw new InvalidFieldException('"'.$field_name.'" not set as a display field');
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function addNamesLabelsValues() {\n foreach ($this->__fields() as $field) {\n $this->$field->__name = $field;\n if (!$this->$field->label && $this->$field->label !== '') $this->$field->label = strtoupper($field[0]) . substr ($field, 1);\n $this->setFieldValue($field);\n $this->$fie... | [
"0.7471149",
"0.72132975",
"0.69580746",
"0.6903273",
"0.6844792",
"0.6467242",
"0.64215684",
"0.62982434",
"0.62847424",
"0.62402797",
"0.61971086",
"0.61275095",
"0.61232185",
"0.6091797",
"0.6082249",
"0.60744256",
"0.60711735",
"0.6031615",
"0.60126454",
"0.6011852",
"0.5... | 0.63941073 | 7 |
Get a Label for a specific field. | public function getLabel(string $field_name): string
{
if (isset($this->labels[$field_name])) {
return $this->labels[$field_name];
}
// This should always be done the same was as Field::makeLabel()
return ucfirst(str_replace('_', ' ', $field_name));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLabel($field){\n\t\treturn $this->labels()[$field] ?? $field;\n\t}",
"public function getLabel($field)\r\n {\r\n return is_array($this->labels) && isset($this->labels[$field]) ? $this->labels[$field] : $field;\r\n }",
"function get_field_label($field_instance) {\n return $fie... | [
"0.81255037",
"0.80604076",
"0.76362646",
"0.75166166",
"0.7397318",
"0.7335072",
"0.727692",
"0.7222852",
"0.70932376",
"0.7087718",
"0.69987214",
"0.6998191",
"0.69718045",
"0.69003105",
"0.68653476",
"0.68581426",
"0.68581426",
"0.6847359",
"0.674416",
"0.6740811",
"0.6689... | 0.6741662 | 19 |
Get array of Labels. | public function getLabels(): array
{
return $this->labels;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getLabels(): array;",
"public function labels()\n {\n return array();\n }",
"public function labels(): array\n {\n return [];\n }",
"public function getLabels()\n {\n $headers = $this->getDefaultHeaders();\n $response = $this->client->request... | [
"0.8889515",
"0.8322369",
"0.8316176",
"0.82619953",
"0.80908847",
"0.80908847",
"0.80908847",
"0.7871494",
"0.7871494",
"0.7871494",
"0.7871494",
"0.7871494",
"0.7871494",
"0.7871494",
"0.7871494",
"0.7871494",
"0.7871494",
"0.7871494",
"0.7871494",
"0.7871494",
"0.7871494",... | 0.8456396 | 1 |
Check if a field has a replacement pattern. | public function hasFieldReplacement(string $field): bool
{
return isset($this->field_replacements[$field]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function hasPregReplace() {\n\t\treturn isset($this->replaces);\n\t}",
"public static function isFieldValid(Field $field): bool\n {\n return $field instanceof PatternField;\n }",
"public function hasReplacement( string $name ) : bool;",
"public function canResolveField($field)\n {\n ... | [
"0.62857735",
"0.5981456",
"0.58648974",
"0.58528006",
"0.55580354",
"0.54394835",
"0.5431845",
"0.5411922",
"0.5316236",
"0.52655107",
"0.52470887",
"0.5219204",
"0.52190346",
"0.52129245",
"0.5200667",
"0.52000356",
"0.5194565",
"0.5190763",
"0.51823705",
"0.51764005",
"0.5... | 0.7110213 | 0 |
Get a field's replacement value. | public function getFieldReplacement(string $field, &$Object): string
{
$pattern = '/\{([a-zA-Z0-9_\?]+)\}/';
$results = [];
preg_match_all($pattern, $this->field_replacements[$field], $results, PREG_PATTERN_ORDER);
$replaced = $this->field_replacements[$field];
if (! is_array($results[0]) || ! is_array($results[1])) {
return $replaced;
}
foreach ($results[0] as $key => $match) {
// If it's an option parameter, drop the question market
$optional = false;
if (strpos($results[1][$key], '?') !== false) {
$optional = true;
$results[1][$key] = str_replace('?', '', $results[1][$key]);
}
if (is_object($Object) && isset($Object->{$results[1][$key]})) {
$replaced = $this->fieldReplaceString($results[0][$key], $Object->{$results[1][$key]}, $replaced, $field);
} elseif (is_array($Object) && isset($Object[$results[1][$key]])) {
$replaced = $this->fieldReplaceString($results[0][$key], $Object[$results[1][$key]], $replaced, $field);
} elseif ($optional) {
$replaced = str_replace($results[0][$key], '', $replaced);
}
}
return $replaced;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getFieldValue($field);",
"public function get_field_value($field)\n\t{\n\t\t//$field = strtoupper($field);\t\t\n\t\tif ($this->is_bound($field))\n\t\t{\n\t\t\treturn $this->get_bound_value($field);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->_fields[$field];\n\t\t}\n\t}",
"public function get_field(/... | [
"0.6863512",
"0.64743817",
"0.64484435",
"0.643917",
"0.62648684",
"0.62114304",
"0.6116827",
"0.6051574",
"0.60396254",
"0.6007611",
"0.59959006",
"0.5983635",
"0.5971142",
"0.59319264",
"0.5923896",
"0.59231895",
"0.5912591",
"0.59038264",
"0.58995426",
"0.58922863",
"0.587... | 0.60683435 | 7 |
Get array of Field Replacements. | public function getFieldReplacements(): array
{
return $this->field_replacements;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getReplacements()\n {\n if (isset($this->raw->replacements)) {\n return (array) $this->raw->replacements;\n }\n\n return array();\n }",
"public function getPatternedFields(): array;",
"public function getReplaces(): array {\n return [];\n }",
"public ... | [
"0.67094177",
"0.6581179",
"0.632138",
"0.62687904",
"0.61752635",
"0.6167777",
"0.61544096",
"0.6133821",
"0.60789096",
"0.6060479",
"0.60374373",
"0.603728",
"0.5987658",
"0.5983393",
"0.5976312",
"0.5976312",
"0.5957291",
"0.5942206",
"0.5910858",
"0.5910759",
"0.5908768",... | 0.8786153 | 0 |
String replace for specific field, conditionally uses htmlspecialchars. | protected function fieldReplaceString($search, $replace, $subject, $field)
{
if (in_array($field, $this->raw_fields)) {
$replaced = str_replace($search, $replace, $subject);
} else {
$replaced = str_replace($search, e($replace), $subject);
}
return $replaced;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function escapeField($string);",
"public function fn_htmlspecialchars($str, $arField = array(), $arItem = array(), $profile = array())\n\t{\n\t\t$str = trim($str);\n\n\t\t//static $search = array(\"&\", \"\\\"\", \"«\", \"»\", \">\", \"<\", \"'\");\n\t\t//static $replace = array(\"&\", \"&qu... | [
"0.6722328",
"0.66236264",
"0.6571963",
"0.6474068",
"0.6471372",
"0.63852423",
"0.63519007",
"0.62458736",
"0.6235993",
"0.6154476",
"0.6129334",
"0.6121149",
"0.6119125",
"0.6101356",
"0.6094571",
"0.60825336",
"0.60549784",
"0.6053532",
"0.605181",
"0.6043265",
"0.6006101"... | 0.0 | -1 |
Convenience method for setting a linking pattern on a field. | public function addLinkingPattern(string $field_name, string $href): void
{
// Make and set the linking pattern
$this->field_replacements[$field_name] = '<a href="'.$href.'">{'.$field_name.'}</a>';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPattern($pattern) {}",
"public function setPattern($pattern)\n {\n $this->_pattern = $pattern;\n }",
"public function testSetReferencePattern1()\n {\n $this->object->setReferencePattern('%', '%');\n\n // test data to use\n $data = [\n 'test1' =... | [
"0.63645095",
"0.5949829",
"0.58516496",
"0.5824148",
"0.5730673",
"0.5727742",
"0.56747746",
"0.5599634",
"0.55771893",
"0.55771893",
"0.55607605",
"0.55489045",
"0.55346584",
"0.5311512",
"0.5288819",
"0.5287096",
"0.5266842",
"0.5211332",
"0.5210005",
"0.51585627",
"0.5157... | 0.67723024 | 0 |
Convenience method for creating a link replacement pattern by route name. | public function addLinkingPatternByRoute(string $field_name, string $route_name, array $replacement_map = [], $query_string = []): void
{
$Route = Route::getRoutes()->getByName($route_name);
if ($Route == null) {
throw new InvalidRouteException('Invalid route name '.$route_name);
}
$uri = $Route->uri;
foreach ($replacement_map as $key => $new) {
$uri = str_replace($key, $new, $uri);
}
if (is_array($query_string) && count($query_string) > 0) {
$uri .= '?'.implode('&', array_map(function ($key, $val) {
return $key.'='.$val;
}, array_keys($query_string), $query_string));
} elseif (is_string($query_string)) {
$uri .= '?'.$query_string;
}
// If it already has a linking pattern, replace $field_name with that linking pattern
$link_text = (isset($this->field_replacements[$field_name]) ? $this->field_replacements[$field_name] : '{'.$field_name.'}');
// Make and set the linking pattern
$this->field_replacements[$field_name] = '<a href="/'.$uri.'">'.$link_text.'</a>';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function generateI18nPatterns($routeName, Route $route);",
"function route($route_name)\n {\n global $router; \n return $router->generate($route_name);\n }",
"public static function when($pattern, Closure $callback, $name = null)\n {\n $apricot = self::getInstance();\n\n if (... | [
"0.6135151",
"0.59848183",
"0.5944712",
"0.592391",
"0.5907689",
"0.5808504",
"0.57717246",
"0.57711285",
"0.57193106",
"0.5652937",
"0.5652937",
"0.56470156",
"0.5637944",
"0.5607559",
"0.5607001",
"0.55856323",
"0.5584579",
"0.5547021",
"0.5505485",
"0.5472079",
"0.5445687"... | 0.64150184 | 0 |
Make a view and extend $extends in $section, $blade_data is the data array to pass to View::make(). | public function makeView(array $blade_data = [], string $extends = '', string $section = ''): \Illuminate\View\View
{
$blade_data['Table'] = $this;
$blade_data['extends'] = $extends;
$blade_data['section'] = $section;
$this->Theme->prepareTableView($this);
$template = ($extends != '' ? 'table-extend' : 'table');
return $this->getThemeView($template, $blade_data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function makeView($blade_data, $extends='', $section=''){\n\t\t$blade_data['Form'] = $this;\n\t\t$blade_data['extends'] = $extends;\n\t\t$blade_data['section'] = $section;\n\t\t\n\t\treturn View::make('form-maker::form', $blade_data);\n\t}",
"public function make($view, $data = array());",
"private stat... | [
"0.7832069",
"0.5986022",
"0.59177226",
"0.57994395",
"0.5615787",
"0.55639905",
"0.55493045",
"0.55291384",
"0.5512683",
"0.546915",
"0.5448926",
"0.54399824",
"0.5438336",
"0.5435707",
"0.5410121",
"0.5407713",
"0.5380427",
"0.5364797",
"0.5354264",
"0.5347256",
"0.5334332"... | 0.74060684 | 1 |
Display a listing of the resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446377",
"0.7361922",
"0.72984487",
"0.7248631",
"0.7162871",
"0.7148215",
"0.7131838",
"0.71028054",
"0.7102395",
"0.70988023",
"0.7048243",
"0.6993516",
"0.6989079",
"0.69341344",
"0.69001913",
"0.6899167",
"0.68920904",
"0.6887188",
"0.68661547",
"0.6849159",
"0.683002... | 0.0 | -1 |
Store a newly created resource in storage. | public function store()
{
$data = Input::all();
$data['start'] = date('Y-m-d H:i:s', strtotime($data['start']));
$data['end'] = date('Y-m-d H:i:s', strtotime($data['end'])+64800);
$lottery = Lotteries::createLottery($data);
return View::make("admin.components.lottories",array("lottery" =>$lottery))->render();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.63424... | 0.0 | -1 |
Update the specified resource in storage. | public function update($id)
{
Lotteries::updateLottery(Input::all(),$id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ... | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
Lotteries::deleteLottery($id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n ... | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897... | 0.0 | -1 |
Fields that need to be included for extra select. | public function get_extra_select() {
return [
'choice_id' => $this->usechoiceid,
'response' => $this->useresponse,
'rank' => $this->userank
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function include_fields()\n {\n }",
"public function getSelectSpecificFields()\n\t{\n\t\treturn $this->_selectSpecificFields;\n\t}",
"public function getSelectDataFields();",
"private function getOldSkuFieldsForSelect()\n {\n return ['type_id', 'attribute_set_id'];\n }",
"public f... | [
"0.72514606",
"0.7089712",
"0.6965258",
"0.6861122",
"0.65541947",
"0.6525796",
"0.65192825",
"0.65083545",
"0.64990294",
"0.644088",
"0.6428929",
"0.64003843",
"0.63925904",
"0.63764805",
"0.63699424",
"0.6343833",
"0.63273",
"0.6324544",
"0.6324544",
"0.6316707",
"0.6306397... | 0.64058465 | 11 |
Create a new command instance. | public function __construct()
{
parent::__construct();
$this->path = __DIR__.'/../';
$this->Model = '';
$this->model = '';
$this->Models = '';
$this->models = '';
$this->schema = '';
$this->field_names = '';
$this->table_header = '';
$this->table_data = '';
$this->details = '';
$this->seeder_data = '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"pu... | [
"0.8010746",
"0.7333379",
"0.72606754",
"0.7164165",
"0.716004",
"0.7137585",
"0.6748632",
"0.67234164",
"0.67178184",
"0.6697025",
"0.6677973",
"0.66454077",
"0.65622073",
"0.65437883",
"0.64838654",
"0.64696646",
"0.64292693",
"0.6382209",
"0.6378306",
"0.63773245",
"0.6315... | 0.0 | -1 |
Execute the console command. | public function handle()
{
$arguments = $this->argument('attribute:type');
$entity = $this->argument('entity');
$attributes = $this->validateAndSetNames($entity, $arguments);
$this->info("Generating Schema ...");
$this->generateSchema($attributes);
$this->info("Generating Controller ...");
$this->generateController();
$this->info("Generating Model ...");
$this->generateModel($attributes);
$this->info("Generating Views ...");
$this->generateViews($attributes);
$this->info("Updating Route ...");
$route = "\nRoute::resource('".$this->models."', '".$this->Models."Controller');";
file_put_contents('app/Http/routes.php', $route, FILE_APPEND | LOCK_EX);
$this->info("Running Migration ...");
\Artisan::call('migrate');
$this->info("Seeding Data ...");
$this->seedData($attributes);
$this->info("Running Auto load ...");
exec('composer dump-autoload');
$this->info("Running Seeds ...");
exec('php artisan db:seed --class='.$this->Models.'TableSeeder');
$this->info("Scaffolding Complete.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() meth... | [
"0.6469962",
"0.6463639",
"0.64271367",
"0.635053",
"0.63190264",
"0.62747604",
"0.6261977",
"0.6261908",
"0.6235821",
"0.62248456",
"0.62217945",
"0.6214421",
"0.6193356",
"0.61916095",
"0.6183878",
"0.6177804",
"0.61763877",
"0.6172579",
"0.61497146",
"0.6148907",
"0.614841... | 0.0 | -1 |
returns an array of objects (records) | public function avaliable_tasks()
{
return DB::table('tasks')
->leftJoin('subjects', 'tasks.subject_id', '=', 'subjects.id')
->leftJoin('usersubjects', 'subjects.id', '=', 'usersubjects.subject_id')
->leftJoin('users', 'usersubjects.user_id', '=', 'users.id')
->where('users.id','=',$this->id)
->where('tasks.isactive','=',true)
->select('subjects.name', 'users.id', 'tasks.*')
->get();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function records() : array {\n return $this->records;\n }",
"public function records() { return $this->_m_records; }",
"public function getRecords()\n {\n $result = $this->fetchAll($this->select()->order('id ASC'))->toArray();\n return $result;\n }",
"private function get... | [
"0.77094513",
"0.73568034",
"0.73532766",
"0.7350226",
"0.7341289",
"0.7300485",
"0.7298752",
"0.72827566",
"0.72788745",
"0.72788745",
"0.7237778",
"0.7236356",
"0.7167276",
"0.6910944",
"0.69095486",
"0.6797121",
"0.67525214",
"0.67311424",
"0.6728215",
"0.66310805",
"0.661... | 0.0 | -1 |
Function to check that the admin user has access | public function check_admin_access(){
$username = $this->session->userdata('admin_username');
$this->db->where('admin_username', $username);
$this->db->where('access_level >', '2');
$query = $this->db->get($this->table);
if ($query->num_rows() == 1){
return true;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function check_admin() {\n return current_user_can('administrator');\n }",
"public function check_admin()\n {\n return current_user_can('administrator');\n }",
"public function checkAdmin();",
"function is_admin()\n {\n //is a user logged in?\n\n //if so, check ad... | [
"0.8587322",
"0.8539967",
"0.8492362",
"0.8448276",
"0.8250654",
"0.82308614",
"0.8219612",
"0.81931376",
"0.81678855",
"0.816473",
"0.81620216",
"0.8160235",
"0.8150284",
"0.81126875",
"0.8109421",
"0.80501777",
"0.8048818",
"0.8047551",
"0.8025885",
"0.79887944",
"0.7988794... | 0.80549467 | 15 |
Function to create admin | public function create_admin($data){
$this->db->insert($this->table, $data);
$insert_id = $this->db->insert_id();
if ($insert_id){
return $insert_id;
}else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function createAdmin()\r\n\t{\r\n\t\treturn new Admin();\r\n\t}",
"public function admin_create()\n {\n return View::make('admin_create');\n }",
"public static function createAdmin()\n {\n // Name is required\n if(!isset($_POST['username'])) Status::message(Status::E... | [
"0.78549904",
"0.7405493",
"0.7388305",
"0.73112094",
"0.72657555",
"0.724836",
"0.715881",
"0.71535945",
"0.7128706",
"0.71226573",
"0.7118343",
"0.7103507",
"0.7055254",
"0.69761145",
"0.6972664",
"0.6945862",
"0.6945436",
"0.69357914",
"0.6931777",
"0.6929127",
"0.69271994... | 0.0 | -1 |
Function to update admin variable $id | public function update_admin($data, $id=null){
//$username = $this->session->userdata('admin_username');
if($id != '' && $id != null){
$this->db->where('id', $id);
}
$query = $this->db->update($this->table, $data);
if ($query){
return true;
}else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function update($id){\n\t\t//\n\t}",
"public function update($id){\n\t\t//\n\t}",
"public function update($id) {\r\n //\r\n }",
"public function update($id)\r\n {\r\n //\r\n }",
"public function update($id){\n //\n }",
"public function update($id)\n\t{\n\t\t\n\t}",... | [
"0.73550826",
"0.73550826",
"0.7258861",
"0.7163682",
"0.7156427",
"0.7153691",
"0.7153691",
"0.71527755",
"0.71527755",
"0.71527755",
"0.71527755",
"0.7144639",
"0.7144639",
"0.7144639",
"0.7144639",
"0.7144639",
"0.7144639",
"0.7144639",
"0.7144639",
"0.7144639",
"0.7144639... | 0.0 | -1 |
Function to update admin variable $username | public function update_user($data, $username = ''){
//$username = $this->session->userdata('admin_username');
if($username != '' && $username != null){
$this->db->where('admin_username', $username);
}
$query = $this->db->update($this->table, $data);
if ($query){
return true;
}else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function editUsername($uname)\n\t{\n\t\tglobal $username;\n\t\tglobal $user_id;\n\t\n\t\t$uname = addslashes($uname);\n\t\n\t\tif(strlen($uname) <= 32)\n\t\t{\n\t\t\t$qry = 'UPDATE admin_table SET username = \"' . $uname;\n\t\t\t$result = mysql_query($qry, $GLOBALS['connection']);\n\t\t}\n\t\n\t\t$username... | [
"0.76369697",
"0.7449481",
"0.73197865",
"0.708582",
"0.7068012",
"0.70519805",
"0.70148283",
"0.7004698",
"0.6977007",
"0.6920837",
"0.69190735",
"0.6892345",
"0.6891143",
"0.6863085",
"0.6830878",
"0.68100154",
"0.675706",
"0.670208",
"0.669079",
"0.6665201",
"0.6665201",
... | 0.6449392 | 42 |
Function to get admin user from the database | function get_user($username = ''){
if($username != '' && $username != null){
$this->db->where('admin_username', $username);
}
$q = $this->db->get($this->table);
if($q->num_rows() > 0){
// we will store the results in the form of class methods by using $q->result()
// if you want to store them as an array you can use $q->result_array()
foreach ($q->result() as $row)
{
$data[] = $row;
}
return $data;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getAdminUser()\n {\n return User::find(1);\n }",
"function getLoggedInAdminId(){\r\n $query = \"SELECT * FROM admins WHERE email='\" . getSessionUsername() . \"';\";\r\n $result = performSingleDbQueryGetRow($query);\r\n return $result['id'];\r\n}",
"public function ... | [
"0.8285803",
"0.80034286",
"0.78379595",
"0.7828879",
"0.7693674",
"0.76766795",
"0.7668772",
"0.7632496",
"0.7589828",
"0.75794166",
"0.7577585",
"0.75700504",
"0.74587095",
"0.7450779",
"0.7387208",
"0.73596334",
"0.7357826",
"0.7352411",
"0.7338568",
"0.73299766",
"0.72927... | 0.0 | -1 |
Function to get all admin users from the database | function get_all_usernames(){
$this->db->select('admin_username');
$this->db->from($this->table);
$q = $this->db->get();
return $q->result_array();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function get_admin_users(){\n \n global $db;\n \n $query = \"SELECT * FROM users \";\n $query .= \"WHERE user_role = 'admin'\";\n \n $result = User::makeQuery($query);\n \n return $result;\n }",
... | [
"0.86306286",
"0.83819926",
"0.81537914",
"0.81521016",
"0.8135989",
"0.8130557",
"0.81065565",
"0.8040345",
"0.8010428",
"0.797122",
"0.7956859",
"0.79330987",
"0.7916776",
"0.7856736",
"0.78183305",
"0.78135383",
"0.78096837",
"0.7798183",
"0.77622926",
"0.77302504",
"0.772... | 0.7356533 | 43 |
TODO: Implement __invoke() method. | function __invoke($param)
{
//var_dump($param);
return "this is invoke";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __invoke();",
"public function __invoke();",
"public function __invoke();",
"public function __invoke();",
"public function __invoke()\n {\n }",
"public function __invoke()\n {\n\n }",
"abstract public function __invoke(): void;",
"public function __invoke(): void;",
"pu... | [
"0.8911749",
"0.8911749",
"0.8911749",
"0.8911749",
"0.8641286",
"0.85219616",
"0.8412802",
"0.8381188",
"0.8244996",
"0.7719228",
"0.74547035",
"0.73410714",
"0.7144108",
"0.71202254",
"0.71202254",
"0.68856364",
"0.68319845",
"0.6831837",
"0.67588454",
"0.67588454",
"0.6642... | 0.73204017 | 12 |
end public beforeFilter() Extension of the Auth>isAuthorized() method | public function isAuthorized($user) {
//Only Field Officers can access these actions
if ($this->Auth->user('user_category_id') == '2' ) {
if (in_array($this->action, array('index', 'toinspect'))) {
return TRUE;
}
}
// General: Only the person who entered a farmer's information can edit and/or delete it (REQUIRES: an eXtra parameter)
// Specific: This checks if the action contains add, view, edit, delete or toInspect and performs check.
if ( in_array($this->action, array('add', 'view', 'edit', 'delete')) ) {
if ($this->action === 'add') {
//Trying to obtain the information from the URL by accessing the 'passed' arguments from the Request Parameters
$farmerId = $this->request->params['pass'][0]; //'pass' stands for 'passed' arguments in URL
if ($this->Production->User->isEnteredBy($farmerId, $user['id'])) { return TRUE; }
}
$productionId = $this->request->params['pass'][0]; //'pass' stands for 'passed' arguments in URL
//Perform a check at Model level, to see if $production[id] was entered by logged-in user
if ($this->Production->isEnteredBy($productionId, $user['id'])) {
return true;
}
}//end if (in_array())
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isAuthorized() {}",
"public function beforeFilter()\n {\n parent::beforeFilter();\n $this->Auth->allow();\n\n }",
"public function beforeFilter() {\n parent::beforeFilter();\n //$this->Auth->allow();\n }",
"public function beforeFilter() {\n if (is_... | [
"0.8143139",
"0.8023562",
"0.80229336",
"0.7967001",
"0.7955822",
"0.785239",
"0.7828615",
"0.77695906",
"0.7684457",
"0.7664324",
"0.7605907",
"0.75988746",
"0.7590916",
"0.75831544",
"0.75809896",
"0.7578585",
"0.7506119",
"0.74981934",
"0.7494534",
"0.74779963",
"0.7466166... | 0.0 | -1 |
end isAuthorized() index method | public function index() {
//return $this->_listAll();
// sets 'productions' to whatever the _listAll() method returns
$this->set('productions', $this->_fetchAll());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isAuthorized() {}",
"public function index()\n {\n //if (\\Gate::allows('isAdmin') || \\Gate::allows('isAuthor')) {\n return Curso::latest()->paginate(5);\n //}\n }",
"public function isAuthorized() {\n\t\t\n\t}",
"public function index()\n {\n // $this->a... | [
"0.7269385",
"0.7217466",
"0.7209516",
"0.7072783",
"0.7015207",
"0.7007431",
"0.6933426",
"0.6903824",
"0.6872782",
"0.6866512",
"0.6853114",
"0.6768123",
"0.67588544",
"0.67392576",
"0.67268777",
"0.67254484",
"0.6724868",
"0.6724591",
"0.67105603",
"0.67044103",
"0.6698673... | 0.0 | -1 |
end function index() view method | public function view($id = null) {
$this->Production->id = $id;
if (!$this->Production->exists()) {
throw new NotFoundException(__('The selected farm produce is invalid!'));
}
$this->set('production', $this->Production->read(null, $id));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionIndex() {}",
"public function actionIndex() {}",
"public function index(){}",
"public function index(){\r\n $this->display(index);\r\n }",
"public function index()\n {\n\t\t//return $view->fetch();\n }",
"protected function indexAction() {}",
"public function indexA... | [
"0.8459779",
"0.8459779",
"0.8424347",
"0.8404219",
"0.8364458",
"0.82867396",
"0.8277725",
"0.82599974",
"0.82599974",
"0.82599974",
"0.82594407",
"0.82594407",
"0.82594407",
"0.8252723",
"0.82475245",
"0.82082963",
"0.8207227",
"0.8207227",
"0.8207227",
"0.8207227",
"0.8207... | 0.0 | -1 |
This method adds a passed farmer's farm produce, it accepts the farmer's ID. No Production ID. | public function add($id = null) {
$this->Production->User->id = $id;
if (!$this->Production->User->exists()) {
throw new NotFoundException(__('This farmer does not exist!'));
}
if ($this->request->is('post')) {
$this->Production->create();
//Trying to obtain the information from the URL by accessing the 'passed' arguments from the Request Parameters
$farmerId = $this->request->params['pass'][0];
//i am setting the the Farmer's Id of this record to the passed Id in the URL.
$this->request->data['Production']['user_id'] = $farmerId;
//i am setting the entry person of this record to the currently logged in user.
$this->request->data['Production']['field_officer_id'] = $this->Auth->user('id');
if ($this->Production->save($this->request->data)) {
$this->Session->setFlash(__('The farmer\'s produce has been saved'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('This farmer\'s produce could not be saved. Please, try again.'));
}
}//end if ($this->request->is('post'))
$farmer = $this->Production->User->find( 'first', array(
'conditions' => array('User.id' => $id)
) );
$products = $this->Production->Product->find('list');
$this->set(compact('farmer', 'products'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createFarm($square_id, $world_id) {\n\twriteLog(\"createFarm(): Square ID: \" . $square_id);\n\t\n\t$square_type = getSquareType($square_id);\n\twriteLog(\"createFarm(): Square Type: \" . $square_type);\n\t\n\tif ($square_type == \"land\" && canIAffordIt('farm', $world_id) == 1) {\n\t\n\t\t$dml = \"UPDATE... | [
"0.5544999",
"0.5222093",
"0.46992844",
"0.4687974",
"0.45313016",
"0.45190394",
"0.45171067",
"0.44795826",
"0.4437303",
"0.44330385",
"0.43853965",
"0.43791267",
"0.437684",
"0.43543538",
"0.43433112",
"0.43394727",
"0.43392795",
"0.43353906",
"0.43281603",
"0.43229273",
"0... | 0.6734126 | 0 |
end function edit() delete method | public function delete($id = null) {
if (!$this->request->is('post')) {
throw new MethodNotAllowedException();
}
$this->Production->id = $id;
if (!$this->Production->exists()) {
throw new NotFoundException(__('Invalid production'));
}
if ($this->Production->delete()) {
$this->Session->setFlash(__('Farm Produce deleted'));
$this->redirect(array('action' => 'index'));
}
$this->Session->setFlash(__('Farm Produce was not deleted'));
$this->redirect(array('action' => 'index'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function deleted(Edit $edit)\n {\n //\n }",
"public function actionDelete() {}",
"public function actionDelete() {}",
"public function deleting()\n {\n # code...\n }",
"public function deleteAction() {\n \n }",
"protected function _postDelete() {}",
"protected... | [
"0.8011963",
"0.7578682",
"0.7578682",
"0.75335807",
"0.7453761",
"0.73604685",
"0.73593676",
"0.73425233",
"0.73099446",
"0.73031986",
"0.7232382",
"0.72108686",
"0.71675545",
"0.7161344",
"0.7156966",
"0.7145846",
"0.71352214",
"0.71244186",
"0.71181554",
"0.71014404",
"0.7... | 0.0 | -1 |
the private _fetchAll() method | private function _fetchAll() {
$this->Production->recursive = 0;
// if user is not an administrator, then execute below:
if ($this->Auth->user('user_category_id') != '1') {
//set $myId to currently logged in user's ID
$myId = '';$myId = $this->Auth->user('id');
//$this->set('productions', $this->paginate(array('production.field_officer_id' => $myId)));
return $this->paginate(array('Production.field_officer_id' => $myId));
}
//This line is only executed if the logged in user is an Administrator
//$this->set('productions', $this->paginate());
return $this->paginate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function doFetchAll();",
"public abstract function fetchAll();",
"public function fetchAll()\r\n {\r\n $this->query();\r\n return $this->sth->fetchAll();\r\n }",
"public function fetchAll();",
"public function fetchAll();",
"public function fetchAll();",
"public f... | [
"0.8341072",
"0.7991754",
"0.77481943",
"0.7717565",
"0.7717565",
"0.7717565",
"0.7717565",
"0.76926136",
"0.7675236",
"0.75774884",
"0.7504776",
"0.7454816",
"0.7451582",
"0.7440125",
"0.7365229",
"0.73398274",
"0.7320153",
"0.73139733",
"0.72762644",
"0.7244903",
"0.7180154... | 0.0 | -1 |
end function _fetchAll() the public toInspect() method | public function toInspect() {
$this->set('productions', $this->_fetchAll());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function fetchAll()\n {\n }",
"public abstract function fetchAll();",
"public function fetchAll();",
"public function fetchAll();",
"public function fetchAll();",
"public function fetchAll();",
"abstract protected function doFetchAll();",
"public function fetchAll(){\n\t\treturn $this->i... | [
"0.7688975",
"0.7646413",
"0.7639365",
"0.7639365",
"0.7639365",
"0.7639365",
"0.7607137",
"0.7582458",
"0.735695",
"0.73043674",
"0.7244086",
"0.7223974",
"0.7145335",
"0.71301657",
"0.7102933",
"0.7093279",
"0.7090406",
"0.7068744",
"0.70408523",
"0.7021289",
"0.7010086",
... | 0.0 | -1 |
Instantiates a new directorySetting and sets the default values. | public function __construct() {
parent::__construct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function createFromDiscriminatorValue(ParseNode $parseNode): DirectorySetting {\n return new DirectorySetting();\n }",
"public function initDefaultDirectories()\n {\n $this->setParam(DirectoryKeys::TMP, ParamNode::TYPE_STRING, '/tmp');\n $this->setParam(DirectoryKeys::DEP... | [
"0.6907903",
"0.6251983",
"0.5636675",
"0.5529768",
"0.53719723",
"0.5356757",
"0.5330133",
"0.53216994",
"0.5296155",
"0.52959716",
"0.52900124",
"0.5266649",
"0.5251541",
"0.52365345",
"0.5235016",
"0.5220969",
"0.52054113",
"0.52010894",
"0.5178901",
"0.51761127",
"0.51748... | 0.0 | -1 |
Creates a new instance of the appropriate class based on discriminator value | public static function createFromDiscriminatorValue(ParseNode $parseNode): DirectorySetting {
return new DirectorySetting();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function createFromDiscriminatorValue(ParseNode $parseNode): DeviceManagementConfigurationSettingInstance {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n ... | [
"0.5663202",
"0.56524795",
"0.55938476",
"0.5582519",
"0.55732256",
"0.5502307",
"0.54198116",
"0.5367442",
"0.5345139",
"0.5340543",
"0.5317889",
"0.53125316",
"0.5274097",
"0.52523774",
"0.52451587",
"0.5238258",
"0.5223514",
"0.52152604",
"0.5212037",
"0.51939124",
"0.5174... | 0.466203 | 88 |
Gets the displayName property value. Display name of this group of settings, which comes from the associated template. Readonly. | public function getDisplayName(): ?string {
$val = $this->getBackingStore()->get('displayName');
if (is_null($val) || is_string($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'displayName'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSettingDisplayName()\n {\n if (array_key_exists(\"settingDisplayName\", $this->_propDict)) {\n return $this->_propDict[\"settingDisplayName\"];\n } else {\n return null;\n }\n }",
"public function getDisplayName()\n {\n return $this->g... | [
"0.77066594",
"0.72908777",
"0.7148875",
"0.71156234",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
"0.7109006",
... | 0.0 | -1 |
The deserialization information for the current model | public function getFieldDeserializers(): array {
$o = $this;
return array_merge(parent::getFieldDeserializers(), [
'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),
'templateId' => fn(ParseNode $n) => $o->setTemplateId($n->getStringValue()),
'values' => fn(ParseNode $n) => $o->setValues($n->getCollectionOfObjectValues([SettingValue::class, 'createFromDiscriminatorValue'])),
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOriginalModelInfo()\n {\n return $this->original_model_info;\n }",
"public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n ]);\n }",
"public function getFieldDeserializers(): array {\n ... | [
"0.6067922",
"0.57719976",
"0.57719976",
"0.5759543",
"0.5708227",
"0.5663973",
"0.5626403",
"0.5607489",
"0.5597127",
"0.5582992",
"0.55805206",
"0.55749476",
"0.55737877",
"0.5545505",
"0.5529162",
"0.5523548",
"0.5518858",
"0.55104053",
"0.5507383",
"0.5482898",
"0.5475896... | 0.0 | -1 |
Gets the templateId property value. Unique identifier for the template used to create this group of settings. Readonly. | public function getTemplateId(): ?string {
$val = $this->getBackingStore()->get('templateId');
if (is_null($val) || is_string($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'templateId'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_template_id() \n {\n return $this->template_id;\n }",
"public function getTemplateId() : string {\n return $this->templateId;\n }",
"public function getId()\n\t{\n\t\treturn $this->get('templateid');\n\t}",
"public function getTemplateId()\n\t{\n\t\treturn $this->template... | [
"0.75858647",
"0.74875396",
"0.744494",
"0.7412313",
"0.6879593",
"0.68282396",
"0.66919166",
"0.66919166",
"0.6633054",
"0.65226686",
"0.6209348",
"0.6196744",
"0.6126126",
"0.6098429",
"0.6038187",
"0.6028008",
"0.6005439",
"0.59681576",
"0.59681576",
"0.59681576",
"0.59681... | 0.54137427 | 83 |
Gets the values property value. Collection of namevalue pairs corresponding to the name and defaultValue properties in the referenced directorySettingTemplates object. | public function getValues(): ?array {
$val = $this->getBackingStore()->get('values');
if (is_array($val) || is_null($val)) {
TypeUtils::validateCollectionValues($val, SettingValue::class);
/** @var array<SettingValue>|null $val */
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'values'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getValues()\n {\n return $this->getVal('value', []);\n }",
"public function getValues()\n\t{\n\t\tif ($this->use_defaults) {\n\t\t\tforeach ($this->form_def['field_groups'] as $gi => $g) {\n\t\t\t\t// Read-only values are input-only\n\t\t\t\tif ($this->readonly || !empty($g['readonly... | [
"0.6290181",
"0.6186065",
"0.60677016",
"0.6057228",
"0.590492",
"0.590492",
"0.5885257",
"0.5885257",
"0.5885257",
"0.5885257",
"0.58371663",
"0.5820532",
"0.5780576",
"0.57716745",
"0.5770234",
"0.57598674",
"0.57598674",
"0.5749913",
"0.57398796",
"0.5722545",
"0.5697095",... | 0.58919424 | 6 |
Serializes information the current object | public function serialize(SerializationWriter $writer): void {
parent::serialize($writer);
$writer->writeStringValue('displayName', $this->getDisplayName());
$writer->writeStringValue('templateId', $this->getTemplateId());
$writer->writeCollectionOfObjectValues('values', $this->getValues());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function SerializeObject () {\n return serialize ($this);\n }",
"public function serialize()\n {\n // TODO: Implement serialize() method.\n }",
"public function serialize()\n {\n return serialize(get_object_vars($this));\n }",
"public function serialize()\n {\n ... | [
"0.775681",
"0.7567243",
"0.7461478",
"0.7461478",
"0.7461478",
"0.74493605",
"0.74493605",
"0.73959774",
"0.73959774",
"0.73959774",
"0.73959774",
"0.73959774",
"0.73959774",
"0.7395834",
"0.7395834",
"0.7388387",
"0.73002976",
"0.7277384",
"0.7277384",
"0.7209889",
"0.71924... | 0.0 | -1 |
Sets the displayName property value. Display name of this group of settings, which comes from the associated template. Readonly. | public function setDisplayName(?string $value): void {
$this->getBackingStore()->set('displayName', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setSettingDisplayName($val)\n {\n $this->_propDict[\"settingDisplayName\"] = $val;\n return $this;\n }",
"public function setDisplayName($val)\n {\n $this->_propDict[\"displayName\"] = $val;\n return $this;\n }",
"public function setDisplayName($val)\n ... | [
"0.68555117",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.683709",
"0.6738285",
"0.67348856",
"0.6733557",
"0.6722358",
"... | 0.6617504 | 41 |
Sets the templateId property value. Unique identifier for the template used to create this group of settings. Readonly. | public function setTemplateId(?string $value): void {
$this->getBackingStore()->set('templateId', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setTemplateId(string $templateId) : self {\n $this->templateId = $templateId;\n return $this;\n }",
"public function setTemplateId($value);",
"public function templateId($value) {\n $value = new \\Kendo\\Template($value);\n\n return $this->setProperty('template', $value);\n... | [
"0.7138557",
"0.65513337",
"0.6475275",
"0.6475275",
"0.6368247",
"0.61795175",
"0.61334",
"0.60369724",
"0.59974796",
"0.58822757",
"0.5869362",
"0.5860467",
"0.5800805",
"0.5799797",
"0.5725299",
"0.5674958",
"0.5659334",
"0.56183195",
"0.5605395",
"0.5530384",
"0.5530384",... | 0.60190845 | 8 |
Sets the values property value. Collection of namevalue pairs corresponding to the name and defaultValue properties in the referenced directorySettingTemplates object. | public function setValues(?array $value): void {
$this->getBackingStore()->set('values', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setValues($val)\n {\n $this->_propDict[\"values\"] = $val;\n return $this;\n }",
"public function setValuesOption($values)\n {\n $this->values = $values;\n }",
"public function set_values( $values = array() ) {\n\t\t\n\t\t$this->values = $values;\n\t\t\n\t}",
... | [
"0.6315024",
"0.6216697",
"0.6208911",
"0.60262454",
"0.5981795",
"0.5939034",
"0.5931491",
"0.5919261",
"0.5902999",
"0.5858788",
"0.5853157",
"0.57744265",
"0.5753836",
"0.5740272",
"0.57352257",
"0.57113206",
"0.5657763",
"0.5607999",
"0.5604113",
"0.55944324",
"0.55479604... | 0.5262375 | 35 |
Teste les colonnes de la table | public function testChallengeTableHasExpectedColumns()
{
$this->assertTrue(
Schema::hasColumns('challenges',
[
"id", "title", "description", "value", "session_id",
"created_at", "updated_at"
]
), 1
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function test_table()\n {\n $this->CT->execute('utility:table');\n\n $this->assertContains('Header1', $this->CT->getOutput());\n $this->assertContains('Header2', $this->CT->getOutput());\n }",
"function verifyCreateTableWithBorders(){\n $WIKI_TABLE_ROW = \"4\";\n $... | [
"0.6934664",
"0.6620553",
"0.6577331",
"0.6511415",
"0.65077174",
"0.6484909",
"0.6388969",
"0.63177115",
"0.6301745",
"0.62907684",
"0.6247316",
"0.6209604",
"0.61929166",
"0.6175343",
"0.6169093",
"0.61686283",
"0.60941327",
"0.6089316",
"0.60888046",
"0.60689485",
"0.60418... | 0.5915921 | 29 |
Display a listing of the resource. | public function indexPublic(Company $company)
{
return $this->jobPostRepository->indexPubic($company);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Display a listing of the resource. | public function indexUser(Company $company)
{
$this->authorizeApi('indexUser', JobPost::class, $company);
return $this->jobPostRepository->indexUser($company);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(JobPostRequest $request)
{
return $this->jobPostRepository->store($request);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.63424... | 0.0 | -1 |
Display the specified resource. | public function show(JobPost $jobPost)
{
if ($jobPost->is_active == 1) {
return new JobPostResource($jobPost);
} else {
return 'not active';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245... | 0.0 | -1 |
Update the specified resource in storage. | public function update(JobPostRequest $request, JobPost $jobPost)
{
$this->authorizeApi('update', $jobPost);
return $this->jobPostRepository->update($request->all(), $jobPost);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ... | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy(JobPost $jobPost)
{
$this->authorizeApi('delete', $jobPost);
return $this->jobPostRepository->delete($jobPost);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n ... | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897... | 0.0 | -1 |
Constructor method for ItemAttachmentType | public function __construct(\Ews\StructType\EwsItemType $item = null, \Ews\StructType\EwsMessageType $message = null, \Ews\StructType\EwsCalendarItemType $calendarItem = null, \Ews\StructType\EwsContactItemType $contact = null, \Ews\StructType\EwsMeetingMessageType $meetingMessage = null, \Ews\StructType\EwsMeetingRequestMessageType $meetingRequest = null, \Ews\StructType\EwsMeetingResponseMessageType $meetingResponse = null, \Ews\StructType\EwsMeetingCancellationMessageType $meetingCancellation = null, \Ews\StructType\EwsTaskType $task = null, \Ews\StructType\EwsPostItemType $postItem = null, \Ews\StructType\EwsRoleMemberItemType $roleMember = null, \Ews\StructType\EwsNetworkItemType $network = null, \Ews\StructType\EwsAbchPersonItemType $person = null, \Ews\StructType\EwsBookingItemType $booking = null)
{
$this
->setItem($item)
->setMessage($message)
->setCalendarItem($calendarItem)
->setContact($contact)
->setMeetingMessage($meetingMessage)
->setMeetingRequest($meetingRequest)
->setMeetingResponse($meetingResponse)
->setMeetingCancellation($meetingCancellation)
->setTask($task)
->setPostItem($postItem)
->setRoleMember($roleMember)
->setNetwork($network)
->setPerson($person)
->setBooking($booking);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct(AttachmentModel $item) {\n //\n $this->id = $item->id;\n }",
"protected function _construct()\n {\n $this->_init(\n 'Sintra\\POEmailAttachment\\Model\\PoAttachment',\n 'Sintra\\POEmailAttachment\\Model\\ResourceModel\\PoAttachment'\n );\n ... | [
"0.7317518",
"0.65762347",
"0.63173705",
"0.6301429",
"0.62677014",
"0.6201779",
"0.60668784",
"0.60623807",
"0.60418",
"0.60414886",
"0.60114247",
"0.60030764",
"0.58215904",
"0.57710797",
"0.5745026",
"0.56743324",
"0.5672164",
"0.56350225",
"0.56281203",
"0.5625975",
"0.56... | 0.6023739 | 10 |
Method called when an object has been exported with var_export() functions It allows to return an object instantiated with the values | public static function __set_state(array $array)
{
return parent::__set_state($array);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ExportObject() {\n // Init object\n $plugin = new stdClass();\n // Set values\n $plugin->Name = $this->Name;\n $plugin->Version = $this->Version;\n $plugin->Author = $this->Author;\n $plugin->About = $this->About;\n $plugin->Root = $this->Roo... | [
"0.6952081",
"0.6923705",
"0.6575992",
"0.63776064",
"0.6144621",
"0.6124311",
"0.6056106",
"0.60384965",
"0.5922347",
"0.5922347",
"0.5922347",
"0.5922347",
"0.5922347",
"0.5858053",
"0.5838443",
"0.581231",
"0.58007634",
"0.5717352",
"0.57170045",
"0.5713048",
"0.5688804",
... | 0.0 | -1 |
Method returning the class name | public function __toString()
{
return __CLASS__;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getClassName();",
"public function getClassName();",
"public function getClassName() ;",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName()\n {\n ... | [
"0.87522393",
"0.87522393",
"0.8751158",
"0.87397957",
"0.87397957",
"0.87397957",
"0.87397957",
"0.8731564",
"0.8696754",
"0.8673495",
"0.8638432",
"0.8615335",
"0.8603119",
"0.8566906",
"0.8562364",
"0.8555002",
"0.85503733",
"0.85503733",
"0.85425884",
"0.8533183",
"0.8529... | 0.0 | -1 |
protected section execute methods | protected function execute_watch($vk_tools, $text) {
Logger::log(LOG_DEBUG, "executing watch, text = $text");
if (isset($text) && $text != '') {
try {
$user = $vk_tools->get_user($text, array());
Logger::log(LOG_DEBUG, 'got user with id '. $user->{'id'});
if ($this->watch_action($user->{'id'})) {
$this->send_formatted_message('['. $vk_tools->get_user_name($user). '](https://vk.com/id'. $user->{'id'}. ') добавлен в список наблюдения.');
} else {
$this->send_formatted_message('['. $vk_tools->get_user_name($user). '](https://vk.com/id'. $user->{'id'}. ') уже есть в списке наблюдения.');
}
} catch (Exception $e) {
if ($e->getCode() == 404) {
$this->sendMessage('Не могу найти такого пользователя :(');
} else {
$this->send_fail_message();
Logger::log(LOG_ERR, $e->getMessage());
}
}
} else {
$message = $this->send_formatted_message("Хорошо, давай добавим человека в список наблюдения. Для этого пришли мне его или её _id_, _поддомен_ или _ссылку_ на его или её страницу.\n\n".
"Например, если хочешь добавить в список Павла Дурова, прошли мне *1*, *durov* или *https://vk.com/durov*.\n\nЕсли ты передумал и не хочешь никого добавлять, пришли мне в ответ /0.", new ForceReply());
$message_id = $message->getMessageId();
Logger::log(LOG_DEBUG, 'message id: '. $message_id);
$this->register_session($message_id, 'watch');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function _run();",
"abstract protected function _run();",
"protected function _exec()\n {\n }",
"protected abstract function run();",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public function execute() {}",
"public func... | [
"0.7775583",
"0.7775583",
"0.76560295",
"0.7584582",
"0.7462016",
"0.7462016",
"0.74616194",
"0.74616194",
"0.74616194",
"0.74616194",
"0.74616194",
"0.74616194",
"0.74616194",
"0.74616194",
"0.74616194",
"0.74616194",
"0.74616194",
"0.74616194",
"0.74616194",
"0.74608785",
"... | 0.0 | -1 |
/ |========================================================== | get corrupted match proposal | public function getCorruptedMatchProposal($matchId,$teamId)
{
$queryString="SELECT *
FROM corruption_match
WHERE match_id=$matchId
AND receiver=$teamId
AND response=0";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getExhaustionExplanation ();",
"public function match() {\r\n\t\treturn false;\r\n\t}",
"public function testFailingOnMismatchedExpectation() {\n\t\t$test = new IncorrectOutputSingleExpectationTestCase( 'test' );\n\t\t$result = $test->run();\n\n\t\t$this->assertSame( 1, $result->failureCount(... | [
"0.5711836",
"0.5265807",
"0.5207734",
"0.50305563",
"0.50183773",
"0.50049865",
"0.49946687",
"0.49930918",
"0.49823987",
"0.49759617",
"0.49592847",
"0.49541044",
"0.493959",
"0.49275696",
"0.49258554",
"0.49193656",
"0.49104398",
"0.48937345",
"0.48811996",
"0.4877627",
"0... | 0.6100062 | 0 |
/ |========================================================== | get corruption infos | public function getCorruptionInfos($matchId)
{
$queryString="SELECT *
FROM corruption_match
WHERE match_id=$matchId";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function errorInfo() {\n\t\treturn array(\n\t\t\t0,\n\t\t\t0,\n\t\t\tmssql_get_last_message()\n\t\t);\n\t}",
"public function errorInfo()\n {\n $e = oci_error($this->_dbh);\n\n if (is_array($e)) {\n return array(\n 'HY000',\n $e['code'],\n ... | [
"0.6437854",
"0.62154084",
"0.60835767",
"0.60513717",
"0.5981879",
"0.57942045",
"0.57923347",
"0.57923007",
"0.5608492",
"0.5608492",
"0.5600638",
"0.5549973",
"0.54803646",
"0.544739",
"0.5442041",
"0.5441122",
"0.5396901",
"0.53714675",
"0.536586",
"0.53345317",
"0.531426... | 0.6005897 | 4 |
/ |========================================================== | accept corruption update statut | public function corruptionAccepted($matchId)
{
/*$queryString="SELECT *
FROM corruption_match
WHERE match_id=$matchId";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;*/
$queryString="UPDATE corruption_match
SET response=1
WHERE match_id=$matchId";
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateFailed();",
"public function testUpdateUnsuccessfulReason()\n {\n }",
"public function testUpdateValuesTooShort(): void { }",
"public function test_if_failed_update()\n {\n }",
"public function testUpdateValuesTooLong(): void { }",
"protected function _update()\n... | [
"0.6597972",
"0.6476475",
"0.64239156",
"0.62423855",
"0.62000924",
"0.6118032",
"0.6079624",
"0.6037565",
"0.59906965",
"0.59906965",
"0.5857823",
"0.5825634",
"0.58073604",
"0.5785914",
"0.5776283",
"0.576722",
"0.5733534",
"0.56705976",
"0.56434923",
"0.56396025",
"0.56245... | 0.0 | -1 |
/ |========================================================== | check if Corruption is Accepted | public function checkCorruptionAccepted($matchId)
{
$queryString="SELECT COUNT(corruption_match_id) as nb
FROM corruption_match
WHERE match_id=$matchId
AND response=1";
$query = $this->db->query($queryString);
$result=$query->result_array();
if($result[0]["nb"]!=0)
return TRUE;
else
return FALSE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getIsRequestToCorrectCvvOrAvsError();",
"public function getIsAccepted(): bool;",
"public function getAccepted();",
"public function isAccepted()\n {\n return !empty($this->acceptee_id);\n }",
"public function cancellationRequested() : bool;",
"public function has_avs_rejecti... | [
"0.6210793",
"0.61894107",
"0.6131388",
"0.6018743",
"0.5978715",
"0.5907136",
"0.58956754",
"0.58808833",
"0.5877966",
"0.5862892",
"0.5811694",
"0.58042365",
"0.57796586",
"0.57771856",
"0.57619053",
"0.574996",
"0.57361144",
"0.5734393",
"0.57135797",
"0.56950533",
"0.5692... | 0.5932779 | 5 |
/ |========================================================== | Return offensive methods |========================================================== | | public function getOffensiveMethods()
{
$queryString="SELECT *
FROM corruption_offensive_methods
ORDER BY value ASC";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getdefensiveMethods()\n {\n $queryString=\"SELECT *\n FROM corruption_defensive_methods\n ORDER BY value ASC\";\n $query = $this->db->query($queryString);\n $result=$query->result_array();\n\n return $result;\n }",
"funct... | [
"0.6478334",
"0.6436764",
"0.638438",
"0.62645423",
"0.6147758",
"0.6054092",
"0.5827823",
"0.58267117",
"0.58267117",
"0.58267117",
"0.5728935",
"0.5728935",
"0.57219756",
"0.5689669",
"0.56495726",
"0.5642633",
"0.5625845",
"0.5614534",
"0.56105614",
"0.56105614",
"0.561056... | 0.6766701 | 0 |
/ |========================================================== | Return defensive methods |========================================================== | | public function getdefensiveMethods()
{
$queryString="SELECT *
FROM corruption_defensive_methods
ORDER BY value ASC";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function method_no_specs() {}",
"public function getOffensiveMethods()\n {\n $queryString=\"SELECT *\n FROM corruption_offensive_methods\n ORDER BY value ASC\";\n $query = $this->db->query($queryString);\n $result=$query->result_array();\n\n ... | [
"0.6971257",
"0.66801876",
"0.6151427",
"0.59392697",
"0.59383243",
"0.58445126",
"0.57827723",
"0.5713528",
"0.5693863",
"0.56596094",
"0.5632309",
"0.5613476",
"0.55612034",
"0.5524399",
"0.5521699",
"0.5521699",
"0.5521699",
"0.5495727",
"0.5495727",
"0.5479577",
"0.547834... | 0.7193832 | 0 |
/ |========================================================== | refuse corruption | public function corruptionRefused($matchId)
{
$queryString="DELETE FROM corruption_match
WHERE match_id=$matchId";
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function recover() {\n\t}",
"public function recoverFromCorruption()\n {\n }",
"public function recover();",
"function broken() { return TRUE; }",
"protected function error() {\n trigger_error(\"All properties of previous datastream versions are read only. Please modify parent datastream object.\"... | [
"0.5804817",
"0.57458824",
"0.57048184",
"0.5462207",
"0.5459515",
"0.54338557",
"0.5433023",
"0.5414945",
"0.52605575",
"0.52605575",
"0.514539",
"0.5081045",
"0.50773424",
"0.5064024",
"0.5041485",
"0.5029742",
"0.5029216",
"0.5015172",
"0.49497107",
"0.49293575",
"0.488622... | 0.0 | -1 |
/ |========================================================== | Return laboratory level | public function getOwnLaboratoryLevel($teamId)
{
$queryString="SELECT *
FROM team_laboratory,infrastructure_laboratory
WHERE team_laboratory.laboratory_id=infrastructure_laboratory.laboratory_id
AND team_id=$teamId";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function level() {\n\n\t\t$this->count_attempts( 300 );\n\n\t\tswitch ( TRUE ) {\n\t\t\tcase ( $this->attempts > 2 && $this->attempts <= 100 ) :\n\t\t\t\treturn Logger::NOTICE;\n\t\t\tcase ( $this->attempts > 100 && $this->attempts <= 590 ) :\n\t\t\t\treturn Logger::WARNING;\n\t\t\tcase ( $this->attempts > ... | [
"0.7146074",
"0.69510674",
"0.6885092",
"0.682707",
"0.682707",
"0.67244226",
"0.6715041",
"0.66873753",
"0.6685244",
"0.6644711",
"0.66187036",
"0.66187036",
"0.6597357",
"0.65961635",
"0.65717703",
"0.65717703",
"0.65717703",
"0.65717703",
"0.65717703",
"0.65717703",
"0.657... | 0.59945446 | 53 |
/ |========================================================== | Get defensive method infos | public function getDefensiveMethodInfos($defensiveMethodId)
{
$queryString="SELECT *
FROM corruption_defensive_methods
WHERE corruption_defensive_id=$defensiveMethodId";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getdefensiveMethods()\n {\n $queryString=\"SELECT *\n FROM corruption_defensive_methods\n ORDER BY value ASC\";\n $query = $this->db->query($queryString);\n $result=$query->result_array();\n\n return $result;\n }",
"publi... | [
"0.6968975",
"0.6227429",
"0.6033932",
"0.5984762",
"0.5984762",
"0.59702384",
"0.59007984",
"0.58990455",
"0.5833039",
"0.5829695",
"0.5817807",
"0.5805676",
"0.5788936",
"0.5757169",
"0.57430214",
"0.57430214",
"0.57304573",
"0.57050633",
"0.56663346",
"0.5654523",
"0.56202... | 0.6665586 | 1 |
/ |========================================================== | Get offensive method infos | public function getOffensiveMethodInfos($offensiveMethodId)
{
$queryString="SELECT *
FROM corruption_offensive_methods
WHERE corruption_offensive_id=$offensiveMethodId";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOffensiveMethods()\n {\n $queryString=\"SELECT *\n FROM corruption_offensive_methods\n ORDER BY value ASC\";\n $query = $this->db->query($queryString);\n $result=$query->result_array();\n\n return $result;\n }",
"publi... | [
"0.66365665",
"0.6460969",
"0.6460969",
"0.63481134",
"0.63379806",
"0.62052923",
"0.62032497",
"0.61800367",
"0.6147005",
"0.6098589",
"0.60807633",
"0.5952421",
"0.59314895",
"0.59259593",
"0.5879605",
"0.5878868",
"0.5861027",
"0.5858087",
"0.58515054",
"0.58407176",
"0.58... | 0.6364111 | 3 |
/ |========================================================== | check defensive method | public function checkDefensiveMethod($defensiveMethodId,$teamId)
{
$queryString="SELECT *
FROM team_defensive_methods
WHERE defensive_method_id=$defensiveMethodId
AND team_id=$teamId";
$query = $this->db->query($queryString);
$result=$query->result_array();
if(empty($result))
{
return FALSE;
}else{
return TRUE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function safetyCheck() : self;",
"function isExpensive() {\n\t\treturn true;\n\t}",
"public function _check()\n {\n }",
"public function performChecks(){\n\t\t\n\t}",
"abstract protected function doEvil();",
"protected function checkDisableFunctions() {}",
"abstract public func... | [
"0.7265394",
"0.681683",
"0.6626197",
"0.6547475",
"0.6513481",
"0.64297634",
"0.6408415",
"0.64077175",
"0.6310457",
"0.6299925",
"0.6296022",
"0.627172",
"0.62649983",
"0.62649983",
"0.62649983",
"0.62649983",
"0.62649983",
"0.6212154",
"0.62116027",
"0.61916935",
"0.619169... | 0.0 | -1 |
/ |========================================================== | count defensive method | public function checkCountDefensiveMethod($defensiveMethodId,$teamId)
{
$queryString="SELECT *
FROM team_defensive_methods
WHERE defensive_method_id=$defensiveMethodId
AND team_id=$teamId";
$query = $this->db->query($queryString);
$result=$query->result_array();
if($result[0]["qt"]==0)
{
return FALSE;
}else{
return TRUE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function countUsed()\n {\n }",
"function count(){}",
"function count() ;",
"public function _count();",
"public static function count();",
"function count()\n {\n }",
"abstract public function count();",
"abstract public function count();",
"abstract public function count();",
... | [
"0.7359005",
"0.693621",
"0.68420833",
"0.6667137",
"0.6530698",
"0.65045786",
"0.6499105",
"0.6499105",
"0.6499105",
"0.6499105",
"0.64932376",
"0.6477458",
"0.6477458",
"0.6477267",
"0.6477267",
"0.6477267",
"0.6477267",
"0.6477267",
"0.6477267",
"0.6477267",
"0.6477267",
... | 0.0 | -1 |
/ |========================================================== | check offensive method | public function checkOffensiveMethod($offensiveMethodId,$teamId)
{
$queryString="SELECT *
FROM team_offensive_methods
WHERE offensive_method_id=$offensiveMethodId
AND team_id=$teamId";
$query = $this->db->query($queryString);
$result=$query->result_array();
if(empty($result))
{
return FALSE;
}else{
return TRUE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isExpensive() {\n\t\treturn true;\n\t}",
"abstract protected function safetyCheck() : self;",
"public function checkOperationality()\n {\n }",
"abstract protected function doEvil();",
"public function _check()\n {\n }",
"public function performChecks(){\n\t\t\n\t}",
"abstract publi... | [
"0.69360614",
"0.67417717",
"0.660252",
"0.648589",
"0.642721",
"0.6299758",
"0.6229265",
"0.61370975",
"0.6136118",
"0.61277634",
"0.6105244",
"0.6089317",
"0.60652745",
"0.6047375",
"0.6047375",
"0.6047375",
"0.6047375",
"0.6047375",
"0.60472494",
"0.5990075",
"0.5987488",
... | 0.0 | -1 |
/ |========================================================== | count offensive method | public function checkCountOffensiveMethod($offensiveMethodId,$teamId)
{
$queryString="SELECT *
FROM team_offensive_methods
WHERE offensive_method_id=$offensiveMethodId
AND team_id=$teamId";
$query = $this->db->query($queryString);
$result=$query->result_array();
if($result[0]["qt"]==0)
{
return FALSE;
}else{
return TRUE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function countUsed()\n {\n }",
"function count(){}",
"public function _count();",
"function count() ;",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
... | [
"0.7349844",
"0.716194",
"0.7008492",
"0.6971389",
"0.68148637",
"0.68148637",
"0.68145233",
"0.68145233",
"0.68145233",
"0.68145233",
"0.68145233",
"0.68145233",
"0.68145233",
"0.68145233",
"0.68145233",
"0.68145233",
"0.68145233",
"0.678549",
"0.6739439",
"0.6739439",
"0.67... | 0.0 | -1 |
/ |========================================================== | insert offensive method | public function addOffensiveMethod($offensiveMethodId,$teamId)
{
$queryString="INSERT INTO team_offensive_methods (team_id,offensive_method_id,qt)
VALUES($teamId,$offensiveMethodId,1)";
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function doEvil();",
"private function _optimize() {}",
"public function extra();",
"protected function _refine() {\n\n\t}",
"function isExpensive() {\n\t\treturn true;\n\t}",
"protected function beforeUpdating()\n {\n }",
"public function quash_unused() {\n\t\t// Don't put any... | [
"0.61511034",
"0.5956059",
"0.58562005",
"0.585285",
"0.56172687",
"0.5606232",
"0.5588687",
"0.55199385",
"0.5514278",
"0.5513642",
"0.55102456",
"0.55102456",
"0.5508324",
"0.5501185",
"0.5493254",
"0.5478064",
"0.54770607",
"0.54257214",
"0.54249936",
"0.5413553",
"0.54132... | 0.0 | -1 |
/ |========================================================== | update offensive method | public function updateOffensiveMethod($offensiveMethodId,$teamId,$action)
{
if($action==corruption_rules::ADD_ACTION)
{
$queryString="UPDATE team_offensive_methods
SET qt=qt+1
WHERE team_id=$teamId
AND offensive_method_id=$offensiveMethodId";
}else{
$queryString="UPDATE team_offensive_methods
SET qt=qt-1
WHERE team_id=$teamId
AND offensive_method_id=$offensiveMethodId";
}
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _update()\n {\n \n }",
"protected function _update()\n {\n \n }",
"protected function performUpdate() {}",
"protected function beforeUpdating()\n {\n }",
"protected function _update()\n\t{\n\t}",
"protected function update() {}",
"protected function _p... | [
"0.6669808",
"0.6669808",
"0.66264933",
"0.6582248",
"0.6562085",
"0.6472138",
"0.63336205",
"0.6330132",
"0.6309959",
"0.6296106",
"0.62958944",
"0.61260515",
"0.6000127",
"0.5960108",
"0.5958793",
"0.5921169",
"0.5908084",
"0.590345",
"0.590345",
"0.5892827",
"0.5888965",
... | 0.54582226 | 77 |
/ |========================================================== | insert defensive method | public function addDefensiveMethod($defensiveMethodId,$teamId)
{
$queryString="INSERT INTO team_defensive_methods (team_id,defensive_method_id,qt)
VALUES($teamId,$defensiveMethodId,1)";
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function doEvil();",
"private function _optimize() {}",
"public function implementation_pending()\n {\n }",
"abstract protected function safetyCheck() : self;",
"public function implementation_pending(): void\n {\n }",
"function isExpensive() {\n\t\treturn true;\n\t}",
"p... | [
"0.61847204",
"0.61604035",
"0.5887526",
"0.58242786",
"0.58044577",
"0.5792964",
"0.5785342",
"0.5689117",
"0.5680579",
"0.5676825",
"0.5661432",
"0.55297625",
"0.5528939",
"0.55233496",
"0.54912955",
"0.54889226",
"0.54847646",
"0.5475246",
"0.5457286",
"0.54414594",
"0.544... | 0.0 | -1 |
/ |========================================================== | update defensive method | public function updateDefensiveMethod($defensiveMethodId,$teamId,$action)
{
if($action==corruption_rules::ADD_ACTION)
{
$queryString="UPDATE team_defensive_methods
SET qt=qt+1
WHERE team_id=$teamId
AND defensive_method_id=$defensiveMethodId";
}else{
$queryString="UPDATE team_defensive_methods
SET qt=qt-1
WHERE team_id=$teamId
AND defensive_method_id=$defensiveMethodId";
}
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function do_undismiss_core_update()\n {\n }",
"protected function _update()\n\t{\n\t}",
"protected function _update()\n {\n \n }",
"protected function _update()\n {\n \n }",
"protected function _preupdate() {\n }",
"protected function performUpdate() {}",
"protected f... | [
"0.69744307",
"0.67966855",
"0.6743991",
"0.6743991",
"0.6634163",
"0.6617548",
"0.65307873",
"0.65268904",
"0.6422318",
"0.6355437",
"0.6352221",
"0.62732565",
"0.6244155",
"0.6116011",
"0.6105813",
"0.6087296",
"0.6087296",
"0.6087085",
"0.6026403",
"0.6017257",
"0.6003521"... | 0.5470413 | 92 |
/ |========================================================== | Get own offensive methods | public function getOwnOffensiveMethods($teamId)
{
$queryString="SELECT *
FROM team_offensive_methods,corruption_offensive_methods
WHERE team_offensive_methods.offensive_method_id=corruption_offensive_methods.corruption_offensive_id
AND team_offensive_methods.team_id=$teamId";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOffensiveMethods()\n {\n $queryString=\"SELECT *\n FROM corruption_offensive_methods\n ORDER BY value ASC\";\n $query = $this->db->query($queryString);\n $result=$query->result_array();\n\n return $result;\n }",
"abstr... | [
"0.6515218",
"0.6136331",
"0.6135124",
"0.6132499",
"0.6079993",
"0.6060145",
"0.60444033",
"0.5968786",
"0.59131795",
"0.590473",
"0.5880408",
"0.58644515",
"0.57663924",
"0.57663924",
"0.57663924",
"0.57159466",
"0.57050884",
"0.56853473",
"0.56388575",
"0.56337494",
"0.563... | 0.0 | -1 |
/ |========================================================== | Get own defensive methods | public function getOwnDefensiveMethods($teamId)
{
$queryString="SELECT *
FROM team_defensive_methods,corruption_defensive_methods
WHERE team_defensive_methods.defensive_method_id=corruption_defensive_methods.corruption_defensive_id
AND team_defensive_methods.team_id=$teamId";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getdefensiveMethods()\n {\n $queryString=\"SELECT *\n FROM corruption_defensive_methods\n ORDER BY value ASC\";\n $query = $this->db->query($queryString);\n $result=$query->result_array();\n\n return $result;\n }",
"funct... | [
"0.68003297",
"0.6517954",
"0.64487356",
"0.620623",
"0.6204379",
"0.6204379",
"0.6204379",
"0.60087365",
"0.60034806",
"0.5929655",
"0.5913004",
"0.58383614",
"0.5832825",
"0.58323425",
"0.58265305",
"0.5824152",
"0.5798964",
"0.5736003",
"0.5722869",
"0.5722869",
"0.5689255... | 0.0 | -1 |
/ |========================================================== | Get used Defensive methods | public function getUsedDefensiveMethods($teamId/*,$matchId*/)
{
/*$queryString="SELECT *
FROM team_used_corruption,corruption_defensive_methods
WHERE team_used_corruption.corruption_id=corruption_defensive_methods.corruption_defensive_id
AND team_used_corruption.team_id=$teamId
AND team_used_corruption.match_id=$matchId
AND team_used_corruption.method_type=1";*/
$queryString="SELECT *
FROM team_used_corruption,corruption_defensive_methods
WHERE team_used_corruption.corruption_id=corruption_defensive_methods.corruption_defensive_id
AND team_used_corruption.team_id=$teamId
AND team_used_corruption.method_type=1";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getdefensiveMethods()\n {\n $queryString=\"SELECT *\n FROM corruption_defensive_methods\n ORDER BY value ASC\";\n $query = $this->db->query($queryString);\n $result=$query->result_array();\n\n return $result;\n }",
"publi... | [
"0.70511925",
"0.65604186",
"0.6357855",
"0.61497474",
"0.6110509",
"0.6102015",
"0.6074376",
"0.5987049",
"0.5978087",
"0.58620924",
"0.57947063",
"0.57700866",
"0.57700866",
"0.5693536",
"0.5664447",
"0.56500465",
"0.5637398",
"0.5629652",
"0.5595982",
"0.5592767",
"0.55821... | 0.0 | -1 |
/ |========================================================== | Get used offensive methods | public function getUsedOffensiveMethods($teamId/*,$matchId*/)
{
/*$queryString="SELECT *
FROM team_used_corruption,corruption_offensive_methods
WHERE team_used_corruption.corruption_id=corruption_offensive_methods.corruption_offensive_id
AND team_used_corruption.team_id=$teamId
AND team_used_corruption.match_id=$matchId
AND team_used_corruption.method_type=2";*/
$queryString="SELECT *
FROM team_used_corruption,corruption_offensive_methods
WHERE team_used_corruption.corruption_id=corruption_offensive_methods.corruption_offensive_id
AND team_used_corruption.team_id=$teamId
AND team_used_corruption.method_type=2";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOffensiveMethods()\n {\n $queryString=\"SELECT *\n FROM corruption_offensive_methods\n ORDER BY value ASC\";\n $query = $this->db->query($queryString);\n $result=$query->result_array();\n\n return $result;\n }",
"publi... | [
"0.7163836",
"0.6703611",
"0.65077585",
"0.6381944",
"0.6012435",
"0.5987211",
"0.59359854",
"0.58839804",
"0.5866309",
"0.5866309",
"0.5866309",
"0.5837968",
"0.5827305",
"0.5720276",
"0.57103795",
"0.57103795",
"0.57005084",
"0.56819844",
"0.565937",
"0.5624273",
"0.5617252... | 0.5044563 | 89 |
/ |========================================================== | insert defensive method | public function insertUsedMethod($methodId,$teamId,$matchId,$methodType)
{
$queryString="INSERT INTO team_used_corruption (team_id,corruption_id,match_id,method_type)
VALUES($teamId,$methodId,$matchId,$methodType)";
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function doEvil();",
"private function _optimize() {}",
"public function implementation_pending()\n {\n }",
"abstract protected function safetyCheck() : self;",
"public function implementation_pending(): void\n {\n }",
"function isExpensive() {\n\t\treturn true;\n\t}",
"p... | [
"0.61847204",
"0.61604035",
"0.5887526",
"0.58242786",
"0.58044577",
"0.5792964",
"0.5785342",
"0.5689117",
"0.5680579",
"0.5676825",
"0.5661432",
"0.55297625",
"0.5528939",
"0.55233496",
"0.54912955",
"0.54889226",
"0.54847646",
"0.5475246",
"0.5457286",
"0.54414594",
"0.544... | 0.0 | -1 |
/ |========================================================== | delete used method | public function deleteUsedMethod($usedId)
{
$queryString="DELETE FROM team_used_corruption
WHERE used_id=$usedId";
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function delete() {\n\n\n\t\t}",
"public static function delete() {\r\n\t\t\r\n\t}",
"function delete() ;",
"function delete() ;",
"protected function _delete()\n\t{\n\t}",
"function delete()\n {\n }",
"protected function delete() {\n\t}",
"public static function delete(){... | [
"0.815631",
"0.80394137",
"0.8032499",
"0.8032499",
"0.7959722",
"0.7941809",
"0.78862804",
"0.78093785",
"0.77969897",
"0.7711245",
"0.77046144",
"0.76943266",
"0.76785433",
"0.7600022",
"0.7599609",
"0.75891805",
"0.7578694",
"0.7571397",
"0.75565183",
"0.75557834",
"0.7555... | 0.0 | -1 |
/ |========================================================== | delete used method | public function deleteMethodEndMatch($teamId)
{
$queryString="DELETE FROM team_used_corruption
WHERE team_id=$teamId";
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function delete() {\n\n\n\t\t}",
"public static function delete() {\r\n\t\t\r\n\t}",
"function delete() ;",
"function delete() ;",
"protected function _delete()\n\t{\n\t}",
"function delete()\n {\n }",
"protected function delete() {\n\t}",
"public static function delete(){... | [
"0.815631",
"0.80394137",
"0.8032499",
"0.8032499",
"0.7959722",
"0.7941809",
"0.78862804",
"0.78093785",
"0.77969897",
"0.7711245",
"0.77046144",
"0.76943266",
"0.76785433",
"0.7600022",
"0.7599609",
"0.75891805",
"0.7578694",
"0.7571397",
"0.75565183",
"0.75557834",
"0.7555... | 0.0 | -1 |
/ |========================================================== | check used method | public function checkUsedMethod($teamId,$usedId,$type)
{
$queryString="SELECT *
FROM team_used_corruption
WHERE used_id=$usedId
AND team_id=$teamId
AND method_type=$type";
$query = $this->db->query($queryString);
$result=$query->result_array();
if(empty($result))
{
return FALSE;
}else{
return TRUE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isUsed()\n {\n }",
"public function _check()\n {\n }",
"public function checkOperationality()\n {\n }",
"public function check()\n {\n }",
"public function check()\n {\n }",
"public function helper()\n\t{\n\t\n\t}",
"abstract protected function safetyCheck(... | [
"0.73369354",
"0.7311658",
"0.6943409",
"0.6874017",
"0.6874017",
"0.6688126",
"0.6656189",
"0.6618331",
"0.6551795",
"0.6485135",
"0.6444626",
"0.6444626",
"0.6444626",
"0.6444626",
"0.6444626",
"0.64014626",
"0.64003015",
"0.6323863",
"0.6309966",
"0.6305822",
"0.6288005",
... | 0.0 | -1 |
/ |========================================================== | get offensive bonus used | public function getOffensiveBonusUsed($teamId)
{
$queryString="SELECT *
FROM team_used_corruption,corruption_offensive_methods
WHERE team_used_corruption.corruption_id=corruption_offensive_methods.corruption_offensive_id
AND team_id=$teamId
AND method_type=2";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_bonus() {\n\t\treturn $this->_bonus;\n\t}",
"public function getOilBonus() // 1% expa = 0.3% bonusu\n\t{\n\t\treturn $this->getExperience() * 0.2;\n\t}",
"public function getBonus()\n {\n return $this->bonus;\n }",
"public function getBonus()\n {\n return $this->bon... | [
"0.7012047",
"0.6906563",
"0.69040984",
"0.69040984",
"0.69040984",
"0.67029685",
"0.6613826",
"0.6564496",
"0.65158755",
"0.64186126",
"0.61815196",
"0.6144828",
"0.61240375",
"0.6123987",
"0.61138433",
"0.6111032",
"0.59872484",
"0.5985976",
"0.59686923",
"0.59495676",
"0.5... | 0.6195437 | 10 |
/ |========================================================== | get offensive bonus used | public function getDefensiveBonusUsed($teamId)
{
$queryString="SELECT *
FROM team_used_corruption,corruption_defensive_methods
WHERE team_used_corruption.corruption_id=corruption_defensive_methods.corruption_defensive_id
AND team_id=$teamId
AND method_type=1";
$query = $this->db->query($queryString);
$result=$query->result_array();
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_bonus() {\n\t\treturn $this->_bonus;\n\t}",
"public function getOilBonus() // 1% expa = 0.3% bonusu\n\t{\n\t\treturn $this->getExperience() * 0.2;\n\t}",
"public function getBonus()\n {\n return $this->bonus;\n }",
"public function getBonus()\n {\n return $this->bon... | [
"0.7012047",
"0.6906563",
"0.69040984",
"0.69040984",
"0.69040984",
"0.67029685",
"0.6613826",
"0.6564496",
"0.65158755",
"0.64186126",
"0.6195437",
"0.61815196",
"0.6144828",
"0.61240375",
"0.6123987",
"0.61138433",
"0.6111032",
"0.59872484",
"0.5985976",
"0.59686923",
"0.59... | 0.5696944 | 39 |
/ |========================================================== | update team primary potential |========================================================== | | public function increaseTeamPrimaryPotential($potential,$teamId,$action)
{
switch($action){
case "ATT";
$queryString="UPDATE teams
SET experience_att=experience_att+$potential
WHERE team_id=$teamId";
break;
case "MIL";
$queryString="UPDATE teams
SET experience_mil=experience_mil+$potential
WHERE team_id=$teamId";
break;
case "DEF";
$queryString="UPDATE teams
SET experience_def=experience_def+$potential
WHERE team_id=$teamId";
break;
case "GB";
$queryString="UPDATE teams
SET experience_gb=experience_gb+$potential
WHERE team_id=$teamId";
break;
}
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateTeam($team)\n\t{\n\t}",
"public function updateTeamToCertification($team);",
"function modify_team($teamname, $teamlead, $status) {\n\n $qUpdate = \"UPDATE authteam SET teamlead='$teamlead', status='$status'\n\n\t\t\t\t\t WHERE teamname='$teamname'\";\n\n $qUserStatus = \"... | [
"0.6863709",
"0.66335034",
"0.6520814",
"0.6468499",
"0.64641297",
"0.646041",
"0.6268243",
"0.62601763",
"0.6201292",
"0.6186413",
"0.6139287",
"0.6118677",
"0.60509914",
"0.6042131",
"0.60365725",
"0.60363",
"0.59978485",
"0.5996376",
"0.59619796",
"0.5955357",
"0.59518564"... | 0.638454 | 6 |
/ |========================================================== | update team secondary potential |========================================================== | | public function increaseTeamSecondaryPotential($potential,$teamId,$action)
{
switch($action){
case "ATT";
$queryString="UPDATE teams
SET secondary_experience_att=secondary_experience_att+$potential
WHERE team_id=$teamId";
break;
case "MIL";
$queryString="UPDATE teams
SET secondary_experience_mil=secondary_experience_mil+$potential
WHERE team_id=$teamId";
break;
case "DEF";
$queryString="UPDATE teams
SET secondary_experience_def=secondary_experience_def+$potential
WHERE team_id=$teamId";
break;
case "GB";
$queryString="UPDATE teams
SET secondary_experience_gb=secondary_experience_gb+$potential
WHERE team_id=$teamId";
break;
}
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateTeam($team)\n\t{\n\t}",
"public function updateTeamToCertification($team);",
"function modify_team($teamname, $teamlead, $status) {\n\n $qUpdate = \"UPDATE authteam SET teamlead='$teamlead', status='$status'\n\n\t\t\t\t\t WHERE teamname='$teamname'\";\n\n $qUserStatus = \"... | [
"0.6717696",
"0.6569541",
"0.65178734",
"0.6450432",
"0.6449285",
"0.64154524",
"0.62756664",
"0.62279546",
"0.6091837",
"0.6050576",
"0.603368",
"0.59439063",
"0.5940974",
"0.5919817",
"0.59158516",
"0.5913516",
"0.5870438",
"0.583997",
"0.5832746",
"0.5831232",
"0.577445",
... | 0.67095804 | 1 |
/ |========================================================== | update team primary potential |========================================================== | | public function decreaseTeamPrimaryPotential($potential,$teamId,$action)
{
switch($action){
case "ATT";
$queryString="UPDATE teams
SET experience_att=experience_att-$potential
WHERE team_id=$teamId";
break;
case "MIL";
$queryString="UPDATE teams
SET experience_mil=experience_mil-$potential
WHERE team_id=$teamId";
break;
case "DEF";
$queryString="UPDATE teams
SET experience_def=experience_def-$potential
WHERE team_id=$teamId";
break;
case "GB";
$queryString="UPDATE teams
SET experience_gb=experience_gb-$potential
WHERE team_id=$teamId";
break;
}
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateTeam($team)\n\t{\n\t}",
"public function updateTeamToCertification($team);",
"function modify_team($teamname, $teamlead, $status) {\n\n $qUpdate = \"UPDATE authteam SET teamlead='$teamlead', status='$status'\n\n\t\t\t\t\t WHERE teamname='$teamname'\";\n\n $qUserStatus = \"... | [
"0.6863709",
"0.66335034",
"0.6520814",
"0.6468499",
"0.64641297",
"0.646041",
"0.638454",
"0.6268243",
"0.62601763",
"0.6201292",
"0.6186413",
"0.6118677",
"0.60509914",
"0.6042131",
"0.60365725",
"0.60363",
"0.59978485",
"0.5996376",
"0.59619796",
"0.5955357",
"0.59518564",... | 0.6139287 | 11 |
/ |========================================================== | update team secondary potential |========================================================== | | public function decreaseTeamSecondaryPotential($potential,$teamId,$action)
{
switch($action){
case "ATT";
$queryString="UPDATE teams
SET secondary_experience_att=secondary_experience_att-$potential
WHERE team_id=$teamId";
break;
case "MIL";
$queryString="UPDATE teams
SET secondary_experience_mil=secondary_experience_mil-$potential
WHERE team_id=$teamId";
break;
case "DEF";
$queryString="UPDATE teams
SET secondary_experience_def=secondary_experience_def-$potential
WHERE team_id=$teamId";
break;
case "GB";
$queryString="UPDATE teams
SET secondary_experience_gb=secondary_experience_gb-$potential
WHERE team_id=$teamId";
break;
}
$query = $this->db->query($queryString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateTeam($team)\n\t{\n\t}",
"public function increaseTeamSecondaryPotential($potential,$teamId,$action)\n {\n switch($action){\n\n case \"ATT\";\n $queryString=\"UPDATE teams\n SET secondary_experience_att=secondary_experience_att+$potential\n ... | [
"0.6718803",
"0.67108357",
"0.6570071",
"0.6519144",
"0.6449374",
"0.6415125",
"0.6275781",
"0.62264246",
"0.6090544",
"0.6050741",
"0.6033518",
"0.59433514",
"0.59432113",
"0.5919627",
"0.5918033",
"0.59154266",
"0.58692235",
"0.5842331",
"0.58349824",
"0.58315474",
"0.57754... | 0.64503425 | 4 |
/ |========================================================== | check method in use | public function checkMethodInUse($teamId)
{
$queryString="SELECT *
FROM team_used_corruption
WHERE team_id=$teamId";
$query = $this->db->query($queryString);
$result=$query->result_array();
if(empty($result))
{
return FALSE;
}else{
return TRUE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _check()\n {\n }",
"abstract public function check();",
"public function check() {}",
"public function check()\n {\n }",
"public function check()\n {\n }",
"public function check();",
"public function check();",
"public function check();",
"public function check();... | [
"0.8396448",
"0.7969359",
"0.79141164",
"0.79062927",
"0.79062927",
"0.79060227",
"0.79060227",
"0.79060227",
"0.79060227",
"0.79060227",
"0.76982135",
"0.76162505",
"0.7437659",
"0.7250684",
"0.7231539",
"0.7231539",
"0.72106427",
"0.71280396",
"0.700348",
"0.69870985",
"0.6... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.