query
stringlengths
16
255
pos
list
neg
list
task
stringclasses
1 value
instruction
dict
Iterates through the deployers but doesn't run anything
[ "def describe(self):\n \"\"\"\"\"\"\n for stage, corunners in self.get_deployers():\n print self.name, \"STAGE \", stage\n for d in corunners:\n print d.__class__.__name__, \",\".join(\n [p[1].__name__ for p in d.phases]\n ...
[ "def finish_parse(self, last_lineno_seen):\n \"\"\"\"\"\"\n if self.state == self.STATES['step_in_progress']:\n # We've reached the end of the log without seeing the final \"step finish\"\n # marker, which would normally have triggered updating the step. As such we\n #...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Helper function for logging a response length error.
[ "def _log_length_error(self, key, length):\n \n extra = {\n \"max_detail_length\": settings.defaults[\"max_detail_length\"],\n \"len\": length\n }\n if self.key_name:\n extra[self.key_name] = key\n msg = \"Length of data in %s is too long.\" % self...
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the instruction about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
// PutOnboardingStatus will put the isOnboarding to storage
[ "func (s *Service) PutOnboardingStatus(ctx context.Context, v bool) error {\n\ts.onboardingKV.Store(onboardingKey, v)\n\treturn nil\n}" ]
[ "func (c *Card) GetMembershipChangeActions() (actions ActionCollection, err error) {\n\t// We include updateCard:closed as if the member is implicitly removed from the card when it's closed.\n\t// This allows us to \"close out\" the duration length.\n\treturn c.GetActions(Arguments{\"filter\": \"addMemberToCard,rem...
codesearchnet
{ "query": "Represent the Github comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Implementation of NAPALM method open.
[ "def open(self):\n \"\"\"\"\"\"\n try:\n if self.transport in ('http', 'https'):\n connection = pyeapi.client.connect(\n transport=self.transport,\n host=self.hostname,\n username=self.username,\n pas...
[ "function writeTimeBound(type, prmname, boundType, outputType) {\n return utils.parts(type, {\n B : prmname,\n // TODO: is this correct?\n C : boundType+'_'+(type === 'QU' ? 'UBT' : 'LBT')+'(KAF)',\n E : '1MON'\n }, outputType);\n //A=HEXT2014 B=SR-CMN_SR-CMN C=STOR_UBT(KAF) E=1MON F=CAMANCHE R FLOOD...
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
@param int $offset @param int $size @return \Elastica\ResultSet
[ "public function search($offset = null, $size = null)\n {\n $this->defineSearch($this->data, $this->contentType);\n $this->setPagination($offset, $size);\n\n return $this->getSearchResult();\n }" ]
[ "public function getAll(){\n $rest = $this->getService( self::API_STORAGE_PARTITION);\n $rest->GET();\n\n return $rest->getResultAsArray( models\\Storage\\DiskPartition::class);\n }" ]
codesearchnet
{ "query": "Represent the instruction about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Create an admin API key.
[ "def key(username, key, all):\n \"\"\"\"\"\"\n if username and username not in current_app.config['ADMIN_USERS']:\n raise click.UsageError('User {} not an admin'.format(username))\n\n def create_key(admin, key):\n key = ApiKey(\n user=admin,\n key=key,\n scope...
[ "@Override\n public void generatePluginConfig(String serverName, File writeDirectory) {\n // Pass true to utilityRequest since this method will be called from the pluginUtility\n // or by the GeneratePluginConfigListener not by a call to the mbean.\n generatePluginConfig(null,serverName,true...
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Find main ISO 4217 currency code in a list @param string[] $codes list of currency codes @return string|null
[ "public static function findMainCode($codes)\n {\n foreach (static::mainCodes() as $code) {\n if (in_array($code, $codes)) {\n return $code;\n }\n }\n\n return null;\n }" ]
[ "public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }" ]
codesearchnet
{ "query": "Represent the post about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Delete the file of this attachment from the iContact storage. @return bool Returns true if success.
[ "public function deleteFile()\n {\n $retval = false;\n\n if (($nb_icontact_prospect = $this->getIContactProspect()) instanceof CNabuIContactProspect &&\n ($nb_icontact = $nb_icontact_prospect->getIContact()) instanceof CNabuIContact\n ) {\n $base_path = $nb_icontact->ge...
[ "def delete_state(node)\n # => Find the Node\n existing = find_state(node)\n return 'Node not present in state' unless existing\n # => Delete the Node from State\n state.delete(existing)\n # => Write Out the Updated State\n write_state\n # => Return the Deleted Node\n ex...
codesearchnet
{ "query": "Represent the Github sentence about NLP:", "pos": "Represent the Github code about NLP:", "neg": "Represent the Github code about Software Development:" }
Translation one to many relation @param bool $active Only active translations @return \Illuminate\Database\Eloquent\Relations\HasMany
[ "public function translations($active = true)\n {\n if ($active) {\n return $this->hasMany(ContentTranslation::class)->where('is_active', '=', true);\n }\n return $this->hasMany(ContentTranslation::class);\n }" ]
[ "public function choices(): HasMany\n {\n return $this->hasMany(\\Iocaste\\Microservice\\Foundation\\Data\\Models\\Parameter\\Choice::class);\n }" ]
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Format a UNIX timestamp to a delta (relative to now).
[ "def fmt_delta(timestamp):\n \n try:\n return fmt.human_duration(float(timestamp), precision=2, short=True)\n except (ValueError, TypeError):\n return \"N/A\".rjust(len(fmt.human_duration(0, precision=2, short=True)))" ]
[ "@PrefMetadata(type = CmsTimeWarpPreference.class)\n public String getTimeWarp() {\n\n long warp = m_settings.getTimeWarp();\n return warp < 0 ? \"\" : \"\" + warp; // if timewarp < 0 (i.e. time warp is not set), use the empty string because we don't want the date selector widget to interpret the n...
codesearchnet
{ "query": "Represent the Github summarization about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
Makes this node a slave of the given node. @param [Node] node the node of which to become a slave
[ "def make_slave!(node)\n perform_operation do |redis|\n unless slave_of?(node)\n redis.slaveof(node.host, node.port)\n logger.info(\"#{self} is now a slave of #{node}\")\n wakeup\n end\n end\n end" ]
[ "def connectTo(self, remoteRouteName):\n \n self.remoteRouteName = remoteRouteName\n # This route must not be started before its router is started. If\n # sender is None, then the router is not started. When the router is\n # started, it will start this route.\n if self.r...
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Inject the form of panel cell in view. @param BlockView $view The block view @param BlockInterface $block The block
[ "protected function injectFormCell(BlockView $view, BlockInterface $block)\n {\n $section = BlockViewUtil::getParent($view, 'panel_section');\n\n if (null !== $section\n && $section->vars['rendered']\n && $view->vars['rendered']\n && null !== $formPath =...
[ "protected function configureFormer()\n {\n // Use Bootstrap 3\n Config::set('former.framework', 'TwitterBootstrap3');\n\n // Reduce the horizontal form's label width\n Config::set('former.TwitterBootstrap3.labelWidths', []);\n\n // Change Former's required field HTML\n ...
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
Creates a parser for the method based on the documentation. :return <OptionParser>
[ "def parser(self):\n \n usage = self.usage()\n if self.__doc__:\n usage += '\\n' + nstr(self.__doc__)\n\n parse = PARSER_CLASS(usage=usage)\n\n shorts = {v: k for k, v in self.short_keys.items()}\n for key, default in self.cmd_opts.items():\n # default...
[ "def build(self):\n \"\"\"\"\"\"\n from ambry.orm.config import BuildConfigGroupAccessor\n\n # It is a lightweight object, so no need to cache\n return BuildConfigGroupAccessor(self.dataset, 'buildstate', self._session)" ]
codesearchnet
{ "query": "Represent the Github instruction about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
@param string $filename @return \frostealth\yii2\aws\s3\commands\GetCommand
[ "public function get(string $filename): GetCommand\n {\n /** @var GetCommand $command */\n $command = $this->builder->build(GetCommand::class);\n $command->byFilename($filename);\n\n return $command;\n }" ]
[ "final public static function sinfo(array $params):string\n {\n return (\\iumioFramework\\Core\\Base\\Server\\GlobalServer::getServerInfo($params['name']));\n }" ]
codesearchnet
{ "query": "Represent the description about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Close channels and underlying pubsub handler :return: a coroutine and therefore it must be awaited
[ "async def close(self):\n \n push_connection = self.pubsub.push_connection\n self.status = self.statusType.closed\n if push_connection:\n push_connection.event('connection_lost').unbind(\n self._connection_lost\n )\n await self.pubsub.close...
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
// Less implements sort.Interface#Less.
[ "func (c cols2HandleSlice) Less(i, j int) bool {\n\treturn c[i].start < c[j].start\n}" ]
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Iterate through all items and print them.
[ "void metaSave(PrintWriter out) {\n synchronized (pendingReplications) {\n out.println(\"Metasave: Blocks being replicated: \" +\n pendingReplications.size());\n Iterator<Map.Entry<BlockInfo, PendingBlockInfo>> iter = \n pendingReplications.entrySet().iterator();\n while ...
[ "private static String keyToGoWithElementsString(String label, DuplicateGroupedAndTyped elements) {\n /*\n * elements.toString(), which the caller is going to use, includes the homogeneous type (if\n * any), so we don't want to include it here. (And it's better to have it in the value, rather\n * tha...
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
// ToUpperFirst upper cases the first letter in the string
[ "func ToUpperFirst(s1 string) string {\n\ta1 := []rune(s1)\n\ta1[0] = unicode.ToUpper(a1[0])\n\treturn string(a1)\n\t/*\n\t\t\tif s == \"\" {\n\t\t\treturn \"\"\n\t\t}\n\t\tr, n := utf8.DecodeRuneInString(s)\n\t\treturn string(unicode.ToUpper(r)) + s[n:]\n\t*/\n}" ]
[ "function Rule(rules) {\n this.rules = rules;\n // Identifies individual rule\n this.name = \"\";\n // Identifies the grammar that this rule belongs to \n this.grammarName = \"\";\n // Identifies types of rules. Rules can have \"types\" that are diff...
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code:" }
Initialise a set of built in CloneImplementors for commonly used JDK types
[ "private void initializeBuiltInImplementors() {\n\t\tbuiltInImplementors.put(ArrayList.class, new ArrayListImplementor());\n\t\tbuiltInImplementors.put(ConcurrentHashMap.class, new ConcurrentHashMapImplementor());\n\t\tbuiltInImplementors.put(GregorianCalendar.class, new GregorianCalendarImplementor());\n\t\tbuiltI...
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Get new value for topic id attribute.
[ "private void handleID(final AttributesImpl atts) {\n String idValue = atts.getValue(ATTRIBUTE_NAME_ID);\n if (idValue != null) {\n XMLUtils.addOrSetAttribute(atts, ATTRIBUTE_NAME_OID, idValue);\n final URI value = setFragment(dirPath.toURI().resolve(toURI(filePath)), idValue);\n...
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Bitcast this pointer constant to the given type.
[ "def bitcast(self, typ):\n \n if typ == self.type:\n return self\n op = \"bitcast ({0} {1} to {2})\".format(self.type, self.get_reference(),\n typ)\n return FormattedConstant(typ, op)" ]
[ "NameAndType nameType(Symbol sym) {\n return new NameAndType(sym.name, sym.externalType(types), types);\n // the NameAndType is generated from a symbol reference, and the\n // adjustment of adding an additional this$n parameter needs to be made.\n }" ]
codesearchnet
{ "query": "Represent the Github text about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code about programming:" }
checks the actual args match the expected args
[ "function (actualArgs, expectedArgs) {\n var i;\n if (actualArgs.length !== expectedArgs.length) {\n return false;\n }\n for (i = 0; i < expectedArgs.length; i++) {\n if (actualArgs[i] !== expectedArgs[i]) {\n return false;\n }\n }\n return true;\n }" ]
[ "def run_objective(objective, _name, raw_output, output_files, threads)\n # output is a, array: [raw_output, output_files].\n # output_files is a hash containing the absolute paths\n # to file(s) output by the target in the format expected by the\n # objective function(s), with keys as the keys ...
codesearchnet
{ "query": "Represent the comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Returns the cached content if available. @return string|boolean the cached content. False is returned if valid content is not found in the cache.
[ "public function getCachedContent()\n {\n if ($this->_content === null) {\n $this->_content = false;\n if ($this->cache instanceof Cache) {\n $key = $this->calculateKey();\n $data = $this->cache->get($key);\n if (is_array($data) && count($...
[ "public function validate( $input )\n {\n // Check if passed input is an object and instance of phpillowDocument\n // at all, otherwise we can exit immediately\n if ( !is_object( $input ) ||\n !( $input instanceof phpillowDocument ) )\n {\n throw new phpillowVal...
codesearchnet
{ "query": "Represent the comment about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code about PHP programming:" }
// Version command
[ "func (cli *Client) Version() (version string, err error) {\n\treps, err := cli.send(\"VERSION\", \"\")\n\tif err != nil {\n\t\treturn\n\t}\n\tif len(reps) == 0 {\n\t\terr = ErrInvalidReplies\n\t\treturn\n\t}\n\tif len(reps[0].Data) == 0 {\n\t\terr = ErrInvalidReplies\n\t\treturn\n\t}\n\tversion = reps[0].Data[0]\n...
[ "@Override\n public void generatePluginConfig(String serverName, File writeDirectory) {\n // Pass true to utilityRequest since this method will be called from the pluginUtility\n // or by the GeneratePluginConfigListener not by a call to the mbean.\n generatePluginConfig(null,serverName,true...
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Pre-write tasks @return void
[ "public function onBeforeWrite()\n {\n parent::onBeforeWrite();\n\n // Generate a unique item key based on the current ID and customisations\n $key = base64_encode(json_encode($this->Customisations()->map(\"Title\", \"Value\")->toArray()));\n $this->Key = $this->StockID . ':' . $key;\...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the summarization about writing:", "pos": "Represent the code about writing:", "neg": "Represent the code:" }
// GetState gets the current client state.
[ "func (c *Client) GetState() uint8 {\n\tc.stateLock.Lock()\n\tdefer c.stateLock.Unlock()\n\n\treturn c.state.State()\n}" ]
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the Github text about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code:" }
Save current state @return object
[ "function save() {\n\t\t$fw=Base::instance();\n\t\tif ($this->flag) {\n\t\t\tif (!is_dir($dir=$fw->get('TEMP')))\n\t\t\t\tmkdir($dir,Base::MODE,TRUE);\n\t\t\t$this->count++;\n\t\t\t$fw->write($dir.'/'.\n\t\t\t\t$fw->hash($fw->get('ROOT').$fw->get('BASE')).'.'.\n\t\t\t\t$fw->hash($this->file).'-'.$this->count.'.png'...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Pads the image with transparent pixels if necessary.
[ "def handle_padding(self, padding):\n ''''''\n left = padding[0]\n top = padding[1]\n right = padding[2]\n bottom = padding[3]\n\n offset_x = 0\n offset_y = 0\n new_width = self.engine.size[0]\n new_height = self.engine.size[1]\n\n if left > 0:\n...
[ "def transform_cb(self, setting, value):\n \"\"\"\"\"\"\n self.make_callback('transform')\n\n # whence=0 because need to calculate new extents for proper\n # cutout for rotation (TODO: always make extents consider\n # room for rotation)\n whence = 0\n self.redraw(wh...
codesearchnet
{ "query": "Represent the Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Returns a copy of this Token.
[ "public Token dup() {\n Token token = new Token(this.type, this.text, this.startLine, this.startColumn);\n token.setMeaning(this.meaning);\n\n return token;\n }" ]
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the Github instruction about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Adds a flash message. Updates "messages" session content (to enable multiple messages of one type). @param string $message Message to output. @param array|string|null $options Options @return void
[ "public function message($message, $options = null) {\n\t\t$options = $this->_mergeOptions($options);\n\n\t\t$this->set($message, $options);\n\n\t\t$this->_assertSessionStackSize($options);\n\t}" ]
[ "protected function help()\n {\n $style = new Style(' *** RUN - HELP ***');\n Out::std($style->color('fg', Style::COLOR_GREEN)->get());\n Out::std('');\n\n $help = new Help('...', true);\n $help->addArgument('', 'color', 'Activate colors (do not activate when redirect output in...
codesearchnet
{ "query": "Represent the Github text about PHP programming:", "pos": "Represent the Github code about PHP programming:", "neg": "Represent the Github code about programming:" }
Execute with a given timeout and sets the log level for the error output stream. @param timeoutMs a @param logLevel a @return a
[ "public NativeResponse exec(long timeoutMs, Level logLevel) {\n return exec(timeoutMs, TimeUnit.MILLISECONDS, logLevel);\n }" ]
[ "@Override\n\tpublic void validateSetup(Server server, Query query) throws ValidationException {\n\t\tlogger.info(\"Starting Stackdriver writer connected to '{}', proxy {} ...\", gatewayUrl, proxy);\n\t}" ]
codesearchnet
{ "query": "Represent the text about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Programming:" }
| Comment: The id of the assignee if the field is visible to end users
[ "def assignee(self):\n \n if self.api and self.assignee_id:\n return self.api._get_user(self.assignee_id)" ]
[ "protected function addSynchronizationInformation()\n {\n $this->html->pInfo($this->_(\n 'Check source for new surveys, changes in survey status and survey deletion. Can also perform maintenance on some sources, e.g. by changing the number of attributes.'\n ));\n $this...
codesearchnet
{ "query": "Represent the summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Data synchronization:" }
Registers all class loaders injected to the applications in the opposite order as they have been injected. @return void
[ "public function registerClassLoaders()\n {\n\n // initialize the registered managers\n /** @var \\AppserverIo\\Appserver\\Core\\Interfaces\\ClassLoaderInterface $classLoader */\n foreach ($this->getClassLoaders() as $classLoader) {\n // log the class loader we want to initialize\...
[ "private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n GetField fields = in.readFields();\n classLoaderIdentifier = (String) fields.get(CLASS_LOADER_IDENTIFIER, null);\n\n // Note that further processing is required in JEEMetadataContextProviderImp...
codesearchnet
{ "query": "Represent the Github instruction about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
@param string $provider @return string
[ "public function getShareLinkClickHandler($provider)\n {\n $constantPrefix = get_class($this).'::'.strtoupper($provider);\n $widthConstant = $constantPrefix.'_WIDTH';\n $heightConstant = $constantPrefix.'_HEIGHT';\n\n $handler = 'window.open(this.href, \\'\\', \\'directories=no,locati...
[ "final protected function c() {return dfc($this, function() {/** @var int|null $id $id */return\n\t\t!($id = $this->o()->getCustomerId()) ? null : df_customer($id)\n\t;});}" ]
codesearchnet
{ "query": "Represent the Github post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
终结请求:处理请求、会话、发送响应 @param \Phalcon\DI\FactoryDefault $di Phalcon的DI类
[ "private function handleRequestAndEnd(&$di)\n {\n $response = Http\\Response\\QpResponse::getResponse();\n $response->setContent(\n (new \\Phalcon\\Mvc\\Application($di))->handle()->getContent()\n );\n $response->send();\n }" ]
[ "public static String getTransferQueue(String name) {\n LOG.debug(\"对于需要保序的情况,只应该启动单个中转节点,目前启动多个节点原节点会被挤掉线,但是由于重连机制,会轮着挤掉线\");\n return IdManager.generateStaticQueueId(buildTransferName(name));\n }" ]
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// AutoGenerateObjectIDIfNotExistEqual returns true if the two options are equal. // In case of one option being nil, the value of the other must be nil as well // or be set to the default value of this option.
[ "func AutoGenerateObjectIDIfNotExistEqual(o1, o2 *AutoGenerateObjectIDIfNotExistOption) bool {\n\tif o1 != nil {\n\t\treturn o1.Equal(o2)\n\t}\n\tif o2 != nil {\n\t\treturn o2.Equal(o1)\n\t}\n\treturn true\n}" ]
[ "function Rule(rules) {\n this.rules = rules;\n // Identifies individual rule\n this.name = \"\";\n // Identifies the grammar that this rule belongs to \n this.grammarName = \"\";\n // Identifies types of rules. Rules can have \"types\" that are diff...
codesearchnet
{ "query": "Represent the text about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Returns whether predictions can be discarded (depends on selected measure).
[ "protected boolean canDiscardPredictions() {\n switch (m_Owner.getEvaluation().getSelectedTag().getID()) {\n case DefaultEvaluationMetrics.EVALUATION_AUC:\n case DefaultEvaluationMetrics.EVALUATION_PRC:\n return false;\n default:\n return true;\n }\n }" ]
[ "def run_objective(objective, _name, raw_output, output_files, threads)\n # output is a, array: [raw_output, output_files].\n # output_files is a hash containing the absolute paths\n # to file(s) output by the target in the format expected by the\n # objective function(s), with keys as the keys ...
codesearchnet
{ "query": "Represent the summarization about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code:" }
Setting various configuration options
[ "def config(config, fork_name=\"\", origin_name=\"\"):\n \"\"\"\"\"\"\n state = read(config.configfile)\n any_set = False\n if fork_name:\n update(config.configfile, {\"FORK_NAME\": fork_name})\n success_out(\"fork-name set to: {}\".format(fork_name))\n any_set = True\n if origin...
[ "func (r *controller) Update(ctx context.Context, t *api.Task) error {\n\t// TODO(stevvooe): While assignment of tasks is idempotent, we do allow\n\t// updates of metadata, such as labelling, as well as any other properties\n\t// that make sense.\n\treturn nil\n}" ]
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
Drop candidates belonging to encodings that are outdated subsets or variants of other encodings with valid candidates. @param array $Arr An array of potential candidates. @return array The input array, hopefully reduced, if possible.
[ "private function dropVariants(&$Arr)\n {\n if (isset($Arr['GB18030'], $Arr['GB2312'])) {\n unset($Arr['GB2312']);\n }\n if (isset($Arr['UCS-2']) && (isset($Arr['UTF-16BE']) || isset($Arr['UTF-16LE']))) {\n unset($Arr['UCS-2']);\n }\n if (isset($Arr['UCS-4...
[ "def reset ():\n \n global __prefixes_suffixes, __suffixes_to_types, __types, __rule_names_to_types, __target_suffixes_cache\n\n __register_features ()\n\n # Stores suffixes for generated targets.\n __prefixes_suffixes = [property.PropertyMap(), property.PropertyMap()]\n\n # Maps suffixes to types...
codesearchnet
{ "query": "Represent the text about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Reset any specific LDAP controls used with this operation. This is to make sure they are not accidentally used in future operations when it is not expected. @param LdapOperationInterface $operation
[ "protected function resetLdapControls(LdapOperationInterface $operation)\n {\n foreach ($operation->getControls() as $control) {\n $value = $control->getValue();\n $control->setValue($control->getResetValue());\n $this->connection->setControl($control);\n $contr...
[ "private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n GetField fields = in.readFields();\n beginDefaultContext = fields.get(BEGIN_DEFAULT, true);\n\n // Note that further processing is required in JEEMetadataContextProviderImpl.deserializeThreadCo...
codesearchnet
{ "query": "Represent the Github post about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
// run runs a service and restarts it upon termination, unless a shutdown // notification has been received.
[ "func (svc *Service) run() {\n\n\t// Wait for dependencies to start.\n\tfor _, dep := range svc.dependencies {\n\t\tlog.Infof(\"Service %s waiting for %s to start\", svc.name, dep.name)\n\t\tselect {\n\t\tcase started := <-dep.started:\n\t\t\tdep.started <- started\n\t\tcase <-svc.shutdown:\n\t\t\tgoto done\n\t\t}\...
[ "def process_request_thread(self, request, client_address):\n \"\"\"\"\"\"\n # Instantiate the request handler.\n handler = self.RequestHandlerClass(request, client_address, self)\n try:\n # Attempt to handle a request with the handler.\n handler.handle_request()\n self.request_complete_c...
codesearchnet
{ "query": "Represent the text about Container management:", "pos": "Represent the code about Container management:", "neg": "Represent the code:" }
/* Filter the dependency artifacts according to the includes and excludes If includes and excludes are both null, the original set is returned. @param dependencies the list of dependencies to filter @return the resulting set of dependencies
[ "public Set<Artifact> filterArtifacts( Set<Artifact> dependencies )\n {\n if ( includes == null && excludes == null )\n {\n return dependencies;\n }\n \n AndArtifactFilter filter = new AndArtifactFilter( );\n if ( includes != null )\n {\n fil...
[ "def register (g):\n \n assert isinstance(g, Generator)\n id = g.id()\n\n __generators [id] = g\n\n # A generator can produce several targets of the\n # same type. We want unique occurence of that generator\n # in .generators.$(t) in that case, otherwise, it will\n # be tried twice and we'll...
codesearchnet
{ "query": "Represent the Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Removes an event from the collection. @param EventInterface $event
[ "public function remove(EventInterface $event)\n {\n $index = $this->computeIndex($event);\n if (isset($this->events[$index])) {\n foreach ($this->events[$index] as $key => $internalEvent) {\n if ($event->getUid() == $internalEvent->getUid()) {\n unset($...
[ "def property_(getter: Map[Domain, Range]) -> property:\n \n return property(map_(WeakKeyDictionary())(getter))" ]
codesearchnet
{ "query": "Represent the instruction about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Basic cleanup after modules. The state's output becomes the input for the next stage. Any errors are moved to the global_errors attribute so that they can be reported at a later stage.
[ "def cleanup(self):\n \n # Move any existing errors to global errors\n self.global_errors.extend(self.errors)\n self.errors = []\n\n # Make the previous module's output available to the next module\n self.input = self.output\n self.output = []" ]
[ "def _mp_run_check(tasks, results, options):\n \n\n try:\n for index, change in iter(tasks.get, None):\n # this is the part that takes up all of our time and\n # produces side-effects like writing out files for all of\n # the report formats.\n change.check()\...
codesearchnet
{ "query": "Represent the summarization about Data management:", "pos": "Represent the code about Data management:", "neg": "Represent the code:" }
Dumps a starting/ending block directive. @param string $directiveString the start/end directive string @param int $spaces the indentation spaces @return string the dumped directive
[ "private function dumpBlock($directiveString, $spaces = 0)\n {\n $config = '';\n $value = $this->getValue() ? ' '.$this->getValue() : '';\n\n if (!$this->isMainContext()) {\n $config = str_repeat(' ', $spaces).sprintf(\n $directiveString,\n $this->get...
[ "public final String trace() {\n // TODO(lukes): textifier has support for custom label names by overriding appendLabel.\n // Consider trying to make use of (using the Label.info field? adding a custom NamedLabel\n // sub type?)\n Textifier textifier =\n new Textifier(Opcodes.ASM7) {\n {...
codesearchnet
{ "query": "Represent the Github post about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about Programming:" }
// handleSignout is the HTTP handler for the POST /signout route.
[ "func (h *SessionHandler) handleSignout(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\treq, err := decodeSignoutRequest(ctx, r)\n\tif err != nil {\n\t\th.Logger.Info(\"failed to decode request\", zap.Error(err))\n\t\tEncodeError(ctx, err, w)\n\t\treturn\n\t}\n\n\tif err := h.SessionService.Exp...
[ "def webhook_handler(request):\n \n body = request.stream.read().decode('utf8')\n print('webhook handler saw:', body)\n api.notify_webhook_received(payload=body)\n\n # nb. protected references are not part of the API.\n # this is just to demonstrate that the asyncid is stored\n print('key store...
codesearchnet
{ "query": "Represent the Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Convert name to Unicode text format. IDN ACE lables are converted to Unicode. @param omit_final_dot: If True, don't emit the final dot (denoting the root label) for absolute names. The default is False. @rtype: string
[ "def to_unicode(self, omit_final_dot = False):\n \n\n if len(self.labels) == 0:\n return u'@'\n if len(self.labels) == 1 and self.labels[0] == '':\n return u'.'\n if omit_final_dot and self.is_absolute():\n l = self.labels[:-1]\n else:\n ...
[ "def GetDictToFormat(self):\n \"\"\"\"\"\"\n d = {}\n for k, v in self.__dict__.items():\n # TODO: Better handling of unicode/utf-8 within Schedule objects.\n # Concatinating a unicode and utf-8 str object causes an exception such\n # as \"UnicodeDecodeError: 'ascii' codec can't decode byte ...
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Get the image sizes from the theme. @return array
[ "private function getThemeImageSizes()\n {\n $dataProvider = new DefaultDataProvider();\n $dataProvider->setBaseConfig(['source' => 'tl_image_size']);\n\n $config = $dataProvider->getEmptyConfig();\n $config->setFields(['id', 'name', 'width', 'height']);\n $config->setSorting([...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the description about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Set the request on the handler instance. @param \Swoft\Http\Message\Server\Request $request @return void
[ "public function setRequestOnHandler($request)\n {\n if ($this->handlerNeedsRequest()) {\n /** @var NeedRequestInterface $handler */\n $handler = $this->getHandler();\n $handler->setRequest($request);\n }\n }" ]
[ "public function handle(WorkerStartEventParam $e)\n {\n if(!$e->server->getSwooleServer()->taskworker)\n {\n RequestContext::create();\n foreach(ServerManage::getServers() as $server)\n {\n RequestContext::set('server', $server);\n $ser...
codesearchnet
{ "query": "Represent the Github text about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Return all updated objects @return \SilverStripe\ORM\ArrayList
[ "public function getUpdated()\n {\n $set = new ArrayList();\n foreach ($this->updated as $arrItem) {\n $set->push(ArrayData::create($arrItem));\n }\n return $set;\n }" ]
[ "public function GetTableColumnNames($tableName) {\n $this->setDbConfigList(array());\n $dbConfig = new \\Puzzlout\\Framework\\Dal\\DbStatementConfig(null, \\Puzzlout\\Framework\\Dal\\DbExecutionType::COLUMNNAMES, new \\Puzzlout\\Framework\\Dal\\DbQueryFilters());\n $dbConfig->setQuery(\"DESCRI...
codesearchnet
{ "query": "Represent the Github post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Sets the path to the start gallery of the user or removes the entry from user settings if no path is null.<p> @param galleryType the type of the gallery @param galleryUri the gallery URI
[ "public void setStartGallery(String galleryType, String galleryUri) {\n\n if (galleryUri == null) {\n m_startGalleriesSettings.remove(galleryType);\n } else {\n m_startGalleriesSettings.put(galleryType, galleryUri);\n }\n }" ]
[ "def initialize(self, id=None, text=None):\n self.id = none_or(id, int)\n \n\n self.text = none_or(text, str)\n \"\"\"\n Username or IP address of the user at the time of the edit : str | None\n \"\"\"" ]
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Adds num to the current value, jumping up the next multiple of mfac if the result is not a multiple already
[ "def add(self, num):\n \n try:\n val = self.value() + num\n except:\n val = num\n\n chunk = self.mfac.value()\n if val % chunk > 0:\n if num > 0:\n val = chunk*(val // chunk + 1)\n elif num < 0:\n val = chun...
[ "def _calculate_index_of_coincidence(frequency_map, length):\n \n if length <= 1:\n return 0\n # We cannot error here as length can legitimiately be 1.\n # Imagine a ciphertext of length 3 and a key of length 2.\n # Spliting this text up and calculating the index of coincidence res...
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code:" }
// ociBreak calls OCIBreak if ctx.Done is finished before done chan is closed
[ "func (stmt *OCI8Stmt) ociBreak(ctx context.Context, done chan struct{}) {\n\tselect {\n\tcase <-done:\n\tcase <-ctx.Done():\n\t\t// select again to avoid race condition if both are done\n\t\tselect {\n\t\tcase <-done:\n\t\tdefault:\n\t\t\tresult := C.OCIBreak(\n\t\t\t\tunsafe.Pointer(stmt.conn.svc), // The service...
[ "@Override public void dinvoke( H2ONode sender ) {\n _h2o = sender;\n Key k = _key;\n _key = null; // Not part of the return result\n assert k.home(); // Gets are always from home (less we do replication)\n // Shipping a result? Track replicas so we can invalidate. There's a\n // n...
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
Create clone this model. @return Model
[ "public function toClone()\n {\n $attributes = $this->toArray(false);\n\n unset($attributes['id']);\n unset($attributes['_id']);\n\n return $this->create($attributes, false);\n }" ]
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github instruction about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Returns the registered mock. @param string $fqfn The fully qualified function name. @return Mock The registered Mock. @see Mock::getFQFN()
[ "public function getMock($fqfn)\n {\n if (! isset($this->mocks[$fqfn])) {\n return null;\n }\n return $this->mocks[$fqfn];\n }" ]
[ "function validateService($pluginInstance)\n {\n if (! is_object($pluginInstance) )\n throw new \\Exception(sprintf('Can`t resolve to (%s) Instance.', $pluginInstance));\n\n if (!$pluginInstance instanceof aGrantRequest)\n throw new exContainerInvalidServiceType('Invalid Plugi...
codesearchnet
{ "query": "Represent the description about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about Software development:" }
! @brief Read buffered SWO data from the target. @eturn Bytearray of the received data.
[ "def swo_read(self):\n \n try:\n return self._link.swo_read()\n except DAPAccess.Error as exc:\n six.raise_from(self._convert_exception(exc), exc)" ]
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Defines the color that will be used to colorize the tickmarks. This color will only be used if no tickmark section or major-, medium- and minorTickMarkColor is defined at the position of the tickmark. @param COLOR
[ "public void setTickMarkColor(final Color COLOR) {\n if (null == tickMarkColor) {\n _tickMarkColor = COLOR;\n fireUpdateEvent(REDRAW_EVENT);\n } else {\n tickMarkColor.set(COLOR);\n }\n }" ]
[ "function PbfSplicer(options) {\n // tag which will be auto-removed and auto-injected. Usually 'name'\n this.nameTag = options.nameTag;\n // tag that contains JSON initially, and which works as a prefix for multiple values\n this.multiTag = options.multiTag;\n\n // If options.namePicker is given, this class co...
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Cleans a RUT from invalid characters and separates it @param string $rut @param bool $uppercase @return array @throws InvalidRutException
[ "public static function separateRut(string $rut, bool $uppercase = true)\n {\n // Throw an exception if after cleaning the RUT we receive null, since\n // we cannot separate an empty string, thus making the resulting\n // array impossible to return. Also, it makes it catchable.\n if (...
[ "final private function checkScalarValue(string $scalar):bool\n {\n if ($this->strlikeInArray($scalar, $this->scalar) !== false) {\n return (true);\n } else {\n throw new Server500(new \\ArrayObject(array(\"explain\" => \"Unknow type $scalar in Mercure\",\n \"so...
codesearchnet
{ "query": "Represent the summarization about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Software development:" }
/* this version of the parser tries to get rid of the dependency on node.js Buffer - works for binary files - for some reason fails with ASCII files, very likely due to how data is cut and reassembled
[ "function makeStreamParser() {\n var chunkNb = 0;\n var isBinary = false;\n\n var faceOffset = 0;\n var previousRemainderData = void 0;\n\n var parser = function parser(chunk, enc, callback) {\n // console.log('chunk', chunk.length, chunkNb)\n if (chunkNb === 0) {\n isBinary = (0, _utils.isDataBinar...
[ "def _read(self):\n \"\"\"\"\"\"\n with open(self.path, 'r') as file_handle:\n\n content = file_handle.read()\n\n # Py27 INI config parser chokes if the content provided is not unicode.\n # All other versions seems to work appropriately. Forcing the value to\n # unicode...
codesearchnet
{ "query": "Represent the Github instruction about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Remove the key from the cache bank with all the key content.
[ "def flush(bank, key=None):\n '''\n \n '''\n if key is None:\n c_key = bank\n else:\n c_key = '{0}/{1}'.format(bank, key)\n try:\n return api.kv.delete(c_key, recurse=key is None)\n except Exception as exc:\n raise SaltCacheError(\n 'There was an error rem...
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Returns a controller instance @param string $controllerClass @return mixed controller instance @throws ReflectionException
[ "public static function get($controllerClass) {\n if (!isset(self::$controllers[$controllerClass])) {\n if (class_exists($controllerClass)) {\n $reflectionClass = new ReflectionClass($controllerClass);\n self::$controllers[$controllerClass] = $reflectionClass->isAbstr...
[ "function validateService($pluginInstance)\n {\n if (! is_object($pluginInstance) )\n throw new \\Exception(sprintf('Can`t resolve to (%s) Instance.', $pluginInstance));\n\n if (!$pluginInstance instanceof aGrantRequest)\n throw new exContainerInvalidServiceType('Invalid Plugi...
codesearchnet
{ "query": "Represent the sentence about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }
Set the translatable name attribute. @param string $value @return void
[ "public function setNameAttribute($value)\n {\n $this->attributes['name'] = json_encode(! is_array($value) ? [app()->getLocale() => $value] : $value);\n }" ]
[ "static function init() {return dfcf(function() {\n\t\t$appId = S::s()->appId(); /** @var string|null $appId */\n\t\treturn !$appId ? '' : df_block_output(__CLASS__, 'init', ['appId' => $appId]);\n\t});}" ]
codesearchnet
{ "query": "Represent the Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
// SenderAction sends a info about sender action
[ "func (r *Response) SenderAction(action string) error {\n\tm := SendSenderAction{\n\t\tRecipient: r.to,\n\t\tSenderAction: action,\n\t}\n\treturn r.DispatchMessage(&m)\n}" ]
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the Github text about Localization:", "pos": "Represent the Github code about Localization:", "neg": "Represent the Github code about programming:" }
This function will generate the insert statements needed to recreate the table under processing. @param table the table to get inserts statement for @return String generated SQL insert @throws SQLException exception
[ "private String getDataInsertStatement(String table) throws SQLException {\r\n\r\n StringBuilder sql = new StringBuilder();\r\n\r\n ResultSet rs = stmt.executeQuery(\"SELECT * FROM \" + \"`\" + table + \"`;\");\r\n\r\n //move to the last row to get max rows returned\r\n rs.last();\r\n ...
[ "public ParseSetup guessSetup(ByteVec v, byte[] bits, byte sep, int ncols, boolean singleQuotes, int checkHeader, String[] columnNames, byte[] columnTypes, String[][] domains, String[][] naStrings) {\n throw new UnsupportedOperationException(\"Not implemented. This method is kept only for backwards compatibility...
codesearchnet
{ "query": "Represent the Github post about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Returns array containg attribute mappings between Moodle and Shibboleth. @return array
[ "function get_attributes() {\n $configarray = (array) $this->config;\n\n $moodleattributes = array();\n $userfields = array_merge($this->userfields, $this->get_custom_user_profile_fields());\n foreach ($userfields as $field) {\n if (isset($configarray[\"field_map_$field\"])) {...
[ "def includeme(config):\n \n root = config.get_root_resource()\n root.add('nef_polymorphic', '{collections:.+,.+}',\n view=PolymorphicESView,\n factory=PolymorphicACL)" ]
codesearchnet
{ "query": "Represent the summarization about database:", "pos": "Represent the code about database:", "neg": "Represent the code:" }
// Close an existing camera session
[ "func (c *CameraModel) CloseSession() {\n\tif c.sessionOpen == false {\n\t\treturn\n\t}\n\tc.sessionOpen = false\n\tC.EdsCloseSession((*C.struct___EdsObject)(unsafe.Pointer(&c.camera)))\n}" ]
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
// RemoteURL returns the remote URL of the source repository
[ "func (r *SourceRepository) RemoteURL() (*s2igit.URL, bool, error) {\n\tif r.remoteURL != nil {\n\t\treturn r.remoteURL, true, nil\n\t}\n\tif r.url.IsLocal() {\n\t\tgitRepo := git.NewRepository()\n\t\tremote, ok, err := gitRepo.GetOriginURL(r.url.LocalPath())\n\t\tif err != nil && err != git.ErrGitNotAvailable {\n\...
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the Github description about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code:" }
Verifies that the required claims exist. Args: jwt_claims: the JWT claims to be verified. Raises: UnauthenticatedException: if some claim doesn't exist.
[ "def _verify_required_claims_exist(jwt_claims):\n \n for claim_name in [u\"aud\", u\"exp\", u\"iss\", u\"sub\"]:\n if claim_name not in jwt_claims:\n raise suppliers.UnauthenticatedException(u'Missing \"%s\" claim' % claim_name)" ]
[ "def interface_required(interface):\n \n def _interface_required(func):\n \"\"\"Internal decorator that wraps around the decorated function.\n\n Args:\n func (function): function being decorated\n\n Returns:\n The wrapper function.\n ...
codesearchnet
{ "query": "Represent the Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// selAsString forces sel into a string.
[ "func (s *Selector) selAsString() string {\n\tif sel, ok := s.sel.(string); ok {\n\t\treturn sel\n\t}\n\n\treturn fmt.Sprintf(\"%s\", s.sel)\n}" ]
[ "public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }" ]
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
// ExtractHash takes the 8 32-bit chain values, the 64-bit counter, the 64 byte block // and a block-offset and extracts the checksum to out.
[ "func ExtractHash(out *[Size]byte, hVal *[8]uint32, ctr *[2]uint32, block *[BlockSize]byte, off int) {\n\tdiff := uint32(BlockSize - off)\n\tif ctr[0] < diff {\n\t\tctr[1]--\n\t}\n\tctr[0] -= diff\n\n\tfor i := off; i < BlockSize; i++ {\n\t\tblock[i] = 0\n\t}\n\n\tCore(hVal, ctr, FinalFlag, block[:])\n\n\tj := 0\n\...
[ "func createTxidRangeEndKey(txid string) []byte {\n\tvar endKey []byte\n\tendKey = append(endKey, prwsetPrefix)\n\tendKey = append(endKey, compositeKeySep)\n\tendKey = append(endKey, []byte(txid)...)\n\t// As txid is a fixed length string (i.e., 128 bits long UUID), 0xff can be used as a stopper.\n\t// Otherwise a ...
codesearchnet
{ "query": "Represent the Github sentence about Blockchain:", "pos": "Represent the Github code about Blockchain:", "neg": "Represent the Github code about Software development:" }
Sets the VALUES clause along with its arguments @param string $expression @return \eMapper\Fluent\Query\FluentInsert
[ "public function valuesExpr($expression) {\n\t\t$args = func_get_args();\n\t\t$this->expression = array_shift($args);\n\t\t\n\t\tif (empty($args))\n\t\t\treturn $this;\n\t\t\n\t\t//check if argument is a list\n\t\ttry {\n\t\t\t$this->valuesArray($args[0]);\n\t\t}\n\t\tcatch (\\InvalidArgumentException $e) {\n\t\t\t...
[ "protected List<List<Row<I>>> incorporateCounterExample(DefaultQuery<I, D> ce) {\n return ObservationTableCEXHandlers.handleClassicLStar(ce, table, oracle);\n }" ]
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
// override replaces a single ProjectConstraint with a workingConstraint, // overriding its values if a corresponding entry exists in the // ProjectConstraints map.
[ "func (m ProjectConstraints) override(pr ProjectRoot, pp ProjectProperties) workingConstraint {\n\twc := workingConstraint{\n\t\tIdent: ProjectIdentifier{\n\t\t\tProjectRoot: pr,\n\t\t\tSource: pp.Source,\n\t\t},\n\t\tConstraint: pp.Constraint,\n\t}\n\n\tif opp, has := m[pr]; has {\n\t\t// The rule for overrid...
[ "NameAndType nameType(Symbol sym) {\n return new NameAndType(sym.name, sym.externalType(types), types);\n // the NameAndType is generated from a symbol reference, and the\n // adjustment of adding an additional this$n parameter needs to be made.\n }" ]
codesearchnet
{ "query": "Represent the comment:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Tells whether the given session {@code name} is unique or not, compared to existing session names. @param name the session name that will be checked @return {@code true} if the session name is unique, {@code false} otherwise @see #sessions
[ "private boolean isSessionNameUnique(final String name) {\n\t\tsynchronized (this.sessions) {\n\t\t\tfor (HttpSession session : sessions) {\n\t\t\t\tif (name.equals(session.getName())) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}" ]
[ "function(transport) {\n return {\n /**\n * Get the server topology identifier.\n *\n * @returns {Number} Topology identifier.\n * @memberof Topology#\n * @since 0.3\n */\n getTopologyId: function() {\n return transport.getTopologyId();\n },\n /**\n ...
codesearchnet
{ "query": "Represent the instruction about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code:" }
Perform an HTTP request
[ "def make_request(method, path, options, raw=false)\n options.merge!({:key => api_key, :id => api_id })\n\n response = connection(raw).send(method) do |request|\n case method\n when :get, :delete\n request.url(path, options)\n when :post, :put\n request.path = path\n...
[ "func New(*SmartSampleConfig, log.Logger, dtsink) (*SmartSampler, error) {\n\treturn nil, errors.New(\"you are attempting to configure a regular SignalFx Gateway with the config of a Smart Gateway. This is an unsupported configuration\")\n}" ]
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Deserialize the method information from the input stream. @param stream @throws IOException @throws ClassNotFoundException
[ "private void deserializeMethod(ObjectInput stream) throws IOException, ClassNotFoundException {\n MethodValues method = null;\n if (SERIALIZATION_V2 == getDeserializationVersion()) {\n method = MethodValues.find(readByteArray(stream));\n } else {\n method = MethodValues.f...
[ "public AttributeConfig[] get_attribute_config(TacoTangoDevice tacoDevice, String[] attrnames) throws DevFailed {\n Except.throw_exception(\"Api_TacoFailed\",\n \"Taco protocol not supported\",\n \"TacoTangoDeviceDAODefaultImpl.command_inout()\");\n return null;\n }" ]
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about N/A:" }
/*! 修正对应内容的图片/其它资源的引用 @str {string} 内容 @dest {string} 目标文件地址 return 修正后的内容
[ "function( str , dest ){\n var _spilt = \"cb==cb\",\n _imgs = str.replace( /\\s+/gi , \" \" ).replace( /url\\(([^\\)]*)\\)/gi , _spilt + \"$1\" + _spilt ).split( _spilt ),\n _md5,\n _img,\n _dest;\n for( var i = _imgs.length; i--; ){\n if( i % ...
[ "private static function appRun(){\n // echo \"runing\";\n // 当有get参数传递时 获取get参数\n if(isset($_GET['s'])){\n // 更加\"/\"将get参数分割成数组\n $info = explode('/',$_GET['s']);\n\n // 获取模块名称 转换成小写\n $m = strtolower($info[0]);\n // 获取控制器名称 转换成小写\n ...
codesearchnet
{ "query": "Represent the comment about text processing:", "pos": "Represent the code about text processing:", "neg": "Represent the code:" }
/* (non-Javadoc) @see org.joml.Vector2dc#add(double, double, org.joml.Vector2d)
[ "public Vector2d add(double x, double y, Vector2d dest) {\n dest.x = this.x + x;\n dest.y = this.y + y;\n return dest;\n }" ]
[ "public static List<Point2D_F64> convert_I32_F64(List<Point2D_I32> points) {\n\t\treturn convert_I32_F64(points,null).toList();\n\t}" ]
codesearchnet
{ "query": "Represent the Github text about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Update the category. @param Request $request @param Model $category @return Response
[ "public function update(CategoryRequest $request, Category $category)\n {\n try {\n $attributes = $request->all();\n\n $category->update($attributes);\n return $this->response->message(trans('messages.success.updated', ['Module' => trans('faq::category.name')]))\n ...
[ "public function onDelete()\n {\n $this->validateRequestTheme();\n\n $type = Request::input('templateType');\n\n $this->loadTemplate($type, trim(Request::input('templatePath')))->delete();\n\n /*\n * Extensibility - documented above\n */\n $this->fireSystemEvent...
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Programming:" }
assign default type for local variable depending on type. (false, 0, null) @param name @throws IOException
[ "public void assignDefault(String name) throws IOException\r\n {\r\n if (hasLocalVariable(name))\r\n {\r\n TypeMirror t = getLocalType(name);\r\n if (Typ.isPrimitive(t))\r\n {\r\n tconst(t, 0);\r\n }\r\n else\r\n {\r\n...
[ "function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }" ]
codesearchnet
{ "query": "Represent the summarization about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code:" }
If a parent is going to be collapsible, if can call this to put back a collapsed child (rather than have too many nested collapsings)
[ "function (mml,n,m) {\n if (m == null) m = 1;\n if (this.SplitAttribute(mml,\"children\").length === m) {\n var child = (mml.data.length === 1 && mml.data[0].inferred ? mml.data[0] : mml);\n if (child && child.data[n] && child.data[n].collapsible) {\n child.SetData(n,child.data[n].d...
[ "def set_identifiers(self, data):\n \n for id_info in self._details.identifiers:\n var_name = id_info['var_name']\n self._data[var_name] = data.get(var_name)\n\n # FIXME: This needs to likely kick off invalidating/rebuilding\n # relations.\n # F...
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Return the table offset of the to be evicted mapping. <p> The mapping to be evicted can occur anywhere in this cache's table. @return table offset of the mapping to be evicted
[ "public int getEvictionIndex() {\n /*\n * If the table has been shrunk then it's possible for the clock-hand to\n * point past the end of the table. We cannot allow the initial-hand to\n * be equal to this otherwise we may never be able to terminate this loop.\n */\n if (clockHand >= hashtabl...
[ "public long appendEntry(JournalEntry entry) {\n // TODO(gpang): handle bounding the queue if it becomes too large.\n\n /**\n * Protocol for appending entries\n *\n * This protocol is lock free, to reduce the overhead in critical sections. It uses\n * {@link AtomicLong} and {@link ConcurrentLi...
codesearchnet
{ "query": "Represent the post about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code about text processing:" }
// SetAttributeKey sets the AttributeKey field's value.
[ "func (s *ObjectAttributeRange) SetAttributeKey(v *AttributeKey) *ObjectAttributeRange {\n\ts.AttributeKey = v\n\treturn s\n}" ]
[ "private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n GetField fields = in.readFields();\n beginDefaultContext = fields.get(BEGIN_DEFAULT, true);\n\n // Note that further processing is required in JEEMetadataContextProviderImpl.deserializeThreadCo...
codesearchnet
{ "query": "Represent the summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
:return: iterator yielding overlapping pairs from iterable :Example: >>> list(pairs([1, 2, 3, 4]) [(1, 2), (2, 3), (3, 4)]
[ "def pairs(iterable):\n \n a, b = itertools.tee(iterable)\n next(b, None)\n return zip(a, b)" ]
[ "def createThreeObjects():\n \n objectA = zip(range(10), range(10))\n objectB = [(0, 0), (2, 2), (1, 1), (1, 4), (4, 2), (4, 1)]\n objectC = [(0, 0), (1, 1), (3, 1), (0, 1)]\n return [objectA, objectB, objectC]" ]
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Natural Language Processing:" }
To intercept a GetResponseEvent in the kernel loop to extract the request (if it's not an exception request) and process it into East foundation. @param GetResponseEvent $event @return KernelListener
[ "public function onKernelRequest(GetResponseEvent $event): KernelListener\n {\n //To ignore sub request generated by symfony to handle non catch exception\n $request = $event->getRequest();\n if (!empty($request->attributes->has('exception'))) {\n return $this;\n }\n\n ...
[ "public H2StreamProcessor startNewInboundSession(Integer streamID) {\n H2StreamProcessor h2s = null;\n h2s = muxLink.createNewInboundLink(streamID);\n return h2s;\n // call the stream processor with the data it needs to then call \"ready\" are the underlying HttpInboundLink\n // (...
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Selects axises of new coordinate system
[ "private void selectAxises(SimpleMatrix R1, SimpleMatrix R2, SimpleMatrix c1, SimpleMatrix c2) {\n\t\t// --------- Compute the new x-axis\n\t\tv1.set(c2.get(0) - c1.get(0), c2.get(1) - c1.get(1), c2.get(2) - c1.get(2));\n\t\tv1.normalize();\n\n\t\t// --------- Compute the new y-axis\n\t\t// cross product of old z...
[ "def transform_cb(self, setting, value):\n \"\"\"\"\"\"\n self.make_callback('transform')\n\n # whence=0 because need to calculate new extents for proper\n # cutout for rotation (TODO: always make extents consider\n # room for rotation)\n whence = 0\n self.redraw(wh...
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
Displays the category group overview page
[ "public function listCategoryGroup()\n {\n $this->setTitleListCategoryGroup();\n $this->setBreadcrumbListCategoryGroup();\n $this->setFilterListCategoryGroup();\n $this->setPagerListCategoryGroup();\n\n $this->setData('category_groups', $this->getListCategoryGroup());\n ...
[ "def _get_generic_schema(self):\n \n schema = Schema(\n vid=ID(stored=True, unique=True), # Object id\n title=NGRAMWORDS(),\n keywords=KEYWORD, # Lists of coverage identifiers, ISO time values and GVIDs, source names, source abbrev\n doc=TEXT) # Generated...
codesearchnet
{ "query": "Represent the Github sentence about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code:" }
Sets the transition for with this instance. @since [*next-version*] @param string|Stringable|null $transition The transition.
[ "protected function _setTransition($transition)\n {\n $this->transition = ($transition === null)\n ? null\n : $this->_normalizeStringable($transition);\n }" ]
[ "function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }" ]
codesearchnet
{ "query": "Represent the Github instruction about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Given an array with (C, N, L) values, being the first the reference value, compute the relative differences and discard the one below the tolerance. :returns: indices where there are sensible differences.
[ "def get_diff_idxs(array, rtol, atol):\n \n C, N, L = array.shape\n diff_idxs = set() # indices of the sites with differences\n for c in range(1, C):\n for n in range(N):\n if not numpy.allclose(array[c, n], array[0, n], rtol, atol):\n diff_idxs.add(n)\n return numpy...
[ "def _calculate_index_of_coincidence(frequency_map, length):\n \n if length <= 1:\n return 0\n # We cannot error here as length can legitimiately be 1.\n # Imagine a ciphertext of length 3 and a key of length 2.\n # Spliting this text up and calculating the index of coincidence res...
codesearchnet
{ "query": "Represent the Github description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
加密字符串 @param string $str 字符串 @param string $key 加密key @param integer $expire 有效期(秒) @return string
[ "public static function encrypt($str,$key,$expire=0){\n $expire = sprintf('%010d', $expire ? $expire + time():0);\n $r = md5($key);\n $c = 0;\n $v = \"\";\n $str = $expire.$str;\n\t\t$len = strlen($str);\n\t\t$l = strlen($r);\n for ($i=0;$i<$len;$i++){\n if ($c...
[ "public static String encode(String content, String secret) {\n try {\n //1.构造密钥生成器,指定为AES算法,不区分大小写\n KeyGenerator keygen = KeyGenerator.getInstance(\"AES\");\n //2.根据encodeRules规则初始化密钥生成器\n //生成一个256位的随机源,根据传入的字节数组\n keygen.init(256, new SecureRandom(se...
codesearchnet
{ "query": "Represent the instruction about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code:" }
Adds a factory to the list of possible factories @param FactoryInterface $factory The factory to add @param integer $priority The priority @return Factory The factory
[ "public function addFactory(FactoryInterface $factory, $priority = 10)\n {\n $this->factoryList->insert($factory, $priority);\n return $this;\n }" ]
[ "protected function processConfig(array $config)\n {\n // set defaults as an array if not provided\n if (!isset($config['defaults'])) {\n $config['defaults'] = [];\n }\n\n // Add the handlers based on the configuration option\n $stack = $this->getHandlerStack();\n\n ...
codesearchnet
{ "query": "Represent the Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Args: miller_index: viewing direction Returns: azim, elev for plotting
[ "def _get_azimuth_elev(self, miller_index):\n \n if miller_index == (0, 0, 1) or miller_index == (0, 0, 0, 1):\n return 0, 90\n else:\n cart = self.lattice.get_cartesian_coords(miller_index)\n azim = get_angle([cart[0], cart[1], 0], (1, 0, 0))\n v = [...
[ "def transform_cb(self, setting, value):\n \"\"\"\"\"\"\n self.make_callback('transform')\n\n # whence=0 because need to calculate new extents for proper\n # cutout for rotation (TODO: always make extents consider\n # room for rotation)\n whence = 0\n self.redraw(wh...
codesearchnet
{ "query": "Represent the Github text about mathematics:", "pos": "Represent the Github code about mathematics:", "neg": "Represent the Github code:" }
Creates a submit form. @param file the URI to submit the form to @param names the objects to submit @param flags submit properties @return A PdfAction
[ "public static PdfAction createSubmitForm(String file, Object names[], int flags) {\n PdfAction action = new PdfAction();\n action.put(PdfName.S, PdfName.SUBMITFORM);\n PdfDictionary dic = new PdfDictionary();\n dic.put(PdfName.F, new PdfString(file));\n dic.put(PdfName.FS, PdfNam...
[ "def requests(self):\n ''''''\n path = pathjoin(self.path, self.name, Request.path)\n response = self.service.send(SRequest('GET', path))\n # a bin behaves as a push-down store --- better to return the requests\n # in order of appearance\n return list(reversed(Request.from_...
codesearchnet
{ "query": "Represent the post about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Check for an integer validity @param integer $id Integer to validate @return boolean Validity is ok or not
[ "static public function isInt($value) {\n return ((string) (int) $value === (string) $value or $value === false or empty($value));\n }" ]
[ "def initialize(self, id=None, text=None):\n self.id = none_or(id, int)\n \n\n self.text = none_or(text, str)\n \"\"\"\n Username or IP address of the user at the time of the edit : str | None\n \"\"\"" ]
codesearchnet
{ "query": "Represent the sentence about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
Shutdown the global {@link UdpResources} without resetting them, effectively cleaning up associated resources without creating new ones.
[ "public static void shutdown() {\n\t\tUdpResources resources = udpResources.getAndSet(null);\n\t\tif (resources != null) {\n\t\t\tresources._dispose();\n\t\t}\n\t}" ]
[ "private void removeContext(final String contextID) {\n\n synchronized (this.contextStack) {\n\n if (!contextID.equals(this.contextStack.peek().getIdentifier())) {\n throw new IllegalStateException(\"Trying to close context with id `\" + contextID +\n \"`. But the top context has id `\" +\...
codesearchnet
{ "query": "Represent the sentence about Computer Networking:", "pos": "Represent the code about Computer Networking:", "neg": "Represent the code about programming:" }
take an array of string expressions and convert it to direct concatenation like this a + b + c + d
[ "function ConcatStringList(outputs) {\n return outputs.length ? outputs.reduce(\n (prev, next) => t.binaryExpression('+', prev, next)\n ) : t.stringLiteral('');\n}" ]
[ "def get_quoted_strings(quoted_string):\n '''\n \n '''\n try:\n # This regex grabs all quoted data from string.\n # Note that this gets everything in between the first and last double quote.\n # This is intentional, as printed (and quoted) strings from a target file may contain\n ...
codesearchnet
{ "query": "Represent the Github comment about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about Programming:" }
Converts carbon instance to milliseconds @param PHP unix timestamp (seconds) $timestamp
[ "public static function toMilliseconds($value = null)\n {\n if (! $value) {\n return null;\n }\n\n if (! $value instanceof Carbon) {\n $value = Carbon::parse($value); // attempt to parse it\n }\n\n return (int) $value->timestamp * 1000;\n }" ]
[ "def normalize(self, timestamp, steps=0):\n '''\n \n '''\n # So far, the only commonality with RelativeTime\n return self.from_bucket( self.to_bucket(timestamp, steps) )" ]
codesearchnet
{ "query": "Represent the Github text about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
// marshalAttr marshals an attribute with the given name and value, adding to start.Attr.
[ "func (p *printer) marshalAttr(start *StartElement, name Name, val reflect.Value) error {\n\tif val.CanInterface() && val.Type().Implements(marshalerAttrType) {\n\t\tattr, err := val.Interface().(MarshalerAttr).MarshalXMLAttr(name)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif attr.Name.Local != \"\" {\n\t\...
[ "public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }" ]
codesearchnet
{ "query": "Represent the Github comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Fire an event related to this task. @param string $event @return bool
[ "public function fireEvent($event)\n {\n $handle = $this->getQualifiedEvent($event);\n\n // Fire the event\n /** @var \\League\\Event\\EventInterface $event */\n $event = $this->explainer->displayBelow(function () use ($handle) {\n return $this->events->emit($handle, [$this...
[ "final protected function c() {return dfc($this, function() {/** @var int|null $id $id */return\n\t\t!($id = $this->o()->getCustomerId()) ? null : df_customer($id)\n\t;});}" ]
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
/*jslint unparam:true
[ "function ($scope, $element, $attrs) {\n\n\t\tif(!$attrs.readOnly){\n\t\t\t$scope.readOnly = function(){return false;};\n\t\t}\n\n\t\tif(!$attrs.resetable){\n\t\t\t$scope.resetable = function(){return true;};\n\t\t}\n\n\t\tif(!$attrs.beforeRated){\n\t\t\t$scope.beforeRated = function(){var d = $q.defer(); d.resolve...
[ "function esmangleify(opt) {\n\n // options is mostly the escodegen format\n var format = {\n renumber : true,\n hexadecimal: true,\n escapeless : true,\n compact : true,\n semicolons : false,\n parentheses: false\n }\n\n // fail silently allows us to process json (and other non js) files...
codesearchnet
{ "query": "Represent the Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
@param \Spryker\Glue\GlueApplication\Rest\Request\Data\RestRequestInterface $restRequest @return \Spryker\Glue\GlueApplication\Rest\JsonApi\RestResponseInterface
[ "public function findCompanyByExternalReference(RestRequestInterface $restRequest): RestResponseInterface\n {\n $restResponse = $this->restResourceBuilder->createRestResponse();\n\n if (!$restRequest->getResource()->getId()) {\n return $this->restApiError->addExternalReferenceMissingErro...
[ "protected function registerApportionmentEntryInterface()\n\t{\n\t\t$this->app->bind('Mgallegos\\DecimaAccounting\\Accounting\\Repositories\\ApportionmentEntry\\ApportionmentEntryInterface', function($app)\n\t\t{\n\t\t\t$AuthenticationManager = $app->make('App\\Kwaai\\Security\\Services\\AuthenticationManagement\\A...
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }