query
stringlengths
16
255
pos
list
neg
list
task
stringclasses
1 value
instruction
dict
only for the basic data types as shown above
[ "public static String getXSIType(Object obj) {\r\n Class<?> type = obj.getClass();\r\n\r\n for (int i = 0; i < clazzes.length; i++) {\r\n if (type == clazzes[i]) {\r\n return xsdStrs[i];\r\n }\r\n }\r\n\r\n if (obj instanceof java.util.Calendar) {\r\n...
[ "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 description:", "pos": "Represent the code:", "neg": "Represent the code:" }
打印或写日志 :params message: 要打印或要写的日志
[ "def log(self, message):\n \n theLog = '[日志名:%s] [时间:%s] \\n[内容:\\n%s]\\n\\n' % (\n self.startName, timestamp_to_time(get_current_timestamp()), message)\n if not self.fileName:\n print(theLog)\n else:\n # 由于这里有很多的线程都要经过这道线程锁的控制,所以不会出现问题\n ...
[ "protected static void fixResultByRule(List<Vertex> linkedArray)\n {\n\n //--------------------------------------------------------------------\n //Merge all seperate continue num into one number\n mergeContinueNumIntoOne(linkedArray);\n\n //-------------------------------------------...
codesearchnet
{ "query": "Represent the Github post about PHP programming:", "pos": "Represent the Github code about PHP programming:", "neg": "Represent the Github code about text processing:" }
Merge the top files into a single dictionary
[ "def _merge_tops_merge_all(self, tops):\n '''\n \n '''\n def _read_tgt(tgt):\n match_type = None\n states = []\n for item in tgt:\n if isinstance(item, dict):\n match_type = item\n if isinstance(item, six.s...
[ "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 post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
method to get all polymers for one specific polymer type @param str specific polymer type @param polymers List of PolymerNotation @return List of PolymerNotation with the specific type
[ "public static List<PolymerNotation> getListOfPolymersSpecificType(String str, List<PolymerNotation> polymers) {\r\n List<PolymerNotation> list = new ArrayList<PolymerNotation>();\r\n for (PolymerNotation polymer : polymers) {\r\n if (polymer.getPolymerID().getType().equals(str)) {\r\n list.add(po...
[ "def values(*rels):\n '''\n \n '''\n #Action function generator to multiplex a relationship at processing time\n def _values(ctx):\n '''\n Versa action function Utility to specify a list of relationships\n\n :param ctx: Versa context used in processing (e.g. includes the prototyp...
codesearchnet
{ "query": "Represent the Github description about Documentation:", "pos": "Represent the Github code about Documentation:", "neg": "Represent the Github code:" }
%prog trace unitig{version}.{partID}.{unitigID} Call `grep` to get the erroneous fragment placement.
[ "def trace(args):\n \n p = OptionParser(trace.__doc__)\n opts, args = p.parse_args(args)\n\n if len(args) != 1:\n sys.exit(p.print_help())\n\n s, = args\n version, partID, unitigID = get_ID(s)\n\n flist = glob(\"../5-consensus/*_{0:03d}.err\".format(int(partID)))\n assert len(flist) =...
[ "def genms(self, scans=[]):\n \n\n if len(scans):\n scanstr = string.join([str(ss) for ss in sorted(scans)], ',')\n else:\n scanstr = self.allstr\n\n print 'Splitting out all cal scans (%s) with 1s int time' % scanstr\n newname = ps.sdm2ms(self.sdmfile, self....
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code:" }
// Run starts the controller and blocks until stopCh is closed.
[ "func (c *DefaultRoleBindingController) Run(workers int, stopCh <-chan struct{}) {\n\tdefer utilruntime.HandleCrash()\n\tdefer c.queue.ShutDown()\n\n\tklog.Infof(\"Starting DefaultRoleBindingController\")\n\tdefer klog.Infof(\"Shutting down DefaultRoleBindingController\")\n\n\tif !controller.WaitForCacheSync(\"Defa...
[ "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 summarization about Container management:", "pos": "Represent the code about Container management:", "neg": "Represent the code about programming:" }
=========================================================================
[ "protected function do_log($message, $type='exception in code') {\n\t\t$this->debugLogs[] = array('project'=>$this->projectName,'upgradeFile'=>$this->upgradeConfigFile,'message'=>$message,'type'=>$type);\n\t\tif($this->internalUpgradeInProgress === true) {\n\t\t\t$this->storedLogs[] = func_get_args();\n\t\t}\n\t\te...
[ "public static function protect()\n\t{\n\t\t$eye = \\Cli::color(\"*\", 'green');\n\n\t\treturn \\Cli::color(\"\n\t\t\t\t\t\\\"PROTECT ALL HUMANS\\\"\n\t\t\t _____ /\n\t\t\t /_____\\\\\", 'blue').\"\\n\"\n.\\Cli::color(\"\t\t\t ____[\\\\\", 'blue').$eye.\\Cli::color('---', 'blue').$eye.\\Cli:...
codesearchnet
{ "query": "Represent the comment about language and writing:", "pos": "Represent the code about language and writing:", "neg": "Represent the code about Programming:" }
The default way of unstructuring ``attrs`` classes.
[ "def unstruct_strat(self):\n # type: () -> UnstructureStrategy\n \"\"\"\"\"\"\n return (\n UnstructureStrategy.AS_DICT\n if self._unstructure_attrs == self.unstructure_attrs_asdict\n else UnstructureStrategy.AS_TUPLE\n )" ]
[ "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 comment:", "pos": "Represent the code:", "neg": "Represent the code:" }
@inheritdoc @throws RepositoryException
[ "public function create(RedirectUriInterface $redirectUri): RedirectUriInterface\n {\n try {\n $now = $this->ignoreException(function (): DateTimeImmutable {\n return new DateTimeImmutable();\n });\n $schema = $this->getDatabaseSchema();\n $thi...
[ "def addLocalCacheService(self):\n \"\"\n _cache = self.getCacheService()\n _cache.setName('cache_proxy')\n _cache.setServiceParent(self.hendrix)" ]
codesearchnet
{ "query": "Represent the Github text about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
This should be used for creating streams to read file metadata, e.g. the footer, not for data in columns.
[ "public static InStream create(String name, FSDataInputStream file, long streamOffset,\n int streamLength, CompressionCodec codec, int bufferSize) throws IOException {\n\n return create(name, file, streamOffset, streamLength, codec, bufferSize, true, 1);\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 comment about File management:", "pos": "Represent the Github code about File management:", "neg": "Represent the Github code:" }
Register functions. @param control
[ "public void writeCONTROL_REG(int /* reg8 */control) {\n\t\twaveform = (control >> 4) & 0x0f;\n\t\tring_mod = control & 0x04;\n\t\tsync = control & 0x02;\n\n\t\tint /* reg8 */test_next = control & 0x08;\n\n\t\tif (ANTTI_LANKILA_PATCH) {\n\t\t\t/*\n\t\t\t * SounDemoN found out that test bit can be used to control th...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the comment about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Sets the geoTargeting value for this Targeting. @param geoTargeting * Specifies what geographical locations are targeted by the {@link LineItem}. This attribute is optional.
[ "public void setGeoTargeting(com.google.api.ads.admanager.axis.v201811.GeoTargeting geoTargeting) {\n this.geoTargeting = geoTargeting;\n }" ]
[ "function Bid(value) {\n if (this.init_) {\n this.init_();\n }\n /** @property {Array.<number, number>} [sizes] the dimension sizes of the slot bid */\n this.sizes = [];\n /** @property {string} [slot] the slot name */\n this.slot;\n /** @property {string|number} value the bid value. Default: empty strin...
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Create a new Impala database Parameters ---------- name : string Database name path : string, default None HDFS path where to store the database data; otherwise uses Impala default
[ "def create_database(self, name, path=None, force=False):\n \n if path:\n # explicit mkdir ensures the user own the dir rather than impala,\n # which is easier for manual cleanup, if necessary\n self.hdfs.mkdir(path)\n statement = ddl.CreateDatabase(name, path=p...
[ "def from_bucket(cls, connection, bucket):\n \"\"\"\"\"\"\n if bucket is None:\n raise errors.NoContainerException\n\n # It appears that Amazon does not have a single-shot REST query to\n # determine the number of keys / overall byte size of a bucket.\n return cls(conne...
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code about AWS S3:" }
// SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value.
[ "func (s *ModifyTargetGroupInput) SetHealthCheckTimeoutSeconds(v int64) *ModifyTargetGroupInput {\n\ts.HealthCheckTimeoutSeconds = &v\n\treturn s\n}" ]
[ "func NewTarTimeoutError() error {\n\treturn Error{\n\t\tMessage: fmt.Sprintf(\"timeout waiting for tar stream\"),\n\t\tDetails: nil,\n\t\tErrorCode: TarTimeoutError,\n\t\tSuggestion: \"check the Source-To-Image scripts if it accepts tar stream for assemble and sends for save-artifacts\",\n\t}\n}" ]
codesearchnet
{ "query": "Represent the Github instruction about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Search for intermediate shape model by its c2j name. @return ShapeModel or null if the shape doesn't exist (if it's primitive or container type for example)
[ "public static ShapeModel findShapeModelByC2jNameIfExists(IntermediateModel intermediateModel, String shapeC2jName) {\n for (ShapeModel shape : intermediateModel.getShapes().values()) {\n if (shape.getC2jName().equals(shapeC2jName)) {\n return shape;\n }\n }\n ...
[ "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 sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
returns the "most basic" dtype which represents `x` properly, which provides at least the same value range as the specified dtype.
[ "def minimum_dtype(x, dtype=np.bool_):\n \"\"\"\"\"\"\n\n def check_type(x, dtype):\n try:\n converted = dtype.type(x)\n except (ValueError, OverflowError):\n return False\n # False if some overflow has happened\n return converted == x or np.isnan(x)\n\n de...
[ "def _choose_float_dtype(dtype, has_offset):\n \"\"\"\"\"\"\n # Keep float32 as-is. Upcast half-precision to single-precision,\n # because float16 is \"intended for storage but not computation\"\n if dtype.itemsize <= 4 and np.issubdtype(dtype, np.floating):\n return np.float32\n # float32 ca...
codesearchnet
{ "query": "Represent the comment about text processing:", "pos": "Represent the code about text processing:", "neg": "Represent the code about text processing:" }
Checks if the given value is in the given increments of range. @param string $increments @param string $value @return Boolean
[ "protected function isInIncrementsOfRange($increments, $value)\n {\n $incrementsParts = explode('/', $increments);\n\n if ('*' === $incrementsParts[0]) {\n return (int) $value % $incrementsParts[1] === 0;\n }\n\n if (!$this->isInRange($incrementsParts[0], $value)) {\n ...
[ "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 Github comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Memoization decorator for a function taking one or more arguments.
[ "def memoize(f):\n \n class memodict(dict):\n\n def __getitem__(self, *key):\n return dict.__getitem__(self, key)\n\n def __missing__(self, key):\n ret = self[key] = f(*key)\n return ret\n\n return memodict().__getitem__" ]
[ "def path(self, path):\n \"\"\"\"\"\"\n\n # pylint: disable=attribute-defined-outside-init\n self._path = copy_.copy(path)\n\n # The provided path is shallow copied; it does not have any attributes\n # with mutable types.\n\n # We perform this check after the initialization...
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Build the annotation type documentation. @param node the XML element that specifies which components to document @param contentTree the content tree to which the documentation will be added
[ "public void buildAnnotationTypeDoc(XMLNode node, Content contentTree) throws Exception {\n contentTree = writer.getHeader(configuration.getText(\"doclet.AnnotationType\") +\n \" \" + annotationTypeDoc.name());\n Content annotationContentTree = writer.getAnnotationContentHeader();\n ...
[ "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 summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Remove else for if-return
[ "function removeUnnecessaryElse(path) {\n const { node } = path;\n const consequent = path.get(\"consequent\");\n const alternate = path.get(\"alternate\");\n\n if (\n consequent.node &&\n alternate.node &&\n (consequent.isReturnStatement() ||\n (consequent.isBlockStatement() &&\n ...
[ "def star_sep_check(self, original, loc, tokens):\n \"\"\"\"\"\"\n return self.check_py(\"3\", \"keyword-only argument separator (add 'match' to front to produce universal code)\", original, loc, tokens)" ]
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Kdbx file (KeePass database v2) @constructor
[ "function() {\n this.header = undefined;\n this.credentials = undefined;\n this.meta = undefined;\n this.xml = undefined;\n this.binaries = new KdbxBinaries();\n this.groups = [];\n this.deletedObjects = [];\n Object.preventExtensions(this);\n}" ]
[ "def getKeySequenceCounter(self):\n \"\"\"\"\"\"\n print '%s call getKeySequenceCounter' % self.port\n keySequence = ''\n keySequence = self.__sendCommand(WPANCTL_CMD + 'getprop -v Network:KeyIndex')[0]\n return keySequence" ]
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Check the grant given by user to login in authserver is a good one. Arguments: - req - res
[ "function(req, res) {\n var params = URL.parse(req.url, true).query\n , code = params.code\n , state = params.state\n ;\n\n if(!code) {\n res.writeHead(400, {'Content-Type': 'text/plain'});\n return res.end('The \"code\" parameter is missing.');\n }\n if(!state) {\n res.write...
[ "@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 Github summarization about Access control:", "pos": "Represent the Github code about Access control:", "neg": "Represent the Github code about Programming:" }
makes a big key out of a small one @returns void
[ "protected function KeyExpansion($key)\n {\n // Rcon is the round constant\n static $Rcon = [\n 0x00000000,\n 0x01000000,\n 0x02000000,\n 0x04000000,\n 0x08000000,\n 0x10000000,\n 0x20000000,\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 instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
This method gets the singleton instance of this {@link StringValueConverterImpl}. <br> <b>ATTENTION:</b><br> Please prefer dependency-injection instead of using this method. @return the singleton instance.
[ "public static StringValueConverterImpl getInstance() {\n\n if (instance == null) {\n synchronized (StringValueConverterImpl.class) {\n if (instance == null) {\n StringValueConverterImpl converter = new StringValueConverterImpl();\n converter.initialize();\n instance = conv...
[ "private <T> T create(Class<T> pluginType, String className) {\n if (className == null) {\n throw new IllegalStateException(\n \"No default implementation for requested Mockito plugin type: \" + pluginType.getName() + \"\\n\"\n + \"Is this a valid Mockito plugin t...
codesearchnet
{ "query": "Represent the Github text about text processing:", "pos": "Represent the Github code about text processing:", "neg": "Represent the Github code:" }
Extracts output nodes from the standard output and standard error files.
[ "def _get_output_nodes(self, output_path, error_path):\n \n from pymatgen.io.nwchem import NwOutput\n from aiida.orm.data.structure import StructureData\n from aiida.orm.data.array.trajectory import TrajectoryData\n\n ret_dict = []\n nwo = NwOutput(output_path)\n for...
[ "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 Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Create shortcuts for this widget.
[ "def create_shortcuts(self):\n \"\"\"\"\"\"\n # Configurable\n copyfig = config_shortcut(self.copy_figure, context='plots',\n name='copy', parent=self)\n prevfig = config_shortcut(self.go_previous_thumbnail, context='plots',\n ...
[ "public function postCommit(\n InputInterface $input,\n OutputInterface $output,\n ParameterBagInterface $configuration\n ): void {\n // Yes we can send a notification to slack fx?\n // Then we would just add some configuration with slack channel, username etc etc\n // A...
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Get a map of pool infos to average wait times for first resource of a resource type. @param type Resource type @return Map of pools into average first resource time
[ "public Map<PoolInfo, Long> getTypePoolInfoAveFirstWaitMs(ResourceType type) {\n Map<PoolInfo, WaitCount> poolInfoWaitCount =\n new HashMap<PoolInfo, WaitCount>();\n for (Session session : sessions.values()) {\n synchronized (session) {\n if (!session.isDeleted()) {\n Long wait = s...
[ "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 post about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code:" }
Iterates over all input files for the specified outputfile (you may pass a CLAMOutputFile instance or a filename string). Yields (CLAMInputFile,str:inputtemplate_id) tuples. The last three arguments are passed to its constructor.
[ "def getinputfiles(self, outputfile, loadmetadata=True, client=None,requiremetadata=False):\n \"\"\"\"\"\"\n if isinstance(outputfile, CLAMOutputFile):\n outputfilename = str(outputfile).replace(os.path.join(self.projectpath,'output/'),'')\n else:\n outputfilename = output...
[ "def star_sep_check(self, original, loc, tokens):\n \"\"\"\"\"\"\n return self.check_py(\"3\", \"keyword-only argument separator (add 'match' to front to produce universal code)\", original, loc, tokens)" ]
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// result cannot be called until the wait() channel has returned a value.
[ "func (i *inflight) result() ([]jose.JSONWebKey, error) {\n\treturn i.keys, i.err\n}" ]
[ "function onChunk(count) {\n // If chunk read has no bytes than there is nothing left, so end a\n // collection.\n if (count === 0) return next(end)\n\n // Move a offset `position` with `count` towards the end unless\n // position was a `null` in which case we just keep it (`null` means\n ...
codesearchnet
{ "query": "Represent the Github text about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about File management:" }
// Get will retrieve a message from the store, the one associated with // the provided key value.
[ "func (store *FileStore) Get(key string) packets.ControlPacket {\n\tstore.RLock()\n\tdefer store.RUnlock()\n\tif !store.opened {\n\t\tERROR.Println(STR, \"Trying to use file store, but not open\")\n\t\treturn nil\n\t}\n\tfilepath := fullpath(store.directory, key)\n\tif !exists(filepath) {\n\t\treturn nil\n\t}\n\tmf...
[ "function (err, collection) {\n if (err) {\n return callback(err);\n }\n\n // ensure that the collection option is present before starting a run\n if (!_.isObject(collection)) {\n return callback(new Error(COLLECTION_L...
codesearchnet
{ "query": "Represent the Github sentence about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about Software development:" }
Calculate the length of a password for a given entropy and chars.
[ "def password_length_needed(entropybits: Union[int, float], chars: str) -> int:\n \"\"\"\"\"\"\n if not isinstance(entropybits, (int, float)):\n raise TypeError('entropybits can only be int or float')\n if entropybits < 0:\n raise ValueError('entropybits should be greater than 0')\n if not...
[ "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 post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Process this action. @param strAction The command to execute. @return True if handled.
[ "public boolean doAction(String strAction, int iOptions)\n {\n if (Constants.BACK.equalsIgnoreCase(strAction))\n {\n String strPrevAction = this.getBaseApplet().popHistory(1, true); // Current screen\n strAction = getBaseApplet().popHistory(1, true); // Last screen\n ...
[ "public Object doRemoteCommand(String strCommand, Map<String, Object> properties)\n {\n \treturn Boolean.FALSE; // Override this to handle this command\n }" ]
codesearchnet
{ "query": "Represent the text about NLP:", "pos": "Represent the code about NLP:", "neg": "Represent the code about Software development:" }
获取http请求的request中的content-type,如没有设置则设置为默认的 {@link com.baidu.beidou.navi.constant.NaviCommonConstant#DEFAULT_PROTOCAL_CONTENT_TYPE} @param httpServletRequest @return
[ "protected String getProtocolByHttpContentType(HttpServletRequest httpServletRequest) {\r\n if (StringUtil.isEmpty(httpServletRequest.getContentType())) {\r\n throw new InvalidRequestException(\"Rpc protocol invalid\");\r\n }\r\n String protocol = httpServletRequest.getContentType()....
[ "public static SqlInfo getSqlInfoSimply(String nsAtZealotId, Object paramObj) {\n String[] arr = nsAtZealotId.split(ZealotConst.SP_AT);\n if (arr.length != LEN) {\n throw new ValidFailException(\"nsAtZealotId参数的值必须是xml文件中的 nameSpace + '@@' + zealotId 节点的值,\"\n + \"如:'stu...
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code about Software Development:" }
// Add mocks base method
[ "func (m *MockManager) Add(arg0 release.Release) {\n\tm.ctrl.Call(m, \"Add\", arg0)\n}" ]
[ "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 summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
Get the entries in the queue that have errors. Supported options are +:limit+ (default 50) and +:offset+ (default 0).
[ "def errors(options = {})\n limit = options[:limit] ? options[:limit].to_i : 50\n Entry.errors(self, limit, options[:offset].to_i)\n end" ]
[ "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 summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
all engines will pass through it
[ "function (name, options, cb) {\n var engine = enginesByExtension[this.ext],\n that = this,\n // queue\n stack = [],\n ctx = {\n name : name,\n options : options,\n ...
[ "func (rl *resignLeadership) Execute(state State) (*State, error) {\n\t// TODO(fwereade): this hits a lot of interestingly intersecting problems.\n\t//\n\t// 1) we can't yet create a sufficiently dumbed-down hook context for a\n\t// leader-deposed hook to run as specced. (This is the proximate issue,\n\t// an...
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Set the top margin of the view. @param margin The top margin, which should be set, in pixels as an {@link Integer} value
[ "private void setTopMargin(final int margin) {\n FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) getLayoutParams();\n layoutParams.topMargin = margin;\n setLayoutParams(layoutParams);\n }" ]
[ "public void validateRange(final LmlParser parser) {\n if (min >= max || stepSize > max - min || value < min || value > max || stepSize <= 0f) {\n parser.throwError(\n \"Range widget not properly constructed. Min value has to be lower than max and step size cannot be higher than...
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
Read big XML file from specific stream @param is stream of xml like fileinputstream @param encoding @param listener listener callbacks when each xml element starts and ends
[ "public void read(InputStream is, String encoding, final TagListener listener) {\n\n\t\tmSaxHandler.initialize();\n\n\t\tReader reader = null;\n\n\t\ttry {\n\n\t\t\treader = new InputStreamReader(is, encoding);\n\n\t\t\tSAXParserFactory spf = SAXParserFactory.newInstance();\n\n\t\t\t// To correspond to a big entiti...
[ "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 description about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
Common wrapper for the underlying pyoidc library functions. Reads GET params and POST data before passing it on the library and converts the response from oic.utils.http_util to wsgi. :param func: underlying library function
[ "def pyoidcMiddleware(func):\n \n\n def wrapper(environ, start_response):\n data = get_or_post(environ)\n cookies = environ.get(\"HTTP_COOKIE\", \"\")\n resp = func(request=data, cookie=cookies)\n return resp(environ, start_response)\n\n return wrapper" ]
[ "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 description about Web development:", "pos": "Represent the Github code about Web development:", "neg": "Represent the Github code about programming:" }
Upload file By content. @param File $file @param string $content @return \Railken\Lem\Contracts\ResultContract
[ "public function uploadFileByContent(File $file, string $content)\n {\n $dir = sys_get_temp_dir();\n\n $tmp = $dir.'/'.Uuid::uuid4()->toString();\n\n file_put_contents($tmp, $content);\n\n $filename = $file->name;\n\n if (!$filename) {\n $filename = Uuid::uuid4()->to...
[ "public function getAll(){\n $rest = $this->getService( self::API_UPLOAD);\n $rest->GET();\n\n return $rest->getResultAsArray( models\\FileSystem\\FileUpload::class);\n }" ]
codesearchnet
{ "query": "Represent the instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Programming:" }
Get permalink structure front for date archive. @since 1.0.0 @param string $post_type post type name. @return string
[ "public static function get_date_front( $post_type ) {\n\t\t$structure = CPTP_Util::get_permalink_structure( $post_type );\n\n\t\t$front = '';\n\n\t\tpreg_match_all( '/%.+?%/', $structure, $tokens );\n\t\t$tok_index = 1;\n\t\tforeach ( (array) $tokens[0] as $token ) {\n\t\t\tif ( '%post_id%' === $token && ( $tok_in...
[ "public function insertInsertTagMD( $objPage, $objLayout, $objPageRegular)\n {\n // set vary header for browsers to avoid caching in Proxies for different browsers\n header('Vary: User-Agent', false);\n \n // add mobiledetectioncss class to page css class\n $objPage->cssClass = $...
codesearchnet
{ "query": "Represent the Github instruction about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
// Refresh asks Elasticsearch to refresh one or more indices.
[ "func (c *Client) Refresh(indices ...string) *RefreshService {\n\tbuilder := NewRefreshService(c)\n\tbuilder.Indices(indices...)\n\treturn builder\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 post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Helper function to move folder contents to target directory @param {string} extractedPath - source directory path @param {string} targetPath - target directory path @returns {string} {!Promise.<RESULT>} promise for chaing @function
[ "function copyIntoPlace(extractedPath, targetPath) {\n log.info('Removing', targetPath);\n return kew.nfcall(fs.remove, targetPath).then(function () {\n // Look for the extracted directory, so we can rename it.\n const files = fs.readdirSync(extractedPath);\n for (let i = 0; i < files.length; i++) {\n ...
[ "function () {\n /**\n * Get a valid file path for a template file from a set of directories\n * @param {Object} opts Configurable options (see periodicjs.core.protocols for more details)\n * @param {string} [opts.extname] Periodic extension that may contain view file\n * @param {string} opts.viewna...
codesearchnet
{ "query": "Represent the Github text about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
@param ContainerInterface $container @param string $namespace @param string|null $locale @return FormatterInterface @throws ContainerExceptionInterface @throws NotFoundExceptionInterface
[ "protected static function createFormatter(\n ContainerInterface $container,\n string $namespace,\n string $locale = null\n ): FormatterInterface {\n /** @var FormatterFactoryInterface $factory */\n $factory = $container->get(FormatterFactoryInterface::class);\n $forma...
[ "public function init(ModuleManagerInterface $manager)\n {\n if (!$manager instanceof ModuleManager) {\n $errMsg = sprintf('Module manager not implement %s', ModuleManager::class);\n throw new Exception\\InvalidArgumentException($errMsg);\n }\n\n /** @var ServiceLocator...
codesearchnet
{ "query": "Represent the Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
// NewBoundContract creates a low level contract interface through which calls // and transactions may be made through.
[ "func NewBoundContract(address common.Address, abi abi.ABI, caller ContractCaller, transactor ContractTransactor, filterer ContractFilterer) *BoundContract {\n\treturn &BoundContract{\n\t\taddress: address,\n\t\tabi: abi,\n\t\tcaller: caller,\n\t\ttransactor: transactor,\n\t\tfilterer: filterer,\n\t...
[ "public FunctionHandle resolveFunction(Session session, QualifiedName name, List<TypeSignatureProvider> parameterTypes)\n {\n // TODO Actually use session\n // Session will be used to provide information about the order of function namespaces to through resolving the function.\n // This is l...
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
Creates an EnvvarProfile instance without the need for an explicit declaration of the envvar profile class.
[ "def envvar_profile(\n profile_root: str,\n profile_properties: typing.Dict[str, typing.Optional[str]] = None,\n **profile_properties_as_kwargs,\n) -> EnvvarProfile:\n \n if profile_properties:\n profile_properties_as_kwargs.update(profile_properties)\n return type(f\"{profile_root}Profile\...
[ "@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:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
@param bool $usedPrioritySorting @return array @throws CircularReferenceException @SuppressWarnings(PHPMD.NPathComplexity)
[ "protected function orderFixturesByDependencies($usedPrioritySorting)\n {\n $sequenceForClasses = $orderedFixtures = [];\n\n // If fixtures were already ordered by number then we need\n // to remove classes which are not instances of OrderedFixtureInterface\n // in case fixtures imple...
[ "public function handleManipulateAST(ManipulateAST $ManipulateAST): void\n {\n ASTHelper::attachDirectiveToObjectTypeFields(\n $ManipulateAST->documentAST,\n PartialParser::directive('@tracing')\n );\n }" ]
codesearchnet
{ "query": "Represent the Github comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Removes given **Active_QLabel** Widget. :param active_label: Active label to remove. :type active_label: Active_QLabel :return: Method success. :rtype: bool
[ "def remove_active_label(self, active_label):\n \n\n if not active_label in self.__active_labels:\n raise foundations.exceptions.ProgrammingError(\"{0} | '{1}' is not in the collection!\".format(\n self.__class__.__name__, active_label))\n\n self.__active_labels.remove...
[ "def show_wait_cursor(object):\n \n\n @functools.wraps(object)\n def show_wait_cursorWrapper(*args, **kwargs):\n \"\"\"\n Shows a wait cursor while processing.\n\n :param \\*args: Arguments.\n :type \\*args: \\*\n :param \\*\\*kwargs: Keywords arguments.\n :type \\...
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
Patch botocore client so it generates subsegments when calling AWS services.
[ "def patch():\n \n if hasattr(botocore.client, '_xray_enabled'):\n return\n setattr(botocore.client, '_xray_enabled', True)\n\n wrapt.wrap_function_wrapper(\n 'botocore.client',\n 'BaseClient._make_api_call',\n _xray_traced_botocore,\n )\n\n wrapt.wrap_function_wrapper(...
[ "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 instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Utility method to find all converters from a given type. :param from_type: :return:
[ "def get_all_conversion_chains_from_type(self, from_type: Type[Any]) \\\n -> Tuple[List[Converter], List[Converter], List[Converter]]:\n \n return self.get_all_conversion_chains(from_type=from_type)" ]
[ "def values(*rels):\n '''\n \n '''\n #Action function generator to multiplex a relationship at processing time\n def _values(ctx):\n '''\n Versa action function Utility to specify a list of relationships\n\n :param ctx: Versa context used in processing (e.g. includes the prototyp...
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Returns all of the rules set up for the $field. @param string $field @return string[] ```php foreach ($validator->rules($field) as $validate => $param) { $attributes["data-rule-{$validate}"] = htmlspecialchars($param); } ```
[ "public function rules($field)\n {\n return (isset($this->data[$field]) && $validate = $this->data[$field]['validate']) ? $validate : array();\n }" ]
[ "public function ls($options = '')\n\t{\n\t\t$rows =\n\t\t[\n\t\t\t[\"option\",\"description\",\"example\"],\n\t\t\t[\"pre\",\"Preformats the value column\",\"pre\"],\n\t\t\t[\"wide\",\"Sets the width of the table to be 100%\",\"wide\"],\n\t\t\t[\"class\",\"Sets the table class attribute\",\"class:fancy\"],\n\t\t\t...
codesearchnet
{ "query": "Represent the summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Resolves the value of the current Promise with the given numeric value. @param value the value of the Promise
[ "public final void resolve(Number value) {\r\n\t\tfuture.complete(new Tree((Tree) null, null, value));\r\n\t}" ]
[ "@SuppressWarnings(\"unchecked\")\n public <T> Param<T> get(int index) {\n // TODO: Provide a more type safe API. E.g. make index a pojo typed on T which is aligned with the Param<T>\n return (Param<T>) params[index];\n }" ]
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }
the first invocation for this profiling session. @param objectName @param methodName @return
[ "public static MethodInvocation start(String objectName, String methodName, int lineNumber) {\n bigMessage(\"Starting profiling... \" + objectName + \"#\" + methodName + \" (\" + lineNumber + \")\");\n if (profiling()) {\n logger.error(\"Profiling was already started for '{}'\", callstack.g...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github comment about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
// UnmarshalJSON sets the object from the provided JSON representation
[ "func (l *WAFRegionalXSSMatchSetXSSMatchTupleList) UnmarshalJSON(buf []byte) error {\n\t// Cloudformation allows a single object when a list of objects is expected\n\titem := WAFRegionalXSSMatchSetXSSMatchTuple{}\n\tif err := json.Unmarshal(buf, &item); err == nil {\n\t\t*l = WAFRegionalXSSMatchSetXSSMatchTupleList...
[ "@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:" }
@param $key @return bool
[ "public function hasRelation($key)\n {\n if (array_key_exists($key, $this->relations)) {\n return true;\n }\n\n $entity = $this->getEntity();\n if (method_exists($entity, $key)) {\n return true;\n }\n\n return false;\n }" ]
[ "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 sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Run the migrations. @return void
[ "public function up()\n {\n Schema::create('asset_downloads', function (Blueprint $table) {\n $table->bigInteger('id', true)->unsigned();\n $table->integer('asset_id')->unsigned()->index('asset_downloads_asset_id');\n $table->integer('time')->unsigned()->nullable();\n ...
[ "private function cmdGenerate()\n {\n //check if path exists\n if (!is_dir($this->configKeyPath)) {\n Main::copyDirectoryContents(dirname(__DIR__).'/Config/Devbr/Key', $this->configKeyPath);\n }\n //Now, OPEN_SSL\n $this->createKeys();\n return \"\\n Can, Ope...
codesearchnet
{ "query": "Represent the Github description about Database management:", "pos": "Represent the Github code about Database management:", "neg": "Represent the Github code about programming:" }
Returns ``True`` if any of ``instances`` match an active switch. Otherwise returns ``False``. >>> gargoyle.is_active('my_feature', request) #doctest: +SKIP
[ "def is_active(self, key, *instances, **kwargs):\n \n default = kwargs.pop('default', False)\n\n # Check all parents for a disabled state\n parts = key.split(':')\n if len(parts) > 1:\n child_kwargs = kwargs.copy()\n child_kwargs['default'] = None\n ...
[ "def ext_pillar(minion_id, # pylint: disable=W0613\n pillar, # pylint: disable=W0613\n conf):\n '''\n \n '''\n vs = varstack.Varstack(config_filename=conf)\n return vs.evaluate(__grains__)" ]
codesearchnet
{ "query": "Represent the Github summarization about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about Data processing:" }
// GetIdleTime the time that this object last spend in the the idle state
[ "func (o *PooledObject) GetIdleTime() time.Duration {\n\telapsed := time.Since(o.LastReturnTime)\n\t// elapsed may be negative if:\n\t// - another goroutine updates lastReturnTime during the calculation window\n\tif elapsed >= 0 {\n\t\treturn elapsed\n\t}\n\treturn 0\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 text:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Compress an input stream with GZIP and return the result size, digest and compressed stream. @param inputStream @return the compressed stream @throws SnowflakeSQLException @deprecated Can be removed when all accounts are encrypted
[ "private static InputStreamWithMetadata compressStreamWithGZIPNoDigest(\n InputStream inputStream) throws SnowflakeSQLException\n {\n try\n {\n FileBackedOutputStream tempStream =\n new FileBackedOutputStream(MAX_BUFFER_SIZE, true);\n\n CountingOutputStream countingStream =\n ...
[ "@Override\n public HasInputStream readResource(Path path, ResourceMetaBuilder resourceMetaBuilder, final HasInputStream\n hasResourceStream) {\n if (wasEncoded(resourceMetaBuilder)) {\n return decode(hasResourceStream);\n }\n //return null to indicate no change was per...
codesearchnet
{ "query": "Represent the summarization about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Software development:" }
// This updates the shard manager to use new shard states.
[ "func (m *BaseShardManager) UpdateShardStates(shardStates []ShardState) {\n\tnewAddrs := set.NewSet()\n\tfor _, state := range shardStates {\n\t\tnewAddrs.Add(state.Address)\n\t}\n\n\tm.rwMutex.Lock()\n\tdefer m.rwMutex.Unlock()\n\n\toldAddrs := set.NewSet()\n\tfor _, state := range m.shardStates {\n\t\toldAddrs.Ad...
[ "@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 comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Requests to remove existing value @param string $value
[ "public function remove($value)\n {\n if (!is_string($value)) {\n throw new UnexpectedTypeException($value, 'string', 'value');\n }\n if (empty($value)) {\n return;\n }\n\n if ($this->allowTokenize) {\n $this->values = array_diff($this->values, ...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the comment about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
// RelayMessage gets the relay message (e.g. Relay Forward, Relay Reply) into // this option (when hopcount > 0 of outer RelayMessage).
[ "func (r *RelayMessageOption) RelayMessage() (*RelayMessage, error) {\n\trm := new(RelayMessage)\n\terr := rm.UnmarshalBinary(*r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn rm, nil\n}" ]
[ "@Override\n public void init(TCPWriteRequestContext x, H2MuxTCPWriteCallback c) {\n writeReqContext = x;\n muxCallback = c;\n\n // callback will need to know how to get back to this write queue.\n // This means one and only one H2WriteTree per H2InboundLink which has just one true TC...
codesearchnet
{ "query": "Represent the Github post about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Initializes the values of the members.<p> @param params the parameter map to get a value from
[ "protected void initMembers(Map<String, String> params) {\r\n\r\n clearDialogObject();\r\n\r\n m_webserverscript = getParameter(params, PARAM_WEBSERVER_SCRIPT, DEFAULT_PARAM_WEBSERVER_SCRIPT);\r\n m_targetpath = getParameter(params, PARAM_TARGET_PATH, DEFAULT_PARAM_TARGET_PATH);\r\n m_co...
[ "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 sentence about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Fetches an Auth token @return Response @throws ClientException @throws GuzzleException
[ "protected function tokenRequest(string $route, array $params): Response\n {\n try {\n return $this->client->request('POST', $route, ['json' => $params]);\n } catch (ClientException $exception) {\n if (in_array($exception->getResponse()->getStatusCode(), [401, 403])) {\n ...
[ "private function processAuthenticate(Session $session, AuthenticateMessage $msg)\n {\n $session->abort(new \\stdClass(), 'thruway.error.internal');\n Logger::error($this, 'Authenticate sent to realm without auth manager.');\n }" ]
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Programming:" }
Returns an attribute value corresponding to the key method and value given.
[ "private AttributeValue getAutoGeneratedKeyAttributeValue(Method getter, Object getterResult) {\n ArgumentMarshaller marshaller = reflector.getAutoGeneratedKeyArgumentMarshaller(getter);\n return marshaller.marshall(getterResult);\n }" ]
[ "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 sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Add all the given tickmarks to the DOM in a batch
[ "function _renderMarks(posArray) {\n var html = \"\",\n cm = editor._codeMirror,\n editorHt = cm.getScrollerElement().scrollHeight;\n\n // We've pretty much taken these vars and the getY function from CodeMirror's annotatescrollbar addon\n // https://github.com/codemirror/...
[ "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 text:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Return JSON for tree starting at `node`.
[ "def export(self, node):\n \"\"\"\"\"\"\n dictexporter = self.dictexporter or DictExporter()\n data = dictexporter.export(node)\n return json.dumps(data, **self.kwargs)" ]
[ "def openCurrentItem(self):\n \n logger.debug(\"openCurrentItem\")\n _currentItem, currentIndex = self.getCurrentItem()\n if not currentIndex.isValid():\n return\n\n # Expanding the node will call indirectly call RepoTreeModel.fetchMore which will call\n # BaseRt...
codesearchnet
{ "query": "Represent the Github text about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Make the twig environment. @return \Autarky\TwigTemplating\TwigEnvironment
[ "public function makeTwigEnvironment(ContainerInterface $dic)\n\t{\n\t\t$config = $this->app->getConfig();\n\t\t$options = ['debug' => $config->get('app.debug')];\n\n\t\tif ($config->has('path.templates_cache')) {\n\t\t\t$options['cache'] = $config->get('path.templates_cache');\n\t\t} else if ($config->has('path.st...
[ "public function logBanner($additions = null)\n {\n $this->addStatusMessage('FlexiBee '.str_replace('://',\n '://'.$this->user.'@', $this->getApiUrl()).' FlexiPeeHP v'.self::$libVersion.' (FlexiBee '.EvidenceList::$version.') EasePHP Framework v'.\\Ease\\Atom::$frameworkVersion.' '.$additio...
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Disable middleware at runtime
[ "function(middleware) {\n this.middlewares = this.middlewares.filter(function(element) {\n if (element.fun === middleware)\n return false;\n return true;\n });\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 instruction:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
// New makes a new error type. It takes a format string.
[ "func (e *ErrorClass) New(format string, args ...interface{}) error {\n\treturn e.wrap(fmt.Errorf(format, args...), nil, nil)\n}" ]
[ "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 post about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code about programming:" }
Builds the instance of class @return \Puzzlout\Framework\Core\DirectoryManager\ArrayFilterDirectorySearch
[ "public static function Init(\\Puzzlout\\Framework\\Core\\Application $app) {\n $instance = new ArrayFilterFileSearch();\n $instance->FileList = array();\n $instance->ContextApp = $app;\n return $instance;\n }" ]
[ "public function initServices() {\n $this->getFrontController()->getRequestHandler()->addService($entityService = $this->getEntityService());\n \n // wir mappen den users controller auf den in Psc\n $entityService->setControllerClass('User', 'Psc\\CMS\\Controller\\UserEntityController');\n }" ]
codesearchnet
{ "query": "Represent the sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Return the value for this field. This will return an array if the field is setup as "multiple". Otherwise it will return a string with the selected value. @return array|string
[ "public function getValue()\n {\n $selected = [];\n\n // walk all options\n foreach ($this->options as $option) {\n if ($option instanceof Option) {\n if ($option->isSelected()) {\n $selected[] = $option->getValue();\n }\n ...
[ "public function singlePcmlToParam(\\SimpleXmlElement $dataElement)\n {\n $tagName = $dataElement->getName();\n \n // get attributes of this element.\n $attrs = $dataElement->attributes();\n \n // both struct and data have name, count (optional), usage\n $name = (isset($a...
codesearchnet
{ "query": "Represent the summarization about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
Parse CPE_NAME data from the os-release Info: https://csrc.nist.gov/projects/security-content-automation-protocol/scap-specifications/cpe :param cpe: :return:
[ "def _parse_cpe_name(cpe):\n '''\n \n '''\n part = {\n 'o': 'operating system',\n 'h': 'hardware',\n 'a': 'application',\n }\n ret = {}\n cpe = (cpe or '').split(':')\n if len(cpe) > 4 and cpe[0] == 'cpe':\n if cpe[1].startswith('/'): # WFN to URI\n re...
[ "def get_projects(self):\n \n\n repos_list = []\n\n gerrit_projects_db = self.projects_db\n\n db = Database(user=\"root\", passwd=\"\", host=\"localhost\", port=3306,\n scrdb=None, shdb=gerrit_projects_db, prjdb=None)\n\n sql = \"\"\"\n SELECT DISTI...
codesearchnet
{ "query": "Represent the summarization about Data processing:", "pos": "Represent the code about Data processing:", "neg": "Represent the code:" }
// WriteTo implement the io.WriterTo interface. It serializes // the "push MPLS" action with a necessary padding.
[ "func (a *ActionPushMPLS) WriteTo(w io.Writer) (int64, error) {\n\treturn encoding.WriteTo(w, action{a.Type(), actionLen},\n\t\ta.EtherType, pad2{})\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 sentence about writing:", "pos": "Represent the Github code about writing:", "neg": "Represent the Github code:" }
Process and return the contents for this container for the requested file type. @param string $type 'style' or 'script' @return string
[ "public function content($type)\n\t{\n\t\t$assets = array();\n\t\t\n\t\tforeach ($this->assets as $asset) {\n\t\t\tif ('style' == $type && 'css' !== $asset['ext'] && 'less' !== $asset['ext']) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if ('script' == $type && 'js' !== $asset['ext']) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t...
[ "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 instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Check selected option in list. @param array $options @param string $selectedVal @return array
[ "protected function _checkSelected(array $options, $selectedVal)\n {\n if (!empty($selectedVal) && !Arr::key($selectedVal, $options)) {\n $selectedVal = self::KEY_NO_EXITS_VAL;\n $options = array_merge(array(self::KEY_NO_EXITS_VAL => $this->_translate('No exits')), $options);\n ...
[ "public function updateConfigOptions()\n {\n //search the config menu for our item\n $options = $this->searchMenu($this->name);\n\n //override the config's options\n $this->getConfig()->setOptions($options);\n }" ]
codesearchnet
{ "query": "Represent the Github summarization about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
//Write impl io.Writer
[ "func (this *BufferedWriter) Write(p []byte) (n int, err error) {\n\n\tdst := make([]byte, len(p), len(p))\n\tcopy(dst, p)\n\n\tselect {\n\tcase this.queue <- dst:\n\t\treturn len(dst), nil\n\tdefault:\n\t\treturn 0, BufferFull\n\t}\n}" ]
[ "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:" }
Execute method. @return null
[ "public function execute()\n {\n $addressBookName = $this->getRequest()->getParam('name');\n $visibility = $this->getRequest()->getParam('visibility');\n $website = (int) $this->getRequest()->getParam('website', 0);\n\n if ($this->helperData->isEnabled($website)) {\n $clien...
[ "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:" }
// HasCapability returns true if the capability is supported by this binary.
[ "func (ap *ApplicationProvider) HasCapability(capability string) bool {\n\tswitch capability {\n\t// Add new capability names here\n\tcase ApplicationV1_1:\n\t\treturn true\n\tcase ApplicationV1_2:\n\t\treturn true\n\tcase ApplicationV1_3:\n\t\treturn true\n\tcase ApplicationPvtDataExperimental:\n\t\treturn true\n\...
[ "public FunctionHandle resolveFunction(Session session, QualifiedName name, List<TypeSignatureProvider> parameterTypes)\n {\n // TODO Actually use session\n // Session will be used to provide information about the order of function namespaces to through resolving the function.\n // This is l...
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Software development:" }
return seconds from dhms
[ "def s_from_dhms(time):\n \"\"\"\"\"\"\n dhms_s = { 's' : 1, 'm' : 60, 'h' : 3600, 'd' : 86400 }\n time = time.lower()\n word_list = re.findall('\\d*[^\\d]*',time)\n seconds=0 \n for word in word_list:\n if word != '':\n sec = 1\n for t in list(dhms_s.keys()):\n ...
[ "def anim(host, seq, anim, d):\n \n at(host, 'ANIM', seq, [anim, d])" ]
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
// Has returns true if the provided item is already allocated and a call // to Allocate(offset) would fail.
[ "func (r *AllocationBitmap) Has(offset int) bool {\n\tr.lock.Lock()\n\tdefer r.lock.Unlock()\n\n\treturn r.allocated.Bit(offset) == 1\n}" ]
[ "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 summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Get usrgos in a requested section.
[ "def get_usrgos_g_section(self, section=None):\n \"\"\"\"\"\"\n if section is None:\n section = self.hdrobj.secdflt\n if section is True:\n return self.usrgos\n # Get dict of sections and hdrgos actually used in grouping\n section2hdrgos = cx.OrderedDict(self...
[ "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:" }
执行SQL语句 @param string $sql @return IResult
[ "public function execute($sql)\n {\n try{\n if(null === $this->queryType)\n {\n $this->queryType = QueryType::WRITE;\n }\n if(!$this->isInitDb)\n {\n $this->db = Db::getInstance($this->poolName, $this->queryType);\n ...
[ "public static SqlInfo getSqlInfoSimply(String nsAtZealotId, Object paramObj) {\n String[] arr = nsAtZealotId.split(ZealotConst.SP_AT);\n if (arr.length != LEN) {\n throw new ValidFailException(\"nsAtZealotId参数的值必须是xml文件中的 nameSpace + '@@' + zealotId 节点的值,\"\n + \"如:'stu...
codesearchnet
{ "query": "Represent the instruction about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Software Development:" }
// IsEIP158 returns whether num is either equal to the EIP158 fork block or greater.
[ "func (c *ChainConfig) IsEIP158(num *big.Int) bool {\n\treturn isForked(c.EIP158Block, num)\n}" ]
[ "func LockTimeToSequence(isSeconds bool, locktime uint32) uint32 {\n\t// If we're expressing the relative lock time in blocks, then the\n\t// corresponding sequence number is simply the desired input age.\n\tif !isSeconds {\n\t\treturn locktime\n\t}\n\n\t// Set the 22nd bit which indicates the lock time is in secon...
codesearchnet
{ "query": "Represent the comment about Blockchain:", "pos": "Represent the code about Blockchain:", "neg": "Represent the code:" }
Gets a directory by relative or absolute path, optionally creates the directory if missing. @param string $path @param boolean $createMissing @return Tarsana\Filesystem\Directory @throws Tarsana\Filesystem\Exceptions\FilesystemException
[ "public function dir($path, $createMissing = false)\n {\n if (! $this->adapter->isAbsolute($path)) {\n $path = $this->rootPath . $path;\n }\n if (! $createMissing && ! $this->isDir($path, true)) {\n throw new FilesystemException(\"Cannot find the directory '{$path}'\");...
[ "protected function createFlysystemAdapter()\n {\n $this->flysystemAdapter = new $this->options->flysystemAdapter($this->basePath);\n if ($this->flysystemAdapter instanceof $this->options->flysystemAdapter != true) {\n throw new ConfiguratorException('Error: Unable to Initialize the Flys...
codesearchnet
{ "query": "Represent the Github comment about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
New connection config connection config. @param l the ldap properties @return the connection config
[ "public static ConnectionConfig newConnectionConfig(final AbstractLdapProperties l) {\n final ConnectionConfig cc = new ConnectionConfig();\n final String urls = Arrays.stream(l.getLdapUrl().split(\",\")).collect(Collectors.joining(\" \"));\n LOGGER.debug(\"Transformed LDAP urls from [{}] to [{...
[ "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 comment about Technology:", "pos": "Represent the Github code about Technology:", "neg": "Represent the Github code:" }
Method to get property QueryHelper @return QueryHelper
[ "public function getQueryHelper()\n {\n if (!$this->queryHelper) {\n $this->queryHelper = new QueryHelper($this->db);\n\n if ($this->table) {\n $this->queryHelper->addTable($this->alias ?: $this->table, $this->table);\n }\n }\n\n return $this->...
[ "@Help(help = \"Create the object of type {#}\")\n public T create(final T object) throws SDKException {\n return (T) requestPost(object);\n }" ]
codesearchnet
{ "query": "Represent the comment about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Format chunked data. @param array $data @param bool $terminating @return string
[ "protected function chunk(array $data, bool $terminating): string\n {\n $json = json_encode($data, 0);\n $length = $terminating\n ? strlen($json)\n : strlen($json.self::EOL);\n\n $chunk = implode(self::EOL, [\n 'Content-Type: application/json',\n '...
[ "protected static function parsePrintableString(&$data, &$result)\n {\n // Printable string type\n $data = self::parseCommon($data, $stringData);\n $result[] = [\n 'Printable String (' . self::$len . ')',\n $stringData, ];\n }" ]
codesearchnet
{ "query": "Represent the text about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Programming:" }
Handle the subscribe user. @return \Illuminate\View\View
[ "public function postSubscribe()\n {\n $email = Binput::get('email');\n $subscriptions = Binput::get('subscriptions');\n $verified = app(Repository::class)->get('setting.skip_subscriber_verification');\n\n try {\n $subscription = execute(new SubscribeSubscriberCommand($emai...
[ "public function handle(PublishThePost $event) {\n $this->sendEmailsFromList->sendEmails($event->data['id']['listID'], $event->data['id']);\n \\Log::info('Lasallecms\\Lasallecmsapi\\Listeners\\TriggerLaSalleCRMList listener completed');\n }" ]
codesearchnet
{ "query": "Represent the instruction about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about Software development:" }
Sets a style property for a given element. @method setStyle @param {HTMLElement} An HTMLElement to apply the style to. @param {String} att The style property to set. @param {String|Number} val The value.
[ "function(node, att, val, style) {\n style = style || node.style;\n var CUSTOM_STYLES = Y_DOM.CUSTOM_STYLES,\n current;\n\n if (style) {\n if (val === null || val === '') { // normalize unsetting\n val = '';\n } else if (!isNaN(new Number(val)) &&...
[ "function (renderer, nodeName) {\n\t\tvar wrapper = this;\n\t\twrapper.element = nodeName === 'span' ?\n\t\t\tcreateElement(nodeName) :\n\t\t\tdoc.createElementNS(SVG_NS, nodeName);\n\t\twrapper.renderer = renderer;\n\t\t/**\n\t\t * A collection of attribute setters. These methods, if defined, are called right befo...
codesearchnet
{ "query": "Represent the text about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Programming:" }
Add a swoole table to existing tables. @param string $name @param SwooleTable $table @return Table
[ "public function add(string $name, SwooleTable $table)\n {\n $this->tables[$name] = $table;\n\n return $this;\n }" ]
[ "final protected function sEav($c = EavSetup::class) {return dfc($this, function($c) {return\n\t\tdf_new_om($c, ['setup' => $this->_setup])\n\t;}, [$c]);}" ]
codesearchnet
{ "query": "Represent the text about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code:" }
@param LoaderInterface[] $loaders @return XmlFileLoader[]|YamlFileLoader[]
[ "private function extractSupportedLoaders(array $loaders)\n {\n $supportedLoaders = [];\n\n foreach ($loaders as $loader) {\n if ($loader instanceof XmlFileLoader || $loader instanceof YamlFileLoader) {\n $supportedLoaders[] = $loader;\n } elseif ($loader instan...
[ "public function objectFromIndex(IObjectSetWithIdentityByIndex $objects) : ObjectFieldBuilder\n {\n return new ObjectFieldBuilder(\n $this->type(new ObjectIdType(new ObjectIndexOptions($objects), $loadAsObjects = true))\n );\n }" ]
codesearchnet
{ "query": "Represent the Github post about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about Software development:" }
Writes information about each page in a PDF file to the specified output stream. @since 2.1.5 @param pdfFile a File instance referring to a PDF file @param out the output stream to send the content to @throws IOException
[ "static public void listContentStream(File pdfFile, PrintWriter out) throws IOException {\r\n PdfReader reader = new PdfReader(pdfFile.getCanonicalPath());\r\n \r\n int maxPageNum = reader.getNumberOfPages();\r\n \r\n for (int pageNum = 1; pageNum <= maxPageNum; pageNum++){\r\...
[ "@Override\n public XMLStreamReader2 createXMLStreamReader(File f)\n throws XMLStreamException\n {\n /* true for auto-close, since caller has no access to the underlying\n * input stream created from the File\n */\n return createSR(f, false, true);\n }" ]
codesearchnet
{ "query": "Represent the text about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Converts a list of EDBObjects into a list of JPAObjects
[ "public static List<JPAObject> convertEDBObjectsToJPAObjects(List<EDBObject> objects) {\n List<JPAObject> result = new ArrayList<JPAObject>();\n for (EDBObject object : objects) {\n result.add(convertEDBObjectToJPAObject(object));\n }\n return result;\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 post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Get a theme variable @param string $var @param bool $default @return string
[ "public function themeVarFunc($var, $default = null)\n {\n $header = $this->grav['page']->header();\n $header_classes = $header->{$var} ?? null;\n\n return $header_classes ?: $this->config->get('theme.' . $var, $default);\n }" ]
[ "public function help()\n {\n $style = new Eurekon\\Style(' *** RUN - HELP ***');\n Eurekon\\Out::std($style->color('fg', Eurekon\\Style::COLOR_GREEN)->get());\n Eurekon\\Out::std('');\n\n $help = new Eurekon\\Help('...', true);\n $help->addArgument('', 'directory', 'Config dir...
codesearchnet
{ "query": "Represent the Github instruction about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about NLP:" }
// UpdateJWT updates the JWT and provides a new expiration date.
[ "func (p *PUContext) UpdateJWT(jwt string, expiration time.Time) {\n\tp.Lock()\n\tdefer p.Unlock()\n\n\tp.jwt = jwt\n\tp.jwtExpiration = expiration\n}" ]
[ "@SuppressWarnings(\"OptionalGetWithoutIsPresent\")\n public Token<DelegationTokenIdentifier> getBoundOrNewDT(String renewer) throws IOException {\n logger.atFine().log(\"Delegation token requested\");\n if (isBoundToDT()) {\n // the FS was created on startup with a token, so return it.\n logger.at...
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Verify the OTP. @param $secret @param $one_time_password @return mixed
[ "public function verifyGoogle2FA($secret, $one_time_password)\n {\n return $this->verifyKey(\n $secret,\n $one_time_password,\n $this->config('window'),\n null, // $timestamp\n $this->getOldTimestamp() ?: Google2FAConstants::ARGUME...
[ "private function preconfigured() {return dfc($this, function() {\n\t\t$s = $this->s(); /** @var S $s */\n\t\t/** @var string $key */\n\t\t$key = 'actionFor' . (df_customer_is_new($this->o()->getCustomerId()) ? 'New' : 'Returned');\n\t\t/** @var string $result */\n\t\treturn $s->v($key, null, function() use($s) {re...
codesearchnet
{ "query": "Represent the Github text about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
Add alternative names to you custom commands. `names` is a single string with a space separated list of aliases for the decorated command.
[ "def alt_names(names: str) -> Callable[..., Any]:\n \n names_split = names.split()\n\n def decorator(func: Callable[..., Any]) -> Callable[..., Any]:\n func.alt_names = names_split # type: ignore\n return func\n return decorator" ]
[ "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 sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
This is a utility method intended provided to help the JPA module.
[ "public static IQueryParameterAnd<?> parseQueryParams(FhirContext theContext, RestSearchParameterTypeEnum paramType,\n\t\t\tString theUnqualifiedParamName, List<QualifiedParamList> theParameters) {\n\t\tQueryParameterAndBinder binder = null;\n\t\tswitch (paramType) {\n\t\tcase COMPOSITE:\n\t\t\tthrow new Unsupporte...
[ "public FunctionHandle resolveFunction(Session session, QualifiedName name, List<TypeSignatureProvider> parameterTypes)\n {\n // TODO Actually use session\n // Session will be used to provide information about the order of function namespaces to through resolving the function.\n // This is l...
codesearchnet
{ "query": "Represent the comment:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
@param \Generated\Shared\Transfer\RestCompanyBusinessUnitsRequestTransfer $restCompanyBusinessUnitsRequestTransfer @return \Generated\Shared\Transfer\RestCompanyBusinessUnitsResponseTransfer
[ "public function update(RestCompanyBusinessUnitsRequestTransfer $restCompanyBusinessUnitsRequestTransfer\n ): RestCompanyBusinessUnitsResponseTransfer\n {\n /** @var \\Generated\\Shared\\Transfer\\RestCompanyBusinessUnitsResponseTransfer $restCompanyBusinessUnitsResponseTransfer */\n $restCompan...
[ "public function importMerchantRelationshipProductList(\n ?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null\n ): DataImporterReportTransfer {\n return $this->getFactory()->createMerchantRelationshipProductListDataImport()->import($dataImporterConfigurationTransfer);\n ...
codesearchnet
{ "query": "Represent the text about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software Development:" }