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 |
|---|---|---|---|---|---|---|
Unsubscribe to a chan | public function unsubscribe(
$resourceType,
$resourceId,
$subscriberId,
$subscriberType = null
) {
$this
->backend
->fetchSubscriptions([
Field::CHAN_ID => $this->getChanIdList($resourceType, $resourceId),
Field::SUBE... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function unsubscribe($channel=null);",
"public function unsubscribe(): void;",
"private function unsubscribe()\n {\n $this->botman->hears('unsubscribe', function(BotMan $bot) {\n $userId = $bot->getUser()->getId();\n Subscriber::where('telegram_user_id', $userId)->delete(... | [
"0.7559348",
"0.70654386",
"0.69989914",
"0.6736201",
"0.6705151",
"0.6547445",
"0.65436345",
"0.6532159",
"0.6484924",
"0.64621824",
"0.6454529",
"0.6450998",
"0.6358939",
"0.62621576",
"0.60844123",
"0.5938163",
"0.5936604",
"0.58988833",
"0.5898759",
"0.5885378",
"0.584971... | 0.49518833 | 93 |
Delete all subscriber information | public function deleteSubscriber($subscriberId, $subscriberType = null)
{
$this->backend->deleteSubscriber($this->getSubscriberName($subscriberId, $subscriberType));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function clearSubscribers();",
"public function removeSubscribes();",
"public function destroy(Subscriber $subscriber)\n {\n //\n }",
"public function mpp_delete_subscriber(){\n $response = array();\n $response['success'] = false;\n $response['message'] = __( 'Error: ... | [
"0.78684413",
"0.7143973",
"0.6965729",
"0.6713598",
"0.6678256",
"0.6671317",
"0.6530665",
"0.64878887",
"0.64183944",
"0.6385615",
"0.6384603",
"0.6373077",
"0.63399434",
"0.6316889",
"0.6304023",
"0.6222982",
"0.6211773",
"0.6210456",
"0.6195898",
"0.6153217",
"0.61155623"... | 0.0 | -1 |
Delete all subscriber information | public function deleteSubscriberList($subscriberIdList, $subscriberType = null)
{
$this->backend->deleteSubscribers($this->getSubscriberNameList($subscriberIdList, $subscriberType));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function clearSubscribers();",
"public function removeSubscribes();",
"public function destroy(Subscriber $subscriber)\n {\n //\n }",
"public function mpp_delete_subscriber(){\n $response = array();\n $response['success'] = false;\n $response['message'] = __( 'Error: ... | [
"0.78684413",
"0.7143973",
"0.6965729",
"0.6713598",
"0.6678256",
"0.6671317",
"0.6530665",
"0.64878887",
"0.64183944",
"0.6385615",
"0.6384603",
"0.6373077",
"0.63399434",
"0.6316889",
"0.6304023",
"0.6222982",
"0.6211773",
"0.6210456",
"0.6195898",
"0.6153217",
"0.61155623"... | 0.0 | -1 |
Notify an action happened on a resource | public function notify(
$resourceType,
$resourceId,
$action,
$data = [],
$level = null,
$doExcludeCurrent = true
) {
return $this
->notifyChannel(
$this->getChanIdList($resourceType, $resourceId),
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function on($resource);",
"public function activityNotify();",
"public function notify() {}",
"public function notify() {}",
"public function notify() {}",
"function notify();",
"public function notify($instance);",
"public function eventMethod1()\n {\n // some code here...\n\n ... | [
"0.6633664",
"0.646473",
"0.62180316",
"0.62180316",
"0.62180316",
"0.60472614",
"0.5987602",
"0.58293796",
"0.57437634",
"0.57328594",
"0.5611502",
"0.5611502",
"0.5479141",
"0.54410875",
"0.5383758",
"0.5361154",
"0.53425926",
"0.53246677",
"0.5312561",
"0.52792335",
"0.526... | 0.5750485 | 8 |
Notify an action happened on a resource in an arbitrary channel | public function notifyChannel(
$chanId,
$resourceType,
$resourceId,
$action,
$data = [],
$level = null,
$doExcludeCurrent = true
) {
if (null === $level) {
$level = NotificationInterface::LEVEL_INFO;
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function onChannel($channel);",
"public function notify(\n $resourceType,\n $resourceId,\n $action,\n $data = [],\n $level = null,\n $doExcludeCurrent = true\n ) {\n return $this\n ->notifyChannel(\n $this... | [
"0.6189385",
"0.5805159",
"0.57198465",
"0.57198465",
"0.57198465",
"0.5704993",
"0.5657994",
"0.5577943",
"0.5526601",
"0.54631615",
"0.54407775",
"0.5431415",
"0.5395973",
"0.5395417",
"0.53906596",
"0.53641",
"0.534757",
"0.5301867",
"0.5289996",
"0.52534723",
"0.5252467",... | 0.5949152 | 1 |
Build notification from message instance | public function getNotification(MessageInstanceInterface $message)
{
return new DefaultNotification($message, $this->formatterRegistry->get($message->getType()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }",
"private function buildNotificationsBlock(): vo... | [
"0.64002085",
"0.5899662",
"0.57749265",
"0.57603616",
"0.57600236",
"0.57511544",
"0.5738588",
"0.5684837",
"0.56596583",
"0.5606979",
"0.55988276",
"0.55371207",
"0.5525252",
"0.54845864",
"0.5483535",
"0.5473821",
"0.5473821",
"0.546826",
"0.5454964",
"0.54362714",
"0.5429... | 0.6008841 | 1 |
Gets the format from the options | protected function format(array $options): string {
return strtolower($options[0] ?? '');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFormat() {}",
"public function getFormat() {}",
"public function getFormat() {}",
"public function getFormat();",
"public function getFormat();",
"public function getFormat();",
"public function getFormat();",
"public function getFormat();",
"public function getFormat();",
"abs... | [
"0.806224",
"0.806224",
"0.806224",
"0.7942394",
"0.7942394",
"0.7942394",
"0.7942394",
"0.7942394",
"0.7942394",
"0.7671255",
"0.7641368",
"0.7638767",
"0.7597225",
"0.75448304",
"0.74843556",
"0.74843556",
"0.74843556",
"0.74843556",
"0.74843556",
"0.74843556",
"0.74843556"... | 0.628267 | 71 |
Returns the file extension to set for the asset | protected function extension(array $options) {
$formatOptions = $this->extractFormatOptions($options);
$ext = ($formatOptions[self::EXTENSION_OPT] ?? null);
// fallback to default
if ($ext === null)
$ext = $this->defaultExtension($this->format($options));
return $ext;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFileExtension()\n {\n return $this->originalAsset->getFileExtension();\n }",
"public function getExt()\n {\n $type = $this->getType();\n if ($type === 'style') {\n return 'css';\n } elseif ($type === 'script') {\n return 'js';\n ... | [
"0.86695397",
"0.8069207",
"0.8037109",
"0.80190414",
"0.79883343",
"0.7969394",
"0.7909591",
"0.78998107",
"0.7899413",
"0.7898048",
"0.7878502",
"0.7878502",
"0.78506315",
"0.78281534",
"0.78209937",
"0.77917796",
"0.77671874",
"0.77389616",
"0.77157754",
"0.76904076",
"0.7... | 0.0 | -1 |
Gets the default file extension for the given format | protected function defaultExtension(string $format): ?string {
if ($format === '')
return null;
return $format;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFileExtension($format);",
"public function fileExtension(): string\n {\n return match_data($this,\n [\n Format::Xlsx => 'xlsx',\n Format::Pdf => 'pdf',\n Format::Html => 'html',\n Format::Ods => 'ods',\n ]);\n }",
"public... | [
"0.8279462",
"0.7792805",
"0.76325345",
"0.75568694",
"0.7512768",
"0.74028885",
"0.7298033",
"0.72927266",
"0.7228356",
"0.72227067",
"0.7204391",
"0.71614575",
"0.7151602",
"0.7128192",
"0.7117779",
"0.71068716",
"0.70959836",
"0.70890063",
"0.70879036",
"0.70772696",
"0.70... | 0.78104687 | 1 |
Extracts the format options from the options | protected function extractFormatOptions(array $options): array {
// first option is the format
array_shift($options);
return $this->extractNamedOptions($options);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFormat() {\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), array('format'));\n return $result;\n }",
"protected static abstract function getOptions();",
"function getOptions() ;",
"abstract public function getOptions();",
"public function getFormat() {}",
"p... | [
"0.6208235",
"0.620234",
"0.6194938",
"0.61932117",
"0.6177409",
"0.6177409",
"0.6177409",
"0.61272454",
"0.61272454",
"0.612638",
"0.61212885",
"0.6092796",
"0.60680914",
"0.5989749",
"0.5973268",
"0.5971609",
"0.5971609",
"0.5970162",
"0.59525895",
"0.5952339",
"0.5952339",... | 0.7741456 | 0 |
Returns the static model of the specified AR class. | public static function model($className=__CLASS__)
{
return parent::model($className);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function model()\r\n {\r\n return static::class;\r\n }",
"public static function model() {\n return parent::model(get_called_class());\n }",
"public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }",
"public static function model($cl... | [
"0.7483812",
"0.7379309",
"0.71527064",
"0.7139308",
"0.7061938",
"0.70307606",
"0.69274145",
"0.69274145",
"0.69244",
"0.69023794",
"0.68936044",
"0.68936044",
"0.68887764",
"0.68688226",
"0.68688226",
"0.68688226",
"0.68688226",
"0.68688226",
"0.68688226",
"0.68688226",
"0.... | 0.0 | -1 |
Retrieves a list of models based on the current search/filter conditions. | public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('pk',$this->pk);
$criteria->compare('nombres',$this->nombres,true);
$criteria->compare('apellidos',$this->apellidos,true);
$criteria... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getModels();",
"public function getModels();",
"public function findAll($model);",
"public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('w... | [
"0.6744886",
"0.6744886",
"0.660744",
"0.6478935",
"0.63809466",
"0.634619",
"0.6310661",
"0.63017946",
"0.62542254",
"0.6251588",
"0.6251588",
"0.6110578",
"0.60789883",
"0.6072824",
"0.6045855",
"0.60337853",
"0.6033558",
"0.60152847",
"0.5982737",
"0.5980334",
"0.5979643",... | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.63424... | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$module = Module::all();
$section = SectionTraining::find($id);
if (empty($section)) {
return view('404');
}
$type = SectionTrainingType::find($section->id_type);
//get all section training
$all_section = SectionTraini... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit(SectionTraining $sectionTraining)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.6833... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, SectionTraining $sectionTraining)
{
//
} | {
"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(SectionTraining $sectionTraining)
{
//
} | {
"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 |
Listen for messages published to channels matching the given patterns | public function psubscribe($patterns); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function subscribe($channels);",
"public function onMessages($pattern, $callback)\n {\n $handler = new EventListener($pattern, $callback);\n $this->dispatcher->addListener('message.channel', array($handler, 'testAndExecute'));\n $this->dispatcher->addListener('message.private', arr... | [
"0.6603072",
"0.6598305",
"0.6223854",
"0.5995287",
"0.5936532",
"0.5929271",
"0.5835901",
"0.5808263",
"0.5756815",
"0.57367975",
"0.5640888",
"0.55981904",
"0.5529045",
"0.55226",
"0.5451146",
"0.5287195",
"0.5271889",
"0.5268541",
"0.5225792",
"0.51986676",
"0.5179029",
... | 0.66774696 | 0 |
Post a message to a channel | public function publish($channel, $message); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function sendChannelMessage($message)\n\t{\n\t\t$this->sendMessage($this->channel, $message);\n\t}",
"public function publish($channel, $message)\n {\n $this->client->publish($channel, Serialization::serializeMessage($message));\n }",
"public static function postMessage\n\t(\n\t\t$channelID\t\t// ... | [
"0.72506166",
"0.6929759",
"0.67685205",
"0.67106724",
"0.6568419",
"0.6501193",
"0.6263474",
"0.6206428",
"0.6159041",
"0.6158004",
"0.6158004",
"0.6158004",
"0.6158004",
"0.61542904",
"0.6151222",
"0.6078997",
"0.6069342",
"0.6042062",
"0.6039",
"0.6012285",
"0.59338844",
... | 0.76314 | 0 |
Stop listening for messages posted to channels matching the given patterns | public function punsubscribe($pattern=null); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function StopMonitor($channel);",
"protected function _unsubscribeFromEngineEvents()\n {\n $events = array(\n Streamwide_Engine_Events_Event::SDP,\n Streamwide_Engine_Events_Event::CHILD,\n Streamwide_Engine_Events_Event::OKMOVED,\n Streamwide_Engine_E... | [
"0.5591928",
"0.5558591",
"0.55549693",
"0.5441828",
"0.53534156",
"0.52919394",
"0.5205901",
"0.51930517",
"0.5192115",
"0.5141517",
"0.5098255",
"0.509097",
"0.5070279",
"0.50608474",
"0.5051522",
"0.5051522",
"0.5051522",
"0.5051522",
"0.5051522",
"0.5051522",
"0.5051522",... | 0.60854775 | 0 |
Listen for messages published to the given channels | public function subscribe($channels); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function onChannel($channel);",
"public function channels()\n {\n $this->send(['command' => 'channels', 'seq'=>$this->getSequence()]);\n }",
"private function registerChannels(): void\n {\n if (config('messenger.routing.channels.enabled')) {\n $this->app->make(Broadcast... | [
"0.6428243",
"0.62156457",
"0.6096866",
"0.59608436",
"0.5826014",
"0.5822264",
"0.58021694",
"0.5777791",
"0.5774709",
"0.57393026",
"0.5632801",
"0.5626479",
"0.55955726",
"0.5585272",
"0.55755436",
"0.55661076",
"0.5557738",
"0.54510784",
"0.54392356",
"0.54380584",
"0.541... | 0.74562204 | 0 |
Stop listening for messages posted to the given channels | public function unsubscribe($channel=null); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function StopMonitor($channel);",
"protected function _unsubscribeFromEngineEvents()\n {\n $events = array(\n Streamwide_Engine_Events_Event::SDP,\n Streamwide_Engine_Events_Event::CHILD,\n Streamwide_Engine_Events_Event::OKMOVED,\n Streamwide_Engine_E... | [
"0.63967526",
"0.5975111",
"0.54820204",
"0.5443188",
"0.53814906",
"0.53706807",
"0.5349647",
"0.53451824",
"0.53378856",
"0.5265868",
"0.5234524",
"0.51767695",
"0.51397187",
"0.5113883",
"0.511321",
"0.51054",
"0.51054",
"0.51054",
"0.51054",
"0.51054",
"0.51054",
"0.510... | 0.64322376 | 0 |
for inserting data into the reserver table | function insert_to_reserver()
{
$servername="localhost";
$user_name="root";
$password="";
$dbname="project_menu";
$first_name=$_POST['firstname'];
$first_name=ucfirst($first_name);
$last_name=$_POST['lastname'];
$last_name=ucfirst($last_name);
$user_email=$_POST['email'];
$phone_number=$_POST['tel'];
$conn= new my... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function insert($cbtRekapNilai);",
"public function run() {\n DB::table('clients')->insert([\n 'regimen_id' => 1,\n 'person_id' => 1,\n 'city_id' => 1,\n 'department_id' => 1,\n 'status_id' => 1,\n 'document_id' => 1,\n 'd... | [
"0.68720526",
"0.67463297",
"0.666738",
"0.66516954",
"0.6616517",
"0.6610559",
"0.6610559",
"0.66015697",
"0.65938115",
"0.6592126",
"0.6583289",
"0.6551124",
"0.6535201",
"0.6532391",
"0.651624",
"0.6515524",
"0.64794433",
"0.6460832",
"0.64591444",
"0.64588803",
"0.6455881... | 0.61033493 | 76 |
Generate a random number using a randomly generated seed. | public function generateRandomNumber(int $min = 1, int $max = 1000): int {
$seed = mt_rand();
mt_srand($seed);
$randomNumbers = array();
for ($i = 0; $i < 10; $i++) {
$randomNumbers[] = mt_rand($min, $max);
}
$selectedNumberIndex = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function seedRand() {\r\n\t\tsrand((int)((($m=microtime(true))-((int)$m))*pow(10,(int)log10(PHP_INT_MAX)))); \r\n\t}",
"function generate($generator, $seed = 10) {\n mt_srand($seed);\n return Eris\\Sample::of($generator, 'mt_rand')->repeat(1)->collected()[0];\n}",
"public function seed($se... | [
"0.79664123",
"0.7526282",
"0.7471535",
"0.7382861",
"0.72653615",
"0.71674764",
"0.71189874",
"0.7009151",
"0.6936591",
"0.68587536",
"0.67708683",
"0.67642426",
"0.6718305",
"0.6675736",
"0.6673819",
"0.66480196",
"0.6635078",
"0.6626012",
"0.65913886",
"0.6549282",
"0.6534... | 0.0 | -1 |
primero obtener el id de la comprobacion y el nombre | public function getPrueba($idTitulo)
{
if (!$test = $this->Comprobacion_model->getComprobacion(array('Titulo' => $idTitulo))) {
return array(array(), 'descr' => '');
} else { // si existe obtener preguntas
$pregunta... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getIdCompra()\r\n {\r\n return $this->idCompra;\r\n }",
"public function ComprasPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM (compras INNER JOIN proveedores ON compras.codproveedor = proveedores.codproveedor) INNER JOIN usuarios ON compras.codigo = usuarios.codigo LEFT JOIN... | [
"0.67815936",
"0.6753972",
"0.65811837",
"0.6510901",
"0.6416909",
"0.6377886",
"0.63773626",
"0.6372287",
"0.6372287",
"0.6279062",
"0.62722045",
"0.6243813",
"0.62404037",
"0.62262344",
"0.61912495",
"0.61877495",
"0.61528486",
"0.61428154",
"0.6126314",
"0.6125697",
"0.611... | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
return view( 'admin.home' );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view('image.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$data = $this->imageService->createImage($request, null);
return response()->json(['data' => $data]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.63424... | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$images = $this->imageService->getImageById($id);
$link = json_decode($images->link);
$images->link = $link;
return view('image.edit', compact('images'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.6833... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$this->imageService->updateImage($id,$request);
$image = $this->imageService->getImageById($id);
return response()->json(['link' => $image->link ]);
} | {
"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)
{
$this->imageService->deleteImages($id);
return response()->json(['data' => 'complate']);
} | {
"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 |
Define custom actions here Logging in as an Admin | public function loginAsAdmin()
{
$I = $this;
$I->amOnPage('/admin');
$I->see('Sign In');
$I->fillField('email', 'admin@example.com');
$I->fillField('password', 'admin123');
$I->dontSee('The "Email" field is required.');
$I->dontSee('The "Password" field is req... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function admin_action() {\n\t}",
"public function admin_action() {\n\t}",
"private function actions() {\n\n $this->prefix = CUSTOM_LOGIN_OPTION;\n\n register_activation_hook( CUSTOM_LOGIN_FILE, array( $this, 'activate' ) );\n\n add_action( 'login_head', array( $this, 'cl... | [
"0.74784833",
"0.74784833",
"0.7398926",
"0.71068454",
"0.7002383",
"0.697422",
"0.6952154",
"0.6948259",
"0.688856",
"0.6834993",
"0.68231755",
"0.6816539",
"0.67888814",
"0.6762104",
"0.674781",
"0.6708848",
"0.67025197",
"0.67025197",
"0.6699145",
"0.66877",
"0.6664615",
... | 0.6258875 | 93 |
Validates a value. A validator class can implement this method to support data validation out of the context of a data model. | protected function validateValue($value)
{
$number = preg_replace('/[^0-9]/', '', $value); // strip non numeric characters
if (empty($this->typeValue) || empty($this->_cards) || empty($this->_cards[$this->typeValue])) {
return [$this->invalidTypeMessage, ['number' => $number]];
}... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function validateValue($value)\n {\n }",
"abstract protected function validateValue($value);",
"public static function validate($value);",
"public static function Validate($value) { self::__Validate($value,self::Values(),__CLASS__); }",
"public function validate($value);",
"public function v... | [
"0.8119479",
"0.8036628",
"0.79597354",
"0.795174",
"0.7938953",
"0.7938953",
"0.77009726",
"0.77009726",
"0.7565314",
"0.74176645",
"0.7394259",
"0.7366575",
"0.733058",
"0.7272135",
"0.7205143",
"0.7202048",
"0.7188197",
"0.7188197",
"0.7179817",
"0.7142041",
"0.7103777",
... | 0.0 | -1 |
Gets value based on attribute property or the value property | protected function parseValue($model, $prop, $default = null)
{
$value = "{$prop}Value";
if (isset($this->$value)) {
return $this->$value;
}
$attribute = "{$prop}Attribute";
if (isset($this->$attribute) && isset($model->{$this->$attribute})) {
return $... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getValueAttribute() {}",
"public function get($attribute);",
"public function getValue(string $attr)\n {\n $this->checkAttribute($attr);\n return $this->attributes[$attr];\n }",
"public function __get($name)\n {\n $attribute = parent::__get($name);\n if... | [
"0.7627318",
"0.7228712",
"0.70294714",
"0.69835484",
"0.6854661",
"0.67164105",
"0.67056364",
"0.6699993",
"0.6664343",
"0.66552806",
"0.6640594",
"0.6574664",
"0.65449494",
"0.6527604",
"0.64734393",
"0.6431795",
"0.6425958",
"0.64122677",
"0.6411158",
"0.6390295",
"0.63847... | 0.0 | -1 |
Gets the property of a card | protected function getCardProp($prop)
{
if (isset($this->typeValue) && isset($this->_cards[$this->typeValue]) && isset($this->_cards[$this->typeValue][$prop])) {
return $this->_cards[$this->typeValue][$prop];
}
throw new InvalidValueException('No card type detected. One of "typeV... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCard()\n {\n return $this->card;\n }",
"public function getCard() {\n return $this->card;\n }",
"public function get_card(){ return $this->_card;}",
"public function card()\n {\n if ( ! $this->bean->card) $this->bean->card = R::dispense('card');\n return $... | [
"0.73587",
"0.73505026",
"0.70686716",
"0.70159626",
"0.6954674",
"0.68009484",
"0.64440936",
"0.63217264",
"0.63088053",
"0.63088053",
"0.6277236",
"0.6250667",
"0.6202886",
"0.61676615",
"0.61396456",
"0.6135204",
"0.61159253",
"0.610888",
"0.60791755",
"0.60574245",
"0.605... | 0.5876258 | 29 |
Initializes related attribute values | protected function initValues($model, $attribute)
{
$this->expiryMonthValue = $this->parseValue($model, 'expiryMonth', '');
$this->expiryYearValue = $this->parseValue($model, 'expiryYear', '');
$this->holderValue = $this->parseValue($model, 'holder');
$this->cvvValue = $this->parseVa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function initAttribute();",
"protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\n\t\t$this->attributes['subtype'] = \"assignments\";\n\t}",
"protected abstract function initializeAttributes(): array;",
"protected function initializeAttributes() {\n\t\tparent::initialize... | [
"0.7389131",
"0.7322956",
"0.71741456",
"0.70577127",
"0.68915945",
"0.6864304",
"0.6676938",
"0.6642353",
"0.65942943",
"0.65509385",
"0.6528375",
"0.64911056",
"0.6463845",
"0.6426178",
"0.6424324",
"0.6417007",
"0.639959",
"0.6381442",
"0.63516563",
"0.634209",
"0.63274556... | 0.0 | -1 |
Check if the card holder name is valid | public function isValidHolder()
{
return !empty($this->holderValue) && preg_match($this->holderPattern, $this->holderValue);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _name_check($str){\n }",
"private function ValidateName($name){\n if (empty($name)){ //checks if empty\n $this->valid = False;\n }else if (strlen($name)>= 30){ //checks max length\n $this->valid = False;\n }else if(!preg_match(\"/^[a-zA-Z ]*$/\",$name)){ //che... | [
"0.6930809",
"0.69180316",
"0.6863945",
"0.68418515",
"0.68159664",
"0.6805217",
"0.6792469",
"0.6695895",
"0.6672061",
"0.66699326",
"0.6637037",
"0.662809",
"0.66240895",
"0.6608831",
"0.65966374",
"0.6594446",
"0.6589824",
"0.658925",
"0.6535304",
"0.6533795",
"0.65293205"... | 0.649008 | 24 |
Validates if the card expiry is correct | public function isValidExpiry()
{
$month = $this->expiryMonthValue;
$year = $this->expiryYearValue;
$monthNow = intval(date('n'));
$yearNow = intval(date('Y'));
if (is_scalar($month)) {
$month = intval($month);
}
if (is_scalar($year)) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function validate_expire_date($value)\n \t{\n \t$current_month=date(\"m\");\n\t\t$current_year=date(\"Y\"); \n\t\t$current_date=$current_year.$current_month;\n\t\t$expire_date=$value;\n\t\t\t\n\t\tif ($expire_date >= $current_date) {\n\t\t\treturn 1; // valid expire date\n\t\t}\n\t\telse {\n\t\t\treturn... | [
"0.735785",
"0.698944",
"0.6890495",
"0.6830082",
"0.67981374",
"0.6762844",
"0.66329616",
"0.65387195",
"0.6432012",
"0.6423044",
"0.641111",
"0.63837266",
"0.6376616",
"0.63720363",
"0.6351864",
"0.63451046",
"0.62929225",
"0.629138",
"0.62854254",
"0.62830925",
"0.62826914... | 0.72353196 | 1 |
Check if the card CVV is valid | public function isValidCVV()
{
return ctype_digit($this->cvvValue) && $this->validCVVLength();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function validCVVLength()\n {\n if (empty($this->cvvValue)) {\n return false;\n }\n $cvvLength = $this->getCardProp('cvvLength');\n foreach ($cvvLength as $length) {\n if (strlen($this->cvvValue) === $length) {\n return true;\n ... | [
"0.7276227",
"0.68107826",
"0.67192733",
"0.668024",
"0.6605354",
"0.6510927",
"0.6184723",
"0.611253",
"0.605536",
"0.604287",
"0.60405314",
"0.5968022",
"0.5968022",
"0.59226596",
"0.5886032",
"0.5868217",
"0.58346707",
"0.582154",
"0.5791632",
"0.57769036",
"0.57542366",
... | 0.8100069 | 0 |
Check if the card luhn checksum is valid | protected function validLuhn($number)
{
$luhn = $this->getCardProp('luhn');
if (empty($luhn)) {
return true;
}
return static::luhnCheck($number);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function isValid(): bool\n {\n $this->generateChecksum();\n return (($this->luhnValue % $this->base == 0) && ($this->luhnValue != 0));\n }",
"public function isValidChecksum()\n\t{\n\t\t$length = strlen($this->number);\n\t\t$value = $this->ccNumber;\n\t\t$sum = 0;\n $weight ... | [
"0.7908346",
"0.7738735",
"0.7276074",
"0.7235937",
"0.7155422",
"0.7118638",
"0.6955607",
"0.69150025",
"0.6784841",
"0.6731337",
"0.67215097",
"0.66684496",
"0.65390736",
"0.647836",
"0.6450336",
"0.64241135",
"0.641426",
"0.64107484",
"0.6378374",
"0.6316336",
"0.62288904"... | 0.5934517 | 39 |
Check if the card number is valid | protected function validCard($number)
{
$pattern = $this->getCardProp('pattern');
return preg_match($pattern, $number) && $this->validLuhn($number);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function is_valid_bank_card_number($number)\n{\n if (is_null($number) || strlen($number) < 16 || strlen($number) > 19)\n {\n return false;\n }\n $pattern = \"/^\\d{16,19}$/\";\n return (preg_match($pattern, $number) == 1);\n}",
"public function valid_cc_number($number)\n\t{\n\t\t// is the number in the c... | [
"0.8075409",
"0.7541567",
"0.74041075",
"0.73981637",
"0.7375306",
"0.735637",
"0.7309711",
"0.7197697",
"0.7189001",
"0.71197075",
"0.7107536",
"0.7069425",
"0.6995923",
"0.6987094",
"0.6937617",
"0.69036067",
"0.6898246",
"0.687361",
"0.68703574",
"0.68436337",
"0.6838388",... | 0.7233495 | 7 |
Check if the card CVV length is valid | protected function validCVVLength()
{
if (empty($this->cvvValue)) {
return false;
}
$cvvLength = $this->getCardProp('cvvLength');
foreach ($cvvLength as $length) {
if (strlen($this->cvvValue) === $length) {
return true;
}
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function isValidCvvLen($cvv) {\n $pattern = '/^[0-9]{3,4}$/';\n return preg_match($pattern, $cvv) ? TRUE : FALSE;\n }",
"public function isValidCVV()\n {\n return ctype_digit($this->cvvValue) && $this->validCVVLength();\n }",
"public function isValidLength()\n\t{\n\t\tif ($thi... | [
"0.77874863",
"0.77803177",
"0.68738616",
"0.67686486",
"0.62115264",
"0.5985545",
"0.57927614",
"0.5788978",
"0.5780474",
"0.57607245",
"0.5722373",
"0.5708762",
"0.57083076",
"0.56876063",
"0.56847167",
"0.5669611",
"0.5648677",
"0.5622031",
"0.5601647",
"0.5598988",
"0.557... | 0.8707792 | 0 |
The initialize method is called before the controller's beforeFilter method. | public function initialize( Controller $controller ) {
$settings = $this->settings;
$this->controller = $controller;
// FIXME
if( $this->_userId = $this->Session->read( 'Auth.User.id' ) ) {
$this->controller->assert( valid_int( $this->_userId ), 'invalidParamForToken' ); // FIXME
}
$this->User = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __init()\n\t{\n\t\t// This code will run before your controller's code is called\n\t}",
"protected function initializeController() {}",
"public function __construct()\n {\n $this->beforeFilter(function()\n {\n\n });\n }",
"public function __construct()\n {\n ... | [
"0.8070821",
"0.7997282",
"0.798269",
"0.79039645",
"0.79039645",
"0.7883938",
"0.7727886",
"0.7710762",
"0.7702258",
"0.76996106",
"0.76937556",
"0.76644254",
"0.76495963",
"0.76493293",
"0.76493293",
"0.7649171",
"0.7619978",
"0.7616893",
"0.76118183",
"0.76108426",
"0.7586... | 0.0 | -1 |
The beforeRedirect method is invoked when the controller's redirect method is called but before any further action. If this method returns false the controller will not continue on to redirect the request. The $url, $status and $exit variables have same meaning as for the controller's method. | public function beforeRedirect( Controller $controller, $url, $status = null, $exit = true ) {
parent::beforeRedirect( $controller, $url, $status , $exit );
return $url;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function mustRedirect();",
"public function beforeRedirect(Controller $Controller, $url, $status = null, $exit = true) {\n\t\tif (!empty($Controller->uses) && isset($Controller->{$Controller->modelClass}->lockable) && $Controller->{$Controller->modelClass}->lockable) {\n\t\t\tif (isset($Controller->params... | [
"0.6953164",
"0.68876463",
"0.65891665",
"0.65512604",
"0.64930564",
"0.6413982",
"0.6413982",
"0.6413982",
"0.63401526",
"0.62921107",
"0.62665105",
"0.625516",
"0.62379074",
"0.62308836",
"0.62308836",
"0.62308836",
"0.62308836",
"0.6212034",
"0.6190663",
"0.61799985",
"0.6... | 0.7694723 | 0 |
Call the Model constructor | function __construct()
{
parent::__construct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }",
"function __construct () {\n\t\t$this->_model = new Model();\n\t}",
"function __construct()\n {\n // 呼叫模型(Model)的建構函數\n parent::__construct();\n \n }",
"function __construc()... | [
"0.8196736",
"0.8080118",
"0.8054001",
"0.7839992",
"0.78184336",
"0.78158236",
"0.7770901",
"0.773286",
"0.7704549",
"0.7701882",
"0.7701882",
"0.7701882",
"0.7701882",
"0.76811564",
"0.76426494",
"0.75779855",
"0.75710344",
"0.75621206",
"0.7518676",
"0.75171185",
"0.751711... | 0.0 | -1 |
contructor of the class | function __construct($id = NULL)
{
if ($id != NULL) {
$this->id = $id;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _construct() {\n \t\n\t\t\n\t}",
"final private function __construct() {\n\t\t\t}",
"private function __construct()\t{}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __con... | [
"0.87680227",
"0.8700297",
"0.86710656",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.8660726",
"0.86428946",
... | 0.0 | -1 |
Callback instead of rules. | public function testCallback1(): void
{
$model = $this->createModel();
$validator = $this->createValidator($model);
// Age should be odd (nepāra skaitlis)
$validator->rule('age', [
[
function ($field, $value, $params, $data) {
return $... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract function rules();",
"abstract public function rules();",
"abstract public function rules();",
"abstract public function rules();",
"abstract public function rules();",
"abstract function rules();",
"public function rules();",
"public function rules();",
"public function rules();"... | [
"0.74657136",
"0.71453434",
"0.71453434",
"0.71453434",
"0.71453434",
"0.7121836",
"0.67501414",
"0.67501414",
"0.67501414",
"0.66861004",
"0.64135826",
"0.6401654",
"0.63241017",
"0.6260465",
"0.6260465",
"0.6260465",
"0.6248875",
"0.6235612",
"0.61692274",
"0.6160403",
"0.6... | 0.0 | -1 |
Create a new employee provider. | public function __construct(HasherContract $hasher, string $scope)
{
parent::__construct($hasher, Employee::class);
if (! in_array($scope, $this->allowedScopes)) {
throw new InvalidArgumentException("Employee scope [$scope] is not allowed.");
}
$this->scope = $scope;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createProvider();",
"public function create($params) {\n\t\t$this->validateInput($params);\n\n\t\t$employee = $this->employee->forceCreate($this->formatParams($params));\n\n\t\t$employee_term = $this->createEmployeeTerm($employee, $params);\n\n\t\t$this->createEmployeeDesignation($employee, $para... | [
"0.67299145",
"0.66411597",
"0.623943",
"0.6235594",
"0.62345254",
"0.6130273",
"0.6073243",
"0.5997405",
"0.59829354",
"0.59703046",
"0.5957863",
"0.5938256",
"0.59256524",
"0.5918902",
"0.59093946",
"0.59030807",
"0.5844666",
"0.5840325",
"0.57978773",
"0.57960343",
"0.5790... | 0.0 | -1 |
Retrieve a user by their unique identifier. | public function retrieveById($identifier)
{
return $this->createModel()->newQuery()->{$this->scope}()->find($identifier);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function retrieveById($identifier)\n {\n return User::find($identifier);\n }",
"public static function get_user($user_id);",
"public function get_user($identifier)\n {\n return $this->call_method(\"get/user\",\n array('identifier' => $identifier,\n )\n ... | [
"0.7874085",
"0.7821166",
"0.77227825",
"0.753227",
"0.7475642",
"0.74202543",
"0.74125993",
"0.7385195",
"0.7331228",
"0.73289955",
"0.7308177",
"0.7236237",
"0.72270316",
"0.7218127",
"0.7182016",
"0.7178964",
"0.7176346",
"0.7175991",
"0.7164751",
"0.71540815",
"0.7131668"... | 0.0 | -1 |
Retrieve a user by the given credentials. | public function retrieveByCredentials(array $credentials)
{
if (empty($credentials)) {
return;
}
// First we will add each credential element to the query as a where clause.
// Then we can execute the query and, if we found a user, return it in a
// Eloquent Empl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_user_by_credentials($credentials) {\n $stmt = $this->pdo->prepare('SELECT id, user_name, email_address, password, remember_me_until \n FROM users WHERE user_name = :user_name OR email_address = :email_address;');\n $stmt->... | [
"0.793193",
"0.75642693",
"0.74469113",
"0.7326185",
"0.72909325",
"0.7171141",
"0.7095507",
"0.68557364",
"0.6800361",
"0.67877597",
"0.6777385",
"0.67693186",
"0.6741582",
"0.6736178",
"0.6733566",
"0.66533244",
"0.66363764",
"0.66100967",
"0.66034484",
"0.66034484",
"0.660... | 0.66772145 | 15 |
Display a listing of the resource. | public function index()
{
$channels = Channel::all();
return view('home.channels.index', compact('channels'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view('home.channels.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
// dd($request->all());
$validatedData = $request->validate([
'name' => 'required|min:2|max:50',
'description' => 'nullable|min:5',
]);
$channel = new Channel();
$channel = $this->handleImageUpload($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 |
Check if a profile image has been uploaded | private function handleImageUpload(Request $request, Channel $channel){
if ($request->has('logo')) {
// Get image file
$image = $request->file('logo');
// Make a image name based on user name and current timestamp
$name = Str::slug($request->input('name')).'_'.tim... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasProfilePicture()\n {\n $file = public_path('/images/players/') . $this->id . '.webp';\n return ( file_exists($file) ) ? true : false;\n }",
"public function photoExists(): bool\n {\n return Storage::disk($this->profilePhotoDisk())->exists($this->profile_photo_path... | [
"0.7694139",
"0.72921115",
"0.724276",
"0.70549077",
"0.70106906",
"0.69444096",
"0.68692416",
"0.68683964",
"0.68220764",
"0.68220764",
"0.68219256",
"0.6784254",
"0.67752886",
"0.6756287",
"0.67381626",
"0.67139375",
"0.6706925",
"0.66958326",
"0.66589737",
"0.6578977",
"0.... | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
return view('home.channels.show', ['channel' => Channel::find($id)]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit(Channel $channel)
{
// dd($channel->description);
return view('home.channels.edit', ['channel' => $channel ]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.7855196",
"0.76957726",
"0.7273917",
"0.7241426",
"0.71717227",
"0.7064183",
"0.70528984",
"0.69836885",
"0.694763",
"0.69469565",
"0.6941572",
"0.69301945",
"0.6903868",
"0.68989486",
"0.68989486",
"0.68787694",
"0.68641657",
"0.6860115",
"0.6857286",
"0.68464494",
"0.683... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, Channel $channel)
{
// dd($channel, $request->all());
$validatedData = $request->validate([
'name' => 'required|min:2|max:50',
'description' => 'nullable|min:5',
]);
$channel = $this->handleImageUpload($request, $chann... | {
"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(Channel $channel)
{
// $channel = Channel::find($channel);
$message = 'Canal deletado com sucesso';
$channel->delete();
return redirect()->to('/channels')->with(['message' => $message]);
} | {
"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 |
Get Running Active Tickets in Site Gross Hold in previous 2 days | private function getLess2DaysCutOff($transdate, $sitecode)
{
$siteGHCutOff = new SiteGrossHoldCutOff();
//Cut Off Date To
$date = strtotime($transdate);
$dateTo = date("Y-m-d", strtotime("+1 day", $date));
$getRunningActive = $siteGHCutOff->getActiveTicketsByDate($transdate... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function Tickets() {\n\t$filter = array(\"Status\"=>\"Open\");\n\treturn self::get_tickets($filter);\n\t\n \n \n \n \n\t}",
"public function getActiveTickets() {\n try {\n $select = $this->select()\n ->from($this);\n// ->where('status =?... | [
"0.6198606",
"0.602018",
"0.6012934",
"0.577831",
"0.5712782",
"0.56098336",
"0.5532164",
"0.5392688",
"0.5377374",
"0.5289869",
"0.528103",
"0.5273387",
"0.52127546",
"0.52094144",
"0.5200146",
"0.5196404",
"0.51946",
"0.51821584",
"0.5176242",
"0.5175706",
"0.5159946",
"0... | 0.51278865 | 27 |
Get Running Active Tickets in Tickets Table in previous day | private function getDayCutOff($transdate, $sitecode)
{
$ticketModel = new TicketModel();
//Cut Off Date To
$date = strtotime($transdate);
$dateTo = date("Y-m-d", strtotime("+1 day", $date));
$getPrintedTickets = $ticketModel->getNumberOfPrintedTickets($transdate, $dateTo, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getActiveTickets() {\n try {\n $select = $this->select()\n ->from($this);\n// ->where('status =?',1);\n $result = $this->getAdapter()->fetchAll($select);\n } catch (Exception $exc) {\n echo $exc->getTraceAsStri... | [
"0.6583995",
"0.64950687",
"0.5939585",
"0.5902275",
"0.5870401",
"0.5845082",
"0.5818816",
"0.579764",
"0.5779022",
"0.5751545",
"0.57260317",
"0.57259464",
"0.564091",
"0.56292045",
"0.5608124",
"0.557891",
"0.55401915",
"0.55150676",
"0.5500198",
"0.54597324",
"0.544516",
... | 0.0 | -1 |
garbage collection is done on the memcached server, no need to do it here... | function mc_ses_gc($maxlt)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function cache_gc() {\n // TO DO!!!!!\n }",
"function cache_gc()\n {\n // because this gc function is called before storage is initialized,\n // we just set a flag to expunge storage cache on shutdown.\n $this->expunge_cache = true;\n }",
"function garbage_collection()\n{\n\tglobal ... | [
"0.77578104",
"0.7688553",
"0.7649746",
"0.7508744",
"0.7508744",
"0.7508744",
"0.7508744",
"0.7508744",
"0.7508744",
"0.7397591",
"0.7370965",
"0.7366213",
"0.73546",
"0.73452187",
"0.7291975",
"0.7210172",
"0.7179157",
"0.7126937",
"0.7084062",
"0.6896378",
"0.6858976",
"... | 0.0 | -1 |
$xmls = new \SimpleXMLElement( file_get_contents( storage_path( 'app\public\mock\Orders\ListOrdersResponse.xml' ) ) ); | public function ListOrders($continue = true)
{
if (!array_key_exists('CreatedAfter', $this->options) && !array_key_exists('LastUpdatedAfter', $this->options)) {
$this->setLimits('Created', '2017-01-01', '2017-01-02');
}
$this->options['Action'] = 'ListOrders';
$this->prep... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getXml() {}",
"function readInXML()\n {\n $xml = simplexml_load_file($this->url);\n return $xml;\n }",
"protected function _loadXML()\n {\n $fileContents = file_get_contents($this->_wsdlPath);\n $fileContents = str_replace('xs:', '', $fileContents);\n ... | [
"0.61623806",
"0.6067801",
"0.6026442",
"0.5982121",
"0.58738345",
"0.58500093",
"0.58087975",
"0.57588553",
"0.57413024",
"0.5712053",
"0.5645658",
"0.5627291",
"0.5556247",
"0.5523321",
"0.54728353",
"0.5459101",
"0.54353756",
"0.5419203",
"0.5416062",
"0.5396314",
"0.53814... | 0.0 | -1 |
Returns the list of orders. | public function getList()
{
if (isset($this->orderList)) {
return $this->orderList;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getAllOrders()\n {\n $dataService = new OrderDataService();\n\n return $dataService->getAllOrders();\n }",
"public function getOrders()\n {\n return $this->orders;\n }",
"public function Orders()\n {\n return $this->getOrders();\n }",
"public function GetAllOrders()... | [
"0.8403535",
"0.837304",
"0.8264767",
"0.82152873",
"0.81597173",
"0.7992888",
"0.799288",
"0.7940962",
"0.7880177",
"0.78399986",
"0.78278834",
"0.78264725",
"0.78177106",
"0.7812809",
"0.78027225",
"0.7792554",
"0.7762744",
"0.7726025",
"0.76651174",
"0.7641245",
"0.7593855... | 0.680407 | 98 |
Sets the time frame for the orders fetched. (Optional) Sets the time frame for the orders fetched. If no times are specified, times default to the current time. | public function setLimits($mode, $lower = null, $upper = null)
{
try {
if ($upper) {
$before = $this->genTime($upper);
} else {
$before = $this->genTime('- 2 min');
}
if ($lower) {
$after = $this->genTime($lower)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testSetTime() {\n $time = new \\DateTime();\n $this->order->setTime($time);\n $this->assertEquals($time, $this->order->getTime());\n }",
"public function setTime($time);",
"public static function addTimes()\n\t{\n\t\tforeach (TimeKeeper::getAll() as $key => $values) {\n\... | [
"0.5602996",
"0.5018955",
"0.5002487",
"0.48797274",
"0.48721212",
"0.47848022",
"0.4764151",
"0.4725844",
"0.4684448",
"0.46416906",
"0.4610569",
"0.4609728",
"0.46049935",
"0.4603836",
"0.4583867",
"0.45569155",
"0.4544521",
"0.4533037",
"0.45186272",
"0.44973543",
"0.44832... | 0.0 | -1 |
Sets the order status(es). (Optional) This method sets the list of Order Statuses to be sent in the next request. Setting this parameter tells Amazon to only return Orders with statuses that match those in the list. If this parameter is not set, Amazon will return Orders of any status. | public function setOrderStatusFilter($list)
{
if (is_string($list)) {
//if single string, set as filter
$this->resetOrderStatusFilter();
$this->options['OrderStatus.Status.1'] = $list;
} else if (is_array($list)) {
//if array of strings, set all filter... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setOrderStatus($orderStatus){\n return $this->setData(self::ORDER_STATUS, $orderStatus);\n }",
"protected function _fcpoSetOrderStatus() {\n $blIsAmazonPending = $this->_oFcpoHelper->fcpoGetSessionVariable('fcpoAmazonPayOrderIsPending');\n $blOrderOk = $this->_fcpoValidate... | [
"0.72443604",
"0.6824872",
"0.67398775",
"0.6737773",
"0.6732424",
"0.6702589",
"0.6606795",
"0.64995193",
"0.64766365",
"0.64658",
"0.6405694",
"0.62987787",
"0.6274773",
"0.62530595",
"0.621514",
"0.61630213",
"0.61616194",
"0.6146557",
"0.6125522",
"0.609733",
"0.60717773"... | 0.6410156 | 10 |
Removes order status options. Use this in case you change your mind and want to remove the Order Status parameters you previously set. | public function resetOrderStatusFilter()
{
foreach ($this->options as $op => $junk) {
if (preg_match("#OrderStatus#", $op)) {
unset($this->options[$op]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function remove_status( $order, $status ) {\n\n\t\treturn delete_post_meta( SV_WC_Order_Compatibility::get_prop( $order, 'id' ), '_wc_avatax_status', $status );\n\t}",
"public function deleteStatus()\n {\n $order_status = new OrderState((int)ConfPPM::getConf('status_paysto'));\n if (Valid... | [
"0.6884756",
"0.64209867",
"0.63911694",
"0.6282528",
"0.6261021",
"0.61297953",
"0.60928315",
"0.5940263",
"0.5838544",
"0.57040715",
"0.5631075",
"0.5557936",
"0.5542757",
"0.552905",
"0.54975086",
"0.54290336",
"0.54087687",
"0.5375259",
"0.5223845",
"0.52140033",
"0.52016... | 0.71749544 | 0 |
Sets the marketplace(s). (Optional) This method sets the list of Marketplaces to be sent in the next request. Setting this parameter tells Amazon to only return Orders made in marketplaces that match those in the list. If this parameter is not set, Amazon will return Orders belonging to the current store's default mark... | public function setMarketplaceFilter($list)
{
if (is_string($list)) {
//if single string, set as filter
$this->resetMarketplaceFilter();
$this->options['MarketplaceId.Id.1'] = $list;
} else if (is_array($list)) {
//if array of strings, set all filters
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setMarketplace($marketplace) {\n $this->marketplaceId = $marketplace;\n }",
"public function setListMarketplaces($value)\n {\n $this->_fields['ListMarketplaces']['FieldValue'] = $value;\n return $this;\n }",
"public function withListMarketplaces($value)\n {\n ... | [
"0.686151",
"0.6451205",
"0.6084095",
"0.5616697",
"0.5605863",
"0.5438534",
"0.5411805",
"0.53625154",
"0.5344959",
"0.5333703",
"0.52861553",
"0.5172519",
"0.51570046",
"0.5106644",
"0.50831336",
"0.5065351",
"0.5035239",
"0.4982318",
"0.49821988",
"0.49467465",
"0.49351332... | 0.5963878 | 3 |
Removes marketplace ID options and sets the current store's marketplace instead. Use this in case you change your mind and want to remove the Marketplace ID parameters you previously set. | public function resetMarketplaceFilter()
{
foreach ($this->options as $op => $junk) {
if (preg_match("#MarketplaceId#", $op)) {
unset($this->options[$op]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setMarketplace($marketplace) {\n $this->marketplaceId = $marketplace;\n }",
"public function setMarketplaceId($value)\n {\n $this->_fields['MarketplaceId']['FieldValue'] = $value;\n return $this;\n }",
"private function resetSkus()\n {\n foreach ($this->o... | [
"0.6137244",
"0.56911683",
"0.5467411",
"0.5458537",
"0.52779084",
"0.5251295",
"0.51486415",
"0.50501186",
"0.5045448",
"0.5009403",
"0.49769783",
"0.49490494",
"0.4946136",
"0.48805892",
"0.4868419",
"0.48433185",
"0.47996268",
"0.47982377",
"0.47949705",
"0.47653383",
"0.4... | 0.72764057 | 0 |
Sets (or resets) the Fulfillment Channel Filter | public function setFulfillmentChannelFilter($filter)
{
if ($filter == 'AFN' || $filter == 'MFN') {
$this->options['FulfillmentChannel.Channel.1'] = $filter;
} else if (is_null($filter)) {
unset($this->options['FulfillmentChannel.Channel.1']);
} else {
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setFulfillmentChannel($value)\n {\n $this->_fields['FulfillmentChannel']['FieldValue'] = $value;\n return $this;\n }",
"public function resetFilter()\n {\n $this->actor = null;\n $this->addTimestamp = null;\n $this->encryp... | [
"0.61961734",
"0.5955313",
"0.5824731",
"0.58120114",
"0.56129915",
"0.5586905",
"0.5460962",
"0.54503554",
"0.5344645",
"0.5330844",
"0.5325333",
"0.532207",
"0.5275709",
"0.5268247",
"0.5257941",
"0.52456856",
"0.52384704",
"0.51895267",
"0.51863277",
"0.51833105",
"0.51833... | 0.6905573 | 0 |
Sets the payment method(s). (Optional) This method sets the list of Payment Methods to be sent in the next request. Setting this parameter tells Amazon to only return Orders with payment methods that match those in the list. If this parameter is not set, Amazon will return Orders with any payment method. | public function setPaymentMethodFilter($list)
{
if (is_string($list)) {
//if single string, set as filter
$this->resetPaymentMethodFilter();
$this->options['PaymentMethod.1'] = $list;
} else if (is_array($list)) {
//if array of strings, set all filters... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPaymentMethod($paymentMethod = 'CC') {\n $method = array(\n 'x_method'=>strtoupper($paymentMethod),\n );\n $this->NVP = array_merge($this->NVP, $method); \n }",
"public function setPaymentMethod($method)\n {\n $this->_data['MediosPago'] = $method;\n }",
"public fu... | [
"0.69143283",
"0.6708846",
"0.66641176",
"0.6631584",
"0.660766",
"0.66071033",
"0.6375148",
"0.6364247",
"0.63342315",
"0.6289773",
"0.62782013",
"0.6266037",
"0.62542796",
"0.62093276",
"0.6098647",
"0.6098647",
"0.6079241",
"0.5935154",
"0.5889609",
"0.58831525",
"0.586774... | 0.5870936 | 20 |
Removes payment method options. Use this in case you change your mind and want to remove the Payment Method parameters you previously set. | public function resetPaymentMethodFilter()
{
foreach ($this->options as $op => $junk) {
if (preg_match("#PaymentMethod#", $op)) {
unset($this->options[$op]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function remove_options()\n {\n }",
"public function destroy(PaymentMethod $paymentMethod)\n {\n //\n }",
"public function destroy(PaymentMethod $paymentMethod)\n {\n //\n }",
"public function destroy(PaymentMethod $paymentMethod)\n {\n //\n }",
"... | [
"0.63440245",
"0.60570025",
"0.60570025",
"0.60570025",
"0.60083455",
"0.5933615",
"0.589471",
"0.58008677",
"0.57883877",
"0.578534",
"0.57775605",
"0.5743149",
"0.57117593",
"0.5624674",
"0.56147015",
"0.55963993",
"0.5595249",
"0.559016",
"0.55611193",
"0.54527384",
"0.545... | 0.79133016 | 0 |
Sets (or resets) the email address. (Optional) This method sets the email address to be sent in the next request. Setting this parameter tells Amazon to only return Orders with email addresses that match the email address given. If this parameter is set, the following options will be removed: SellerOrderId, OrderStatus... | public function setEmailFilter($filter)
{
if (is_string($filter)) {
$this->options['BuyerEmail'] = $filter;
//these fields must be disabled
unset($this->options['SellerOrderId']);
$this->resetOrderStatusFilter();
$this->resetPaymentMethodFilter();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setEmail($var)\n {\n GPBUtil::checkString($var, True);\n $this->email = $var;\n\n return $this;\n }",
"public function setEmail($var)\n {\n GPBUtil::checkString($var, True);\n $this->email = $var;\n\n return $this;\n }",
"public function set... | [
"0.7117752",
"0.7117752",
"0.7117752",
"0.7117752",
"0.71112126",
"0.7104797",
"0.6964029",
"0.6964029",
"0.6964029",
"0.6942451",
"0.69296724",
"0.6920619",
"0.6919207",
"0.687174",
"0.687174",
"0.687174",
"0.687174",
"0.687174",
"0.687174",
"0.687174",
"0.68658817",
"0.68... | 0.0 | -1 |
Sets (or resets) the seller order ID(s). (Optional) This method sets the list of seller order ID to be sent in the next request. Setting this parameter tells Amazon to only return Orders with seller order IDs that match the seller order ID given. If this parameter is set, the following options will be removed: BuyerEma... | public function setSellerOrderIdFilter($filter)
{
if (is_string($filter)) {
$this->options['SellerOrderId'] = $filter;
//these fields must be disabled
unset($this->options['BuyerEmail']);
$this->resetOrderStatusFilter();
$this->resetPaymentMethodFi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setSellerOrderId($value)\n {\n $this->_fields['SellerOrderId']['FieldValue'] = $value;\n return $this;\n }",
"public function withSellerOrderId($value)\n {\n $this->setSellerOrderId($value);\n return $this;\n }",
"public function setSellerProductIdList(?\... | [
"0.6359571",
"0.5966119",
"0.5622372",
"0.5559373",
"0.5506158",
"0.5500821",
"0.543005",
"0.53384763",
"0.5337009",
"0.5335075",
"0.53035873",
"0.52805144",
"0.5245622",
"0.52326137",
"0.5158248",
"0.5145946",
"0.5143545",
"0.5098057",
"0.5051394",
"0.49714354",
"0.493405",
... | 0.5645708 | 2 |
Sets the maximum response per page count. (Optional) This method sets the maximum number of Feed Submissions for Amazon to return per page. If this parameter is not set, Amazon will send 100 at a time. | public function setMaxResultsPerPage($num)
{
if (is_int($num) && $num <= 100 && $num >= 1) {
$this->options['MaxResultsPerPage'] = $num;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _getMaxResultsPerPage() {\r\n return 500;\r\n }",
"public function SetMaxCount ($maxCount);",
"public function setMaxcount($count)\n {\n $this->maxCount = $count;\n }",
"public function setMaxResults($maxResults);",
"public function setElementsPerPage($count);",
... | [
"0.6807092",
"0.6657158",
"0.6647547",
"0.6623299",
"0.63853025",
"0.6235321",
"0.6235321",
"0.6235321",
"0.6235321",
"0.6234689",
"0.6234689",
"0.6234648",
"0.6234648",
"0.6234648",
"0.6234648",
"0.62345505",
"0.623415",
"0.623415",
"0.623415",
"0.623415",
"0.623415",
"0.6... | 0.58064663 | 61 |
Sets the TFM shipment status(es). (Optional) This method sets the list of TFM Shipment Statuses to be sent in the next request. Setting this parameter tells Amazon to only return TFM Orders with statuses that match those in the list. If this parameter is not set, Amazon will return Orders of any status, including nonTF... | public function setTfmShipmentStatusFilter($list)
{
if (is_string($list)) {
//if single string, set as filter
$this->resetTfmShipmentStatusFilter();
$this->options['TFMShipmentStatus.Status.1'] = $list;
} else if (is_array($list)) {
//if array of strin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setShipmentStatus($value)\n {\n $this->_fields['ShipmentStatus']['FieldValue'] = $value;\n return $this;\n }",
"public function resetTfmShipmentStatusFilter()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match(\"#TFMShipmentStatus#\", $op)) ... | [
"0.6481788",
"0.63824666",
"0.6179867",
"0.5871015",
"0.579246",
"0.576576",
"0.57303244",
"0.57077485",
"0.5579207",
"0.554815",
"0.55355406",
"0.5423476",
"0.5419731",
"0.5419731",
"0.5372429",
"0.53558856",
"0.53558856",
"0.53139114",
"0.5309346",
"0.52811223",
"0.5279696"... | 0.7217934 | 0 |
Removes order status options. Use this in case you change your mind and want to remove the TFM Shipment Status parameters you previously set. | public function resetTfmShipmentStatusFilter()
{
foreach ($this->options as $op => $junk) {
if (preg_match("#TFMShipmentStatus#", $op)) {
unset($this->options[$op]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function resetOrderStatusFilter()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match(\"#OrderStatus#\", $op)) {\n unset($this->options[$op]);\n }\n }\n }",
"public function remove_status( $order, $status ) {\n\n\t\treturn delete_post_... | [
"0.7200157",
"0.6744555",
"0.6386438",
"0.628041",
"0.6238296",
"0.6193706",
"0.61807716",
"0.6041361",
"0.58759105",
"0.5735232",
"0.5657046",
"0.5610992",
"0.5541782",
"0.553637",
"0.54069424",
"0.5340629",
"0.5330095",
"0.5291634",
"0.52896494",
"0.52878654",
"0.5211265",
... | 0.71136445 | 1 |
Returns the storage name/identifier. | public function getName() {
return 'posts';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getStorageId()\n {\n return $this->_getField(self::$STORAGE_ID);\n }",
"public function getStorageId(): string\n {\n return sprintf('$%s', $this->getData());\n }",
"public function getStorageId() {\n return $this->configuration['storage_id'] ?: NULL;\n }",
"priva... | [
"0.84715825",
"0.81487834",
"0.80814475",
"0.7584611",
"0.75733274",
"0.7295246",
"0.72181445",
"0.7213224",
"0.7157246",
"0.7135782",
"0.70886123",
"0.6855157",
"0.6830804",
"0.68037504",
"0.67813414",
"0.67291063",
"0.670305",
"0.6688197",
"0.6674771",
"0.6669729",
"0.66524... | 0.0 | -1 |
Locates and returns multiple records. | public function find(array $where) {
$posts = get_posts($where);
return empty($posts) ? array() : array_map('WordPress\Model\Post\Post::forgeObject', $posts);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMultipleRecords() {\n $i = 0;\n $output = [];\n $_this = $this;\n while($row = $_this->fetchAssoc()){\n $output[\"data\"][$i] = $row;\n $i++;\n }\n return $output;\n }",
"public function getMultipleData();",
"public static fu... | [
"0.6149726",
"0.6113991",
"0.6089794",
"0.6073457",
"0.6048241",
"0.60258526",
"0.6002014",
"0.5993959",
"0.5931621",
"0.59060663",
"0.5882407",
"0.58811814",
"0.5807347",
"0.57838887",
"0.57500994",
"0.5707503",
"0.570487",
"0.5693648",
"0.5685252",
"0.56744784",
"0.56697726... | 0.0 | -1 |
Locates and returns a single record. | public function findOne(array $where) {
if ($postId = $this->extractPostId($where)) {
return Post::forgeObject(get_post($postId));
}
$posts = get_posts($where);
return empty($posts) ? null : Post::forgeObject(reset($posts));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findOne()\r\n {\r\n $records = $this->find(1);\r\n \r\n return isset($records[0]) ? $records[0] : null;\r\n }",
"private function findRecord()\n {\n /** If the request is a read record request, we need to do this so eager loading occurs. */\n if ($this->jsonApiRequest-... | [
"0.7619536",
"0.7357105",
"0.71219707",
"0.69580376",
"0.68801737",
"0.6865376",
"0.68512046",
"0.68377894",
"0.673828",
"0.6701625",
"0.6693036",
"0.66716933",
"0.666559",
"0.6652076",
"0.6626356",
"0.6625063",
"0.6625063",
"0.6591243",
"0.6516882",
"0.6516241",
"0.64745337"... | 0.0 | -1 |
Locates and returns a record by a field. | public function findOneBy($column, $value, array $where = array()) {
$where[$column] = $value;
return static::findOne($where);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function returnFindByField($field);",
"function getRecordByField($fieldName, $searchKey, $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordByField($this->table, $fieldName , $searchKey, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}",
... | [
"0.7806392",
"0.7106426",
"0.7106426",
"0.70381033",
"0.70268565",
"0.70268565",
"0.6875818",
"0.6781313",
"0.67061704",
"0.66652185",
"0.65904516",
"0.656981",
"0.6526176",
"0.65252846",
"0.65252846",
"0.64884377",
"0.6473933",
"0.64567",
"0.64313453",
"0.6411037",
"0.639486... | 0.0 | -1 |
Insert a record into storage. | public function insert(array $data) {
if (isset($data['ID'])) {
throw new RuntimeException("Cannot insert: post already exists.");
}
return (int)wp_insert_post($data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function insertRecord($tableName, $record);",
"public function insertRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getAddRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check ... | [
"0.6832303",
"0.6806585",
"0.64915276",
"0.64476174",
"0.6446913",
"0.64310676",
"0.64097035",
"0.6323734",
"0.62523353",
"0.6233798",
"0.6197234",
"0.61779076",
"0.61731446",
"0.6144302",
"0.6142425",
"0.61337835",
"0.6113294",
"0.6093674",
"0.604536",
"0.60317534",
"0.60153... | 0.0 | -1 |
Update a record in storage. | public function update(array $data, array $where) {
if (! isset($where['ID']) && ! isset($data['ID'])) {
throw new RuntimeException("Missing Post ID");
}
return (bool)wp_update_post(array_merge(array(), $where, $data));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function update($record);",
"function update($record)\n\t{\n\t\t// convert object from associative array, if needed\n\t\t$record = (is_array($record)) ? (object) $record : $record;\n\t\t// update the collection appropriately\n\t\t$key = $record->{$this->_keyfield};\n\t\tif (isset($this->_data[$key]))\n\t\... | [
"0.7743315",
"0.71022606",
"0.6714534",
"0.6670716",
"0.6608962",
"0.6525827",
"0.6446804",
"0.62830096",
"0.62830096",
"0.62777144",
"0.6245808",
"0.62408036",
"0.62205887",
"0.6211787",
"0.6208674",
"0.6162885",
"0.6070428",
"0.6070428",
"0.6056093",
"0.6040369",
"0.6022643... | 0.0 | -1 |
Delete a record from storage. | public function delete(array $where) {
if (! isset($where['ID'])) {
throw new RuntimeException("Missing Post 'ID'.");
}
return (bool)wp_delete_post($where['ID']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete() {\n\t\ttry {\n\t\t\tif($this->_state == self::STATE_UNCHANGED) {\n\t\t\t\t$sql = 'DELETE FROM ' . self::sanitize($this->_table->getProperty('name')) . ' WHERE ' . self::sanitize($this->_key_primary->name) . ' = ' . self::sanitize($this->_data[$this->_key_primary->name]);\n\t\t\t\t\\Bedrock... | [
"0.7222025",
"0.7132223",
"0.70361644",
"0.70240664",
"0.6964709",
"0.6963203",
"0.689951",
"0.6829722",
"0.6829722",
"0.6829722",
"0.6829722",
"0.6829722",
"0.6829722",
"0.6829722",
"0.6829722",
"0.6829722",
"0.6829722",
"0.6829722",
"0.6829722",
"0.6829722",
"0.6829722",
... | 0.0 | -1 |
Display a listing of the resource. | public function index(Role $role, Request $request)
{
$roles = Role::orderBy('created_at', 'desc')->paginate(5);
if($request->ajax()){
return view('roles.table', compact('roles'));
}
return view('roles.index', compact('roles'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view('roles.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request, Role $role)
{
$this->validateInputs($request);
$role['password_policy'] = $request->input('password_policy');
$role['name'] = $request->input('name');
$result = $role->save();
if($result){
return redirect('/roles')->with(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.63424... | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$role = Role::find($id);
return view('roles.show', compact('role'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$role = Role::find($id);
return view('roles.create', compact('role'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.7855196",
"0.76957726",
"0.7273917",
"0.7241426",
"0.71717227",
"0.7064183",
"0.70528984",
"0.69836885",
"0.694763",
"0.69469565",
"0.6941572",
"0.69301945",
"0.6903868",
"0.68989486",
"0.68989486",
"0.68787694",
"0.68641657",
"0.6860115",
"0.6857286",
"0.68464494",
"0.683... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$this->validateInputs($request);
$role = Role::find($id);
$role['name'] = $request->input('name');
$role['password_policy'] = $request->input('password_policy');
$result = $role->save();
if($result){
retu... | {
"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(Role $role)
{
$role->delete();
return response()->json([
'success' => 'Role deleted'
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n ... | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897... | 0.0 | -1 |
set the rotation, added via laravelpostgres module | public function setRotation(array $value)
{
$this->rotation = self::mutateToPgArray($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setRotation($rotation) {}",
"public function setRotation($rotation) {}",
"public function rotate()\n {\n // not possible in php?\n }",
"public function rotateBy($rotation) {}",
"function setRotation( $r ) {\n\n // only 0,90,180,270\n if ( $r > 270 ) return;\n if ( $r % 90... | [
"0.73458827",
"0.73446494",
"0.6547661",
"0.65194905",
"0.61397964",
"0.5802929",
"0.58019084",
"0.57643586",
"0.56851083",
"0.5580343",
"0.55761445",
"0.55710083",
"0.5553005",
"0.5553005",
"0.551491",
"0.54839563",
"0.5450881",
"0.5441643",
"0.5430857",
"0.53952724",
"0.537... | 0.63221383 | 4 |
get the rotation, added via laravelpostgres module | public function getRotation()
{
return self::accessPgArray($this->rotation);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRotation() {}",
"public function getRotation() {}",
"public function rotate()\n {\n // not possible in php?\n }",
"public function rotateBy($rotation) {}",
"function getOrientation() { return $this->readOrientation(); }",
"function getOrientation() { return $... | [
"0.71239984",
"0.7122745",
"0.58892494",
"0.5814341",
"0.570675",
"0.5661033",
"0.5640859",
"0.5637897",
"0.5549309",
"0.54435694",
"0.5432767",
"0.54020494",
"0.53324956",
"0.5314636",
"0.53025734",
"0.53025734",
"0.5269016",
"0.5234195",
"0.518322",
"0.51822793",
"0.5142739... | 0.7553048 | 0 |
set the Quaternion, added via laravelpostgres module | public function setQuaternion(array $value)
{
$this->quaternion = self::mutateToPgArray($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getQuaternion()\n {\n return self::accessPgArray($this->quaternion);\n }",
"public static function isQuaternion ($q) /*{{{*/\n {\n\n return $q instanceof Quaternion;\n }",
"public function setQuaternionPeriod($period)\n {\n $payload = '';\n $payload .=... | [
"0.6344536",
"0.5792985",
"0.5673246",
"0.5500293",
"0.5443374",
"0.54419863",
"0.5155063",
"0.50179154",
"0.49113074",
"0.48843318",
"0.4859933",
"0.48098814",
"0.4705739",
"0.46259198",
"0.4599543",
"0.45829996",
"0.45746654",
"0.45424712",
"0.4538877",
"0.45154116",
"0.446... | 0.67807287 | 0 |
get the Quaternion, added via laravelpostgres module | public function getQuaternion()
{
return self::accessPgArray($this->quaternion);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getQuaternion()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_QUATERNION, $payload);\n\n $payload = unpack('f1x/f1y/f1z/f1w', $data);\n\n $result['x'] = $payload['x'];\n $result['y'] = $payload['y'];\n ... | [
"0.73574585",
"0.59466577",
"0.584074",
"0.57292306",
"0.5579293",
"0.55788434",
"0.55208576",
"0.54182774",
"0.53547114",
"0.52363765",
"0.5175883",
"0.51389223",
"0.51015633",
"0.5082251",
"0.5080502",
"0.5073387",
"0.50435126",
"0.5016796",
"0.5013673",
"0.49547917",
"0.49... | 0.796481 | 0 |
set the objects to hide, added via laravelpostgres module | public function sethiddenObj(array $value)
{
$this->hiddenbuildings = self::mutateToPgArray($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setHidden(){\n $this->_hidden = true;\n }",
"public function hideExtraField()\n {\n $this->houses=false;\n $this->jobs_training=false;\n $this->motorcycles =false;\n $this->cars = false;\n $this->offices=false;\n $this->lands_plots=false;\n ... | [
"0.65488935",
"0.6460402",
"0.6178803",
"0.6092422",
"0.59349227",
"0.5798503",
"0.5689672",
"0.5689672",
"0.568746",
"0.5684192",
"0.5659607",
"0.55946773",
"0.55700934",
"0.55563074",
"0.55540293",
"0.5506603",
"0.54227203",
"0.54172444",
"0.53950393",
"0.53776145",
"0.5332... | 0.51082134 | 70 |
get the objects to hide, added via laravelpostgres module | public function gethiddenObj()
{
return self::accessPgArray($this->hiddenbuildings);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function listHiddenExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE visible = FALSE ORDER BY creation_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $e... | [
"0.6411051",
"0.63848597",
"0.5919522",
"0.59082866",
"0.59073645",
"0.5786537",
"0.57796",
"0.5646574",
"0.5623248",
"0.5618635",
"0.56067735",
"0.55228066",
"0.5508177",
"0.5506867",
"0.5497145",
"0.5497145",
"0.54460114",
"0.54138184",
"0.53985816",
"0.53952736",
"0.539158... | 0.5490272 | 16 |
set the vector objects to hide , added via laravelpostgres module | public function sethiddenObjLow(array $value)
{
$this->hiddenbuildingsLow = self::mutateToPgArray($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hideExtraField()\n {\n $this->houses=false;\n $this->jobs_training=false;\n $this->motorcycles =false;\n $this->cars = false;\n $this->offices=false;\n $this->lands_plots=false;\n return;\n }",
"public function setHidden(){\n $thi... | [
"0.6177584",
"0.5945084",
"0.57093763",
"0.54782856",
"0.546859",
"0.5466725",
"0.54365104",
"0.5422748",
"0.5353198",
"0.5289514",
"0.52535605",
"0.52257276",
"0.5211803",
"0.5154947",
"0.51190627",
"0.511504",
"0.509258",
"0.5065426",
"0.5061698",
"0.5048389",
"0.50386816",... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.