query stringlengths 16 255 | pos list | neg list | task stringclasses 1
value | instruction dict |
|---|---|---|---|---|
Store/replaced code of a specified ClassDomain.
@param string $domainName
@param string $data
@param bool $force : allows to define if overwrite file or not
@return bool|int | [
"public function storeDomainCode(string $domainName, string $data, bool $force = false)\n {\n $domainClassName = DomainActionNameGenerator::getDomainClassName($domainName);\n $domainClassCodeFullPath = $this->domainsPath . \"/\" . $domainClassName.\".php\";\n\n if (file_exists($domainClassCo... | [
"public function reduceFilePath($varValue, \\DataContainer $dc)\n {\n $doc = $dc->activeRecord;\n\n $path = \\FilesModel::findByUuid($varValue)->path;\n\n $arrFileNameParts = \\Document::splitFileName(substr($path, strlen(\\DmsConfig::getBaseDirectory(true))));\n\n // TODO (#33): reset the new fileType... | codesearchnet | {
"query": "Represent the Github instruction about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about Software development:"
} |
2016-08-31
@used-by df_xml_g()
@param string $tag
@param array(string => mixed) $contents
@param array(string => mixed) $p [optional]
@return string | [
"static function p($tag, array $contents, array $p = []) {return\n\t\t(new static([self::$P__CONTENTS => $contents, self::$P__TAG => $tag] + $p))->_p();\n\t}"
] | [
"final static function f($m, array $stages = []) {return dfcf(function(M $m, array $stages) {\n\t\t/** @var string $c */$c = df_con_hier($m, __CLASS__); return new $c($m, $stages ?: ['', '']);\n\t}, [dfpm($m), $stages]);}"
] | codesearchnet | {
"query": "Represent the comment about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code about programming:"
} |
Sets how long to wait when executing asynchronous script calls.
@param scriptTimeout time in milliseconds to wait. | [
"public void setScriptWait(int scriptTimeout) {\n try {\n driver().manage().timeouts().setScriptTimeout(scriptTimeout, TimeUnit.MILLISECONDS);\n } catch (Exception e) {\n // https://code.google.com/p/selenium/issues/detail?id=6015\n System.err.println(\"Unable to set s... | [
"public static function wait_for_pending_js_in_session(Session $session) {\n // We don't use behat_base::spin() here as we don't want to end up with an exception\n // if the page & JSs don't finish loading properly.\n for ($i = 0; $i < self::get_extended_timeout() * 10; $i++) {\n $pe... | codesearchnet | {
"query": "Represent the Github summarization:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
// ChannelTyping broadcasts to all members that authenticated user is typing in
// the given channel.
// channelID : The ID of a Channel | [
"func (s *Session) ChannelTyping(channelID string) (err error) {\n\n\t_, err = s.RequestWithBucketID(\"POST\", EndpointChannelTyping(channelID), nil, EndpointChannelTyping(channelID))\n\treturn\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 Github summarization about Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code about programming:"
} |
Public methods -------------- | [
"function (value, strategy, e) {\n var pre = this.getTextFromHeadToCaret();\n var post = this.el.value.substring(pre.length);\n var newSubstr = strategy.replace(value, e);\n var regExp;\n if (typeof newSubstr !== 'undefined') {\n if ($.isArray(newSubstr)) {\n post = newSubst... | [
"function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }"
] | codesearchnet | {
"query": "Represent the text:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
@param string $method
@param array $inherentParams
@return mixed
@throws \InvalidArgumentException | [
"public function injection($method, $inherentParams=[])\n {\n if (! $this->reflection->hasMethod($method)) {\n throw new \\InvalidArgumentException('Method not exists.');\n }\n $instances = $this->dependentService->getParams($this->reflection, $method, count($inherentParams));\n ... | [
"public function execute($request)\n {\n RequestNotSupportedException::assertSupports($this, $request);\n\n //$model = ArrayObject::ensureArrayObject($request->getModel());\n\n $this->gateway->execute(new PaymentResponse($request->getModel()));\n }"
] | codesearchnet | {
"query": "Represent the Github description about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about writing:"
} |
Returns the file path relative to the sourceSet directory
@return path relative to sourceSet directory | [
"private String getPathRelativeToSourceSet(File file) {\n Path absolutePath = Paths.get(file.getAbsolutePath());\n Path basePath = Paths.get(task.getProject().file(\"src\").getAbsolutePath() + File.separator + getSourceSetNameFromFile(file));\n return basePath.relativize(absolutePath).toString();\n }"
] | [
"function(request, modules_root, options){\n var [path, analysis] = normalize_path(request, modules_root, options.relative_path_root);\n var cache_path = path; // define cachepath as path to file with content. For modules, defines path to package.json\n if(analysis.is_a_module) cache_path = \"m... | codesearchnet | {
"query": "Represent the instruction about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code:"
} |
Set the time at which the resource was last modified.
@param lastModified the lastModified value to set
@return the JobScheduleGetHeaders object itself. | [
"public JobScheduleGetHeaders withLastModified(DateTime lastModified) {\n if (lastModified == null) {\n this.lastModified = null;\n } else {\n this.lastModified = new DateTimeRfc1123(lastModified);\n }\n return this;\n }"
] | [
"function(apiClient) {\n this.apiClient = apiClient || Configuration.default.getDefaultApiClient() || ApiClient.instance;\n\n\n this.setApiClient = function(apiClient) {\n this.apiClient = apiClient;\n };\n\n this.getApiClient = function() {\n return this.apiClient;\n };\n\n\n /**\n ... | codesearchnet | {
"query": "Represent the post about Software development:",
"pos": "Represent the code about Software development:",
"neg": "Represent the code about Software development:"
} |
Parses contents of the intrusive linked list of `ifaddrs`.
Args:
ifaddrs: A pointer to the first node of `ifaddrs` linked list. Can be NULL.
Returns:
An iterator over instances of `rdf_client_network.Interface`. | [
"def ParseIfaddrs(ifaddrs):\n \n precondition.AssertOptionalType(ifaddrs, ctypes.POINTER(Ifaddrs))\n\n ifaces = {}\n\n for ifaddr in IterIfaddrs(ifaddrs):\n ifname = ctypes.string_at(ifaddr.ifa_name).decode(\"utf-8\")\n iface = ifaces.setdefault(ifname, rdf_client_network.Interface())\n iface.ifname = ... | [
"def _GetStat(self):\n \n stat_object = super(VShadowFileEntry, self)._GetStat()\n\n if self._vshadow_store is not None:\n # File data stat information.\n stat_object.size = self._vshadow_store.volume_size\n\n # Ownership and permissions stat information.\n\n # File entry type stat informat... | codesearchnet | {
"query": "Represent the post about Software Development:",
"pos": "Represent the code about Software Development:",
"neg": "Represent the code about File management:"
} |
// Internal callback for OnCDemoClassInfo. | [
"func (p *Parser) onCDemoClassInfo(m *dota.CDemoClassInfo) error {\n\tfor _, c := range m.GetClasses() {\n\t\tclassId := c.GetClassId()\n\t\tnetworkName := c.GetNetworkName()\n\n\t\tclass := &class{\n\t\t\tclassId: classId,\n\t\t\tname: networkName,\n\t\t\tserializer: p.serializers[networkName],\n\t\t}\n\t... | [
"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 sentence about Software Development:",
"pos": "Represent the Github code about Software Development:",
"neg": "Represent the Github code:"
} |
// https://github.com/google/skylark/blob/master/doc/spec.md#int | [
"func int_(thread *Thread, _ *Builtin, args Tuple, kwargs []Tuple) (Value, error) {\n\tvar x Value = zero\n\tvar base Value\n\tif err := UnpackArgs(\"int\", args, kwargs, \"x\", &x, \"base?\", &base); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// \"If x is not a number or base is given, x must be a string.\"\n\tif... | [
"function getUrl(version = current) {\n\tconst name = `native-ext-v${version}-${os}-${arch}.${ext}`;\n\treturn `https://github.com/NiklasGollenstede/native-ext/releases/download/v${version}/`+ name;\n}"
] | codesearchnet | {
"query": "Represent the Github post:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
List all tokens for this content instance.
:param request: a WSGI request object
:param kwargs: keyword arguments (optional)
:return: `rest_framework.response.Response` | [
"def list_tokens(self, request, **kwargs):\n \n\n # no date checking is done here to make it more obvious if there's an issue with the\n # number of records. Date filtering will be done on the frontend.\n infos = [ObfuscatedUrlInfoSerializer(info).data\n for info in Obfus... | [
"def get_value_from_content(key):\n \n def value_from_content_function(service, message):\n \"\"\"Actual implementation of get_value_from_content function.\n\n :param service: SelenolService object.\n :param message: SelenolMessage request.\n \"\"\"\n return _get_value(messa... | codesearchnet | {
"query": "Represent the post about software development:",
"pos": "Represent the code about software development:",
"neg": "Represent the code about Software development:"
} |
_do_comment(self, node) -> None
Process a comment node. Render a leading or trailing #xA if the
document order of the comment is greater or lesser (respectively)
than the document element. | [
"def _do_comment(self, node):\n '''\n '''\n if not _in_subset(self.subset, node): return\n if self.comments:\n W = self.write\n if self.documentOrder == _GreaterElement: W('\\n')\n W('<!--')\n W(node.data)\n W('-->')\n if ... | [
"def DocToHelp(doc):\n \"\"\"\"\"\"\n\n # Get rid of starting and ending white space. Using lstrip() or even\n # strip() could drop more than maximum of first line and right space\n # of last line.\n doc = doc.strip()\n\n # Get rid of all empty lines.\n whitespace_only_line = re.compile('^[ \\t]+$', re.M)\n ... | codesearchnet | {
"query": "Represent the description:",
"pos": "Represent the code:",
"neg": "Represent the code about programming:"
} |
Traverse the whole document and replace <a>TYPENAME</a> with: <a href="../api/symbols/TYPENAME.html">TYPENAME</a> and <a>TYPENAME.MEMBERNAME</a> with: <a href="../api/symbols/TYPENAME.html#MEMBERNAME">TYPENAME.MEMBERNAME</a> | [
"function goDoc() {\n _traverseDOM(document);\n // add standard footer\n var ftr = document.createElement(\"div\");\n ftr.className = \"footer\";\n var msg = \"Copyright © 1998-2015 by Northwoods Software Corporation.\";\n if (go && go.version) {\n msg = \"GoJS® version \" + go.version + \". \" + ... | [
"def _parseXpathScope(self):\n \n rd = self.refsDecl\n matches = REFSDECL_SPLITTER.findall(rd)\n return REFSDECL_REPLACER.sub(\"?\", \"\".join(matches[0:-1])), REFSDECL_REPLACER.sub(\"?\", matches[-1])"
] | codesearchnet | {
"query": "Represent the Github summarization:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
Get the object returned by the given select statement.
@param <T> class the return value will be casted to
@param _selectStmt select statement the object is wanted for
@return object for the select statement
@throws EFapsException on error | [
"@SuppressWarnings(\"unchecked\")\n public <T> T getSelect(final String _selectStmt)\n throws EFapsException\n {\n final OneSelect oneselect = this.selectStmt2OneSelect.get(_selectStmt);\n return oneselect == null ? null : (T) oneselect.getObject();\n }"
] | [
"@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 post about Software development:",
"pos": "Represent the code about Software development:",
"neg": "Represent the code about Software development:"
} |
Turn the relay off. | [
"def set_relay_off(self):\n \"\"\"\"\"\"\n if self.get_relay_state():\n try:\n request = requests.get(\n '{}/relay'.format(self.resource), params={'state': '0'},\n timeout=self.timeout)\n if request.status_code == 200:\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 sentence:",
"pos": "Represent the code:",
"neg": "Represent the code about programming:"
} |
// Button creates a default generic button | [
"func Button(name string, text string) *Field {\n\tret := FieldWithType(name, formcommon.BUTTON)\n\tret.SetText(text)\n\treturn ret\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 post:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
// Returns the amount of messages the specified symmetric key
// is still valid for under the handshake scheme | [
"func (api *HandshakeAPI) GetHandshakeKeyCapacity(symkeyid string) (uint16, error) {\n\tstorekey := api.ctrl.getSymKey(symkeyid)\n\tif storekey == nil {\n\t\treturn 0, fmt.Errorf(\"invalid symkey id %s\", symkeyid)\n\t}\n\treturn storekey.limit - storekey.count, nil\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 comment about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code about File management:"
} |
// Creates resource tag(s) | [
"func (c *Client) CreateTags(p *CreateTagsParameter) (*Result, error) {\n\tobj, err := c.Request(\"createTags\", convertParamToMap(p))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn obj.(*Result), err\n}"
] | [
"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 Github sentence:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
Loads an Array of config files.
@param ...$names
@throws \ForceLabs\Framework\Config\ConfigException
@throws DependencyInjection\ClassResolvingException | [
"public function loadConfigs(...$names)\n {\n /** @var Config $config */\n $config = $this->make(Config::class);\n foreach ($names as $name) {\n $config->load($name);\n }\n }"
] | [
"public function createService(ServiceLocatorInterface $serviceLocator)\n {\n /** @var $processingConfig ProcessingConfig */\n $processingConfig = $serviceLocator->get('processing_config');\n\n return ProcessingNode::initializeAs(NodeName::fromString($processingConfig->getNodeName()));\n ... | codesearchnet | {
"query": "Represent the instruction about Software Development:",
"pos": "Represent the code about Software Development:",
"neg": "Represent the code about Software Development:"
} |
Groupping function
@param callable $cb Callback called when response received
@param array $p Hash of properties (offset, limit, opts, key, col, reduce, initial)
@callback $cb ( )
@return void | [
"public function group($cb, $p = [])\n {\n $p['col'] = $this->name;\n $this->pool->group($p, $cb);\n }"
] | [
"def all(self, data={}, **kwargs):\n \"\n return super(Order, self).all(data, **kwargs)"
] | codesearchnet | {
"query": "Represent the Github sentence about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about Software Development:"
} |
Creates the final RouteCollection and returns it.
@return RouteCollection | [
"public function build()\n {\n $routeCollection = new RouteCollection();\n\n foreach ($this->routes as $name => $route) {\n if ($route instanceof Route) {\n $route->setDefaults(array_merge($this->defaults, $route->getDefaults()));\n $route->setOptions(array_... | [
"@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:"
} |
Check to see if we should show the changelog activity if there are any new changes
to the configuration file.
@param ctx the context to launch the activity with
@param configId the changelog configuration xml resource id | [
"public static void checkChangelogDialog(Activity ctx, @XmlRes int configId){\n\n // Parse configuration\n ChangeLog changeLog = Parser.parse(ctx, configId);\n if(changeLog != null){\n\n // Validate that there is a new version code\n if(validateVersion(ctx, changeLog)) {\n... | [
"def add_reference(self, reftype: str, label: str, target):\n \n\n # The self.data[reftype] dict springs into being during the\n # register_references event handler at startup, which looks in the\n # kb registry for all registered reference names.\n self.data[reftype][label] = tar... | codesearchnet | {
"query": "Represent the post:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
<!-- begin-user-doc -->
<!-- end-user-doc -->
@generated | [
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic EList<IfcRelAssignsToResource> getResourceOf() {\r\n\t\treturn (EList<IfcRelAssignsToResource>) eGet(Ifc4Package.Literals.IFC_RESOURCE__RESOURCE_OF, true);\r\n\t}"
] | [
"protected function _init($definition=null)\n {\n\n if (!is_null($definition)) {\n $this->_packageXml = simplexml_load_string($definition);\n } else {\n $packageXmlStub = <<<END\n<?xml version=\"1.0\"?>\n<package>\n <name />\n <version />\n <stability />\n <license... | codesearchnet | {
"query": "Represent the Github sentence about Text generation:",
"pos": "Represent the Github code about Text generation:",
"neg": "Represent the Github code:"
} |
Get the discovered events and listeners for the application.
@return array | [
"protected function discoveredEvents()\n {\n if ($this->app->eventsAreCached()) {\n return require $this->app->getCachedEventsPath();\n }\n\n return $this->shouldDiscoverEvents()\n ? $this->discoverEvents()\n : [];\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 description about Software development:",
"pos": "Represent the code about Software development:",
"neg": "Represent the code about Programming:"
} |
Add element at an existing Markup
@param Tag|string $tag
@param array $attributes
@return Tag | [
"public function addElement($tag, array $attributes = [])\n {\n if ($tag instanceof self) {\n $htmlTag = $tag;\n $htmlTag->top = $this->top;\n $htmlTag->attrs($attributes);\n $this->elements->add($htmlTag);\n\n return $htmlTag;\n }\n\n ... | [
"protected function parseExpressionHtmlLine( Line$line ):self\n\t{\n\t\t$content= $line->slice(1);\n\n\t\treturn $this->openNode(new StringNode($this,$line))->appendLine(\"<?$content?>\");\n\t}"
] | codesearchnet | {
"query": "Represent the summarization about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code about programming:"
} |
<p>Create put CnvTfsHasId(Integer).</p>
@param pBeanName - bean name
@param pClass - bean class
@param pIdName - bean ID name
@return requested CnvTfsHasId(Integer)
@throws Exception - an exception | [
"protected final CnvTfsHasId<IHasId<Integer>, Integer>\n createHasIntegerIdConverter(final String pBeanName,\n final Class pClass, final String pIdName) throws Exception {\n CnvTfsHasId<IHasId<Integer>, Integer> convrt =\n new CnvTfsHasId<IHasId<Integer>, Integer>();\n convrt.setUtlReflection(get... | [
"@Override\n public List find(List<IndexClause> ixClause, EntityMetadata m, boolean isRelation, List<String> relations,\n int maxResult, List<String> columns) {\n throw new UnsupportedOperationException(\"Support available only for thrift/pelops.\");\n }"
] | codesearchnet | {
"query": "Represent the summarization about API documentation:",
"pos": "Represent the code about API documentation:",
"neg": "Represent the code about programming:"
} |
uses SharedDns to find an available set of DNS records and sets them on the deployment | [
"def setup_dns(domain)\n# TODO should we just use the ID instead of the full href?\n owner=@deployment.href\n @dns = SharedDns.new(domain)\n raise \"Unable to reserve DNS\" unless @dns.reserve_dns(owner)\n @dns.set_dns_inputs(@deployment)\n end"
] | [
"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 sentence:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code about programming:"
} |
Bank code. See <a
href="http://es.wikipedia.org/w/index.php?title=CLABE&oldid=71482742#C.C3.B3digo_de_Banco">this</a> for an
incomplete list as of December, 2013. | [
"public Card bankCode(final Integer bankCode) {\n if (bankCode == null) {\n this.bankCode = null;\n } else {\n this.bankCode = String.format(\"%03d\", bankCode);\n }\n return this;\n }"
] | [
"private function handleINFO()\n {\n header('Content-Type: text/html');\n\n $css = '\nbody {\n margin: 0px;\n padding: 10px;\n font-family: sans-serif;\n}\n#header {\n background-color: #339900;\n color: #FFFFFF;\n padding: 5px 10px;\n margin: -10px;\n}\nh1 {\n font-size: xx... | codesearchnet | {
"query": "Represent the Github comment:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
// isPathInPrefixList is a small function for CRIU restore to make sure
// mountpoints, which are on a tmpfs, are not created in the roofs | [
"func isPathInPrefixList(path string, prefix []string) bool {\n\tfor _, p := range prefix {\n\t\tif strings.HasPrefix(path, p+\"/\") {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\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:"
} |
Persists to disk the theme parameters currently stored in the Grav Config object
@param string $theme_name The name of the theme whose config it should store.
@return true | [
"public static function saveConfig($theme_name)\n {\n if (!$theme_name) {\n return false;\n }\n\n $grav = Grav::instance();\n $locator = $grav['locator'];\n $filename = 'config://themes/' . $theme_name . '.yaml';\n $file = YamlFile::instance($locator->findReso... | [
"public function getTemplateFile($filename, $data)\n {\n $data['getRegion'] = function($name) { \n return $this->getRegion($name); \n }; // This is for mustache compatibility\n\n // Push the data into regions and then pass a pointer to this class to the layout\n // $thi... | codesearchnet | {
"query": "Represent the Github post about Programming:",
"pos": "Represent the Github code about Programming:",
"neg": "Represent the Github code about Software development:"
} |
// IngressRules returns the port ranges opened for the whole environment.
// Must only be used if the environment was setup with the
// FwGlobal firewall mode. | [
"func (c *rackspaceFirewaller) IngressRules(ctx context.ProviderCallContext) ([]network.IngressRule, error) {\n\treturn nil, errors.NotSupportedf(\"Ports\")\n}"
] | [
"func getEnterpriseResourceIter(context structs.Context, _ *acl.ACL, namespace, prefix string, ws memdb.WatchSet, state *state.StateStore) (memdb.ResultIterator, error) {\n\t// If we have made it here then it is an error since we have exhausted all\n\t// open source contexts.\n\treturn nil, fmt.Errorf(\"context mus... | 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:"
} |
Execute the console command.
@return mixed | [
"public function handle()\n {\n $type = $this->option('type');\n\n if (! in_array($type, array('module', 'theme', 'package'))) {\n return $this->error('Invalid package type specified.');\n }\n\n $name = $this->argument('name');\n\n if (strpos($name, '/') > 0) {\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:"
} |
returns text content of HTTP GET response. | [
"def GET(self, url):\n \"\"\"\"\"\"\n r = requests.get(url)\n if self.verbose:\n sys.stdout.write(\"%s %s\\n\" % (r.status_code, r.encoding))\n sys.stdout.write(str(r.headers) + \"\\n\")\n self.encoding = r.encoding\n return r.text"
] | [
"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 description about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code:"
} |
Collects information about a pass P after P finishes running, eg, how much
time P took and what was its impact on code size.
@param passName short name of the pass
@param runtime execution time in milliseconds | [
"void recordPassStop(String passName, long runtime) {\n int allocMem = getAllocatedMegabytes();\n Stats logStats = this.currentPass.pop();\n checkState(passName.equals(logStats.pass));\n this.log.add(logStats);\n\n // Update fields that aren't related to code size\n logStats.runtime = runtime;\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 Github text about Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code:"
} |
Removes a User from all Channels from the ChannelList.
Returning a Set of Channels in which the User was. | [
"def remove_user(nick)\n @mutex.synchronize do\n channels = Set.new\n\n @channels.each do |channel|\n if channel.remove_user(nick)\n channels << channel\n end\n end\n\n channels\n end\n end"
] | [
"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 summarization about Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code about Software Development:"
} |
Clicks the wheel the specified number of steps in the given direction.
Use Mouse.WHEEL_DOWN, Mouse.WHEEL_UP | [
"def wheel(self, direction, steps):\n \n self._lock.acquire()\n if direction == 1:\n wheel_moved = steps\n elif direction == 0:\n wheel_moved = -1*steps\n else:\n raise ValueError(\"Expected direction to be 1 or 0\")\n self._lock.release()\n... | [
"protected void updateActionForInterimTarget(Action action) {\n // find an interim target position\n PointF scrollVector = computeScrollVectorForPosition(getTargetPosition());\n if (scrollVector == null || (scrollVector.x == 0 && scrollVector.y == 0)) {\n Log.e(TAG, \"To support smoo... | codesearchnet | {
"query": "Represent the Github comment:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
Access the today | [
"protected function getToday() {\n if (!$this->_today) {\n $this->_today = new TodayList($this->version, $this->solution['accountSid']);\n }\n\n return $this->_today;\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 comment:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
Ensure required zk node is present in zookeeper. | [
"@Synchronized\n @SneakyThrows(Exception.class)\n private void tryInit() {\n if (!zkInit) {\n // we are making remote calls under a lock but this is only done for initialization at \n // the start of controller process.\n ZKUtils.createPathIfNotExists(zkClient, zkPath, ... | [
"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:"
} |
Saves the result into cache.
@param mixed $result Result that should be saved.
@return bool
@throws \Webiny\Component\Rest\RestException | [
"public function saveCallbackResult($result)\n {\n // get cache key\n $cacheKey = $this->getCacheKey();\n\n // cache the result\n try {\n $cache = $this->cache($this->requestBag->getApiConfig()->get('Cache'));\n\n return $cache->save($cacheKey, $result, $this->re... | [
"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 summarization about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code about Software development:"
} |
Writes all results to one file for future splitting.
@param file_name [String] name of the local export file
@return [Integer] number of records to export. | [
"def write_csv(file_name, records)\n line_number = exporter.connection_adapter.write(local_file(file_name), records)\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 sentence about Software development:",
"pos": "Represent the code about Software development:",
"neg": "Represent the code:"
} |
This invokes the tranformation block if one is installed and queues the resulting CBL_Revision | [
"private void queueDownloadedRevision(RevisionInternal rev) {\n\n if (revisionBodyTransformationBlock != null) {\n // Add 'file' properties to attachments pointing to their bodies:\n\n for (Map.Entry<String, Map<String, Object>> entry : (\n (Map<String, Map<String, Ob... | [
"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:",
"pos": "Represent the code:",
"neg": "Represent the code about programming:"
} |
Buduje pole
@return string | [
"public function fetchField()\n {\n //wartości pola\n $values = is_array($this->getValue()) ? $this->getValue() : [$this->getValue()];\n $html = '<ul id=\"' . ($baseId = $this->getId()) . '-list\">';\n //filtr url\n $f = new \\Mmi\\Filter\\Url;\n foreach ($this->getMulti... | [
"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 text processing:",
"pos": "Represent the Github code about text processing:",
"neg": "Represent the Github code about programming:"
} |
Returns the module name, module package, and its' version
@param null $moduleName - provide the module name if you want to get the package specific information
@return array | [
"public function getModulesAndVersions($moduleName = null)\n {\n $tmpModules = [];\n $repos = $this->getComposer()->getRepositoryManager()->getLocalRepository();\n\n $composerFile = $_SERVER['DOCUMENT_ROOT'] . '/../vendor/composer/installed.json';\n $composer = (array) \\Zend\\Json\\J... | [
"function(request, modules_root, options){\n var [path, analysis] = normalize_path(request, modules_root, options.relative_path_root);\n var cache_path = path; // define cachepath as path to file with content. For modules, defines path to package.json\n if(analysis.is_a_module) cache_path = \"m... | codesearchnet | {
"query": "Represent the Github comment about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code:"
} |
Return plural name of model that uses this behavior.
@param Model $model Model using this behavior.
@param bool $toLowerCase If True, return the model name in lowercase.
@return string Return plural name of model that uses this behavior. | [
"public function getModelNamePlural(Model $model, $toLowerCase = false) {\n\t\t$modelName = $this->getModelName($model, $toLowerCase);\n\n\t\treturn Inflector::pluralize($modelName);\n\t}"
] | [
"protected function getAttribute($attribute)\n {\n // The developer may dynamically specify the array of custom attributes\n // on this Validator instance. If the attribute exists in this array\n // it takes precedence over all other ways we can pull attributes.\n if (isset($this->cus... | codesearchnet | {
"query": "Represent the Github comment about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about Programming:"
} |
@param $command
@throws RedisException | [
"protected function writeCommand($command)\r\n {\r\n // Reconnect on lost connection (Redis server \"timeout\" exceeded since last command)\r\n if (\\feof($this->redis)) {\r\n // If a watch or transaction was in progress and connection was lost, throw error rather than reconnect\r\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 summarization about PHP:",
"pos": "Represent the code about PHP:",
"neg": "Represent the code about programming:"
} |
数据库安全字段.
@param string $field
@return string | [
"public static function cleanField($field) {\n if ('*' == $field) {\n return $field;\n }\n $strings = explode('.', $field);\n $fields = [];\n foreach ($strings as $str) {\n $strs = preg_split('#\\bas\\b#i', $str);\n $fs = [];\n foreac... | [
"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 description about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code about Software Development:"
} |
// DescribeDiskMonitorData describes disk monitoring data
//
// You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/monitor&describediskmonitordata | [
"func (client *Client) DescribeDiskMonitorData(args *DescribeDiskMonitorDataArgs) (monitorData []DiskMonitorDataType, totalCount int, err error) {\n\tif args.Period == 0 {\n\t\targs.Period = 60\n\t}\n\tresponse := DescribeDiskMonitorDataResponse{}\n\terr = client.Invoke(\"DescribeDiskMonitorData\", args, &response)... | [
"def streamweigths_get(self, session):\n ''''''\n request = TOPRequest('taobao.wangwang.eservice.streamweigths.get')\n self.create(self.execute(request, session))\n return self.staff_stream_weights"
] | codesearchnet | {
"query": "Represent the Github comment:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
Saving show/hide delivery address state | [
"protected function _saveDeliveryAddressState()\n {\n $oSession = \\OxidEsales\\Eshop\\Core\\Registry::getSession();\n\n $blShow = \\OxidEsales\\Eshop\\Core\\Registry::getConfig()->getRequestParameter('blshowshipaddress');\n if (!isset($blShow)) {\n $blShow = $oSession->getVariabl... | [
"def isValidFieldProperty?( property )\r\n if @validFieldProperties.nil?\r\n @validFieldProperties = %w{ allow_new_choices allowHTML appears_by_default append_only\r\n blank_is_zero bold carrychoices comma_start cover_text currency_format currency_symbol\r\n decimal_places def... | codesearchnet | {
"query": "Represent the Github comment about Address:",
"pos": "Represent the Github code about Address:",
"neg": "Represent the Github code about programming:"
} |
// Set validates if needed the input value and adds it to the
// internal slice. | [
"func (opts *ListOpts) Set(value string) error {\n\tif opts.validator != nil {\n\t\tv, err := opts.validator(value)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tvalue = v\n\t}\n\t*opts.values = append(*opts.values, value)\n\treturn nil\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 Natural Language Processing:",
"pos": "Represent the Github code about Natural Language Processing:",
"neg": "Represent the Github code:"
} |
Pushes the artifact to git.remotes.
@param $identifier
@param $options
@return bool
@throws BltException | [
"protected function push($identifier, $options) {\n if ($options['dry-run']) {\n $this->logger->warning(\"Skipping push of deployment artifact. deploy.dryRun is set to true.\");\n return FALSE;\n }\n else {\n $this->say(\"Pushing artifact to git.remotes...\");\n }\n\n $task = $this->ta... | [
"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:"
} |
The length of the largest magic string + its offset | [
"def _max_lengths():\n \n max_header_length = max([len(x.byte_match) + x.offset\n for x in magic_header_array])\n max_footer_length = max([len(x.byte_match) + abs(x.offset)\n for x in magic_footer_array])\n return max_header_length, max_footer_leng... | [
"def rs_calc_syndromes(msg, nsym, fcr=0, generator=2):\n '''\n '''\n # Note the \"[0] +\" : we add a 0 coefficient for the lowest degree (the constant). This effectively shifts the syndrome, and will shift every computations depending on the syndromes (such as the errors locator polynomial, errors evaluato... | codesearchnet | {
"query": "Represent the post:",
"pos": "Represent the code:",
"neg": "Represent the code about Natural Language Processing:"
} |
Retrieves all of the assets of a given asset_type
Args:
asset_type: (str) Either None, PHONE, HANDLER, or URL
Returns: | [
"def assets(self, asset_type=None):\n \n if not self.can_update():\n self._tcex.handle_error(910, [self.type])\n\n if not asset_type:\n return self.tc_requests.adversary_assets(\n self.api_type, self.api_sub_type, self.unique_id\n )\n if as... | [
"public function getOptionsDescriptions()\n {\n return [\n self::OPTION_ENDPOINT_ROUTE => ['Internal use only: Route that was applied to resolve the Endpoint URI', []],\n self::OPTION_EXCHANGE_PATTERN => [\n 'Exchange pattern to communicate with this endpoint',\n ... | codesearchnet | {
"query": "Represent the text about storage:",
"pos": "Represent the code about storage:",
"neg": "Represent the code about programming:"
} |
设置子菜单
@param array $buttons
@return MenuItem | [
"public function buttons($buttons)\n {\n if ($buttons instanceof Closure) {\n $buttons = $buttons($this);\n }\n\n if (!is_array($buttons)) {\n exit('子菜单必须是数组或者匿名函数返回数组');\n }\n\n $this->with('sub_button', $buttons);\n\n return $this;\n }"
] | [
"public void addSharedFunctionByString(String content) {\r\n\t\t// content 中的内容被解析后会存放在 Env 之中,而 StringSource 所对应的\r\n\t\t// Template 对象 isModified() 始终返回 false,所以没有必要对其缓存\r\n\t\tStringSource stringSource = new StringSource(content, false);\r\n\t\tdoAddSharedFunction(stringSource, null);\r\n\t}"
] | codesearchnet | {
"query": "Represent the description about text processing:",
"pos": "Represent the code about text processing:",
"neg": "Represent the code:"
} |
Write integer attribute.
@param prefix the prefix
@param namespaceURI the namespace URI
@param localName the local name
@param value the value
@throws Exception the exception | [
"public void writeIntegerAttribute(String prefix, String namespaceURI, String localName, BigInteger value) throws Exception {\n\t\tthis.attribute(namespaceURI, localName, value.toString());\n\n\t}"
] | [
"private Object extendArray(Object array, int currentSize, int requiredSize) {\n if (requiredSize < currentSize) {\n return array;\n } else {\n Object newArray = null;\n int newSize = currentSize * 2;\n\n if (newSize <= requiredSize) {\n newSi... | codesearchnet | {
"query": "Represent the summarization about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code:"
} |
/* jscs: disable requireCamelCaseOrUpperCaseIdentifiers /* eslint-disable camelcase | [
"function Stats(dev, mode, nlink, uid, gid, rdev, blksize, ino, size, blocks, atim_msec, mtim_msec, ctim_msec, birthtim_msec, path) {\n /* jshint maxparams: 4 */\n if (arguments.length === 1 && typeof arguments[0] === 'object') {\n return Stats.create(arguments[0]);\n }\n if (... | [
"function hasJSDocThisTag(node, sourceCode) {\n const jsdocComment = sourceCode.getJSDocComment(node);\n\n if (jsdocComment && thisTagPattern.test(jsdocComment.value)) {\n return true;\n }\n\n // Checks `@this` in its leading comments for callbacks,\n // because callbacks don't have its JSDoc ... | codesearchnet | {
"query": "Represent the Github comment:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code about Programming:"
} |
// XXX_OneofFuncs is for the internal use of the proto package. | [
"func (*PlainExpectation) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {\n\treturn _PlainExpectation_OneofMarshaler, _PlainExpectation_OneofUnmarshaler, _PlainExpectation_Oneof... | [
"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 comment about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about Software development:"
} |
// OpenLockFile opens the named file with flags os.O_RDWR|os.O_CREATE and specified perm.
// If successful, function returns LockFile for opened file. | [
"func OpenLockFile(name string, perm os.FileMode) (lock *LockFile, err error) {\n\tvar file *os.File\n\tif file, err = os.OpenFile(name, os.O_RDWR|os.O_CREATE, perm); err == nil {\n\t\tlock = &LockFile{file}\n\t}\n\treturn\n}"
] | [
"func (op *DTGPIOModuleOpenPin) gpioDirection(dir string) error {\n\tif dir != \"in\" && dir != \"out\" {\n\t\treturn errors.New(\"direction must be in or out\")\n\t}\n\tf := op.gpioBaseName + \"/direction\"\n\te := WriteStringToFile(f, dir)\n\n\tmode := os.O_WRONLY | os.O_TRUNC\n\tif dir == \"in\" {\n\t\tmode = os... | codesearchnet | {
"query": "Represent the Github sentence about File management:",
"pos": "Represent the Github code about File management:",
"neg": "Represent the Github code:"
} |
Return a builder instance with the given behavior.
@param string $behavior
@return \Samrap\Acf\Fluent\Builder | [
"private function getBuilder($behavior)\n {\n // Create a new behavior of the given type if one does not yet exist.\n if (! isset($this->behaviors[$behavior])) {\n $this->behaviors[$behavior] = new $behavior();\n }\n\n return new Builder(new Runner($this->behaviors[$behavio... | [
"public function createUiComponent(\\n2n\\impl\\web\\ui\\view\\html\\HtmlView $view, \\rocket\\ei\\util\\Eiu $eiu) {\r\n\t\treturn $view->getHtmlBuilder()->getEsc($eiu->field()->getValue());\r\n\t}"
] | codesearchnet | {
"query": "Represent the post about Software development:",
"pos": "Represent the code about Software development:",
"neg": "Represent the code:"
} |
// SetEventArn sets the EventArn field's value. | [
"func (s *EventDetailsErrorItem) SetEventArn(v string) *EventDetailsErrorItem {\n\ts.EventArn = &v\n\treturn s\n}"
] | [
"function(apiClient) {\n this.apiClient = apiClient || Configuration.default.getDefaultApiClient() || ApiClient.instance;\n\n\n this.setApiClient = function(apiClient) {\n this.apiClient = apiClient;\n };\n\n this.getApiClient = function() {\n return this.apiClient;\n };\n\n\n /**\n ... | codesearchnet | {
"query": "Represent the description about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code about Software development:"
} |
Get renderer
@return Renderer | [
"public function getRenderer()\n {\n if (null === $this->renderer) {\n $this->setRenderer(new Renderer($this));\n }\n return $this->renderer;\n }"
] | [
"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:"
} |
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelectorRequirement. | [
"func (in *LabelSelectorRequirement) DeepCopy() *LabelSelectorRequirement {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(LabelSelectorRequirement)\n\tin.DeepCopyInto(out)\n\treturn out\n}"
] | [
"func (resource *Provenance) MarshalJSON() ([]byte, error) {\n\tresource.ResourceType = \"Provenance\"\n\t// Dereferencing the pointer to avoid infinite recursion.\n\t// Passing in plain old x (a pointer to Provenance), would cause this same\n\t// MarshallJSON function to be called again\n\treturn json.Marshal(*res... | codesearchnet | {
"query": "Represent the summarization about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code about programming:"
} |
Listen to the bootstrap event
@param EventInterface $e
@return array | [
"public function onBootstrap(EventInterface $e)\n {\n /** @var EventManagerInterface $eventManager */\n $eventManager = $e->getApplication()->getEventManager();\n $eventManager->attach(MvcEvent::EVENT_RENDER, function (MvcEvent $event) {\n /** @var HelperPluginManager $viewHelperM... | [
"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 Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code about programming:"
} |
subsequent processing of build sibling nodes | [
"function ($oneSibling, siblingCount, existingSibligCount) {\n var lines = '';\n for (var i = 0; i < existingSibligCount; i++) {\n lines += '<td class=\"leftLine topLine\"></td><td class=\"rightLine topLine\"></td>';\n }\n $oneSibling.parent().prevAll('tr:gt(0)').children().attr('colspan'... | [
"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:"
} |
Public: Initialize template with custom options.
options - Hash
cache_version - String custom cache version. Used to force a cache
change after code changes are made to Sass Functions. | [
"def call(input)\n context = input[:environment].context_class.new(input)\n\n engine_options = merge_options({\n filename: input[:filename],\n syntax: self.class.syntax,\n cache_store: build_cache_store(input, @cache_version),\n load_paths: context.environment.paths.map { |p| @... | [
"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:",
"pos": "Represent the code:",
"neg": "Represent the code about Software development:"
} |
put key
@param key
@return | [
"public boolean put(final int key) {\n\t\tif (isFull()) { // full\n\t\t\tresizeArray();\n\t\t}\n\t\tint slot = findSlotByKey(key);\n\t\tif (slot >= 0) {\n\t\t\tif (log.isDebugEnabled()) {\n\t\t\t\tlog.debug(\"key already exists: \" + key);\n\t\t\t}\n\t\t\treturn false; // key already exist\n\t\t}\n\t\tslot = ((-slo... | [
"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 comment about Programming:",
"pos": "Represent the Github code about Programming:",
"neg": "Represent the Github code about programming:"
} |
Encode this stream as a packed 16-bit unsigned integer.
Returns:
int: The packed encoded stream | [
"def encode(self):\n \n\n match_id = self.match_id\n if match_id is None:\n match_id = (1 << 11) - 1\n\n return (self.match_type << 12) | DataStreamSelector.SpecifierEncodings[self.match_spec] | match_id"
] | [
"def genKw(w,msk,z):\n \n # Hash inputs into a string of bytes\n b = hmac(msk, z + w, tag=\"TAG_PYTHIA_KW\")\n\n # Convert the string into a long value (no larger than the order of Gt),\n # then return a BigInt value.\n return BigInt(longFromString(b) % long(orderGt()))"
] | codesearchnet | {
"query": "Represent the Github description about Computer Science:",
"pos": "Represent the Github code about Computer Science:",
"neg": "Represent the Github code:"
} |
// GetEncodedSize implements the BlockServer interface for
// BlockServerDisk. | [
"func (b *BlockServerDisk) GetEncodedSize(\n\tctx context.Context, tlfID tlf.ID, id kbfsblock.ID,\n\tcontext kbfsblock.Context) (\n\tsize uint32, status keybase1.BlockStatus, err error) {\n\tif err := checkContext(ctx); err != nil {\n\t\treturn 0, 0, err\n\t}\n\n\tdefer func() {\n\t\terr = translateToBlockServerErr... | [
"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 summarization:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
Return the path for the calcpkg.log file - at the moment, only use a Linux path since I don't know where Windows thinks logs should go. | [
"def getLoggingLocation(self):\n\t\t\"\"\"\"\"\"\n\t\tif sys.platform == \"win32\":\n\t\t\tmodulePath = os.path.realpath(__file__)\n\t\t\tmodulePath = modulePath[:modulePath.rfind(\"/\")]\n\t\t\treturn modulePath\n\t\telse:\n\t\t\treturn \"/tmp\"\n\t\treturn \"\""
] | [
"def get_root_path(self, name):\n \n module = modules.get(name)\n if module is not None and hasattr(module, '__file__'):\n return dirname(abspath(module.__file__))\n\n # Flask keeps looking at this point. We instead set the root path to None,\n # assume that the user do... | codesearchnet | {
"query": "Represent the sentence about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code:"
} |
:returns: an RtreeFilter | [
"def rtree_filter(self):\n \n return RtreeFilter(self.src_filter.sitecol,\n self.oqparam.maximum_distance,\n self.src_filter.filename)"
] | [
"def property_(getter: Map[Domain, Range]) -> property:\n \n return property(map_(WeakKeyDictionary())(getter))"
] | codesearchnet | {
"query": "Represent the Github description about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code:"
} |
Create a (name, value) text multi-part field.
This return a part equivalent to <input type="text" /> field in multi part form.
@deprecated use {@link #text(String, String)} instead. | [
"@Deprecated\n public static Part<String> param(String name, String value) {\n return text(name, value);\n }"
] | [
"public List<Symbol> getSymbolList(final String param) {\n return get(param, new StringToSymbolList(\",\"),\n new AlwaysValid<List<Symbol>>(),\n \"comma-separated list of strings\");\n }"
] | codesearchnet | {
"query": "Represent the Github instruction about text processing:",
"pos": "Represent the Github code about text processing:",
"neg": "Represent the Github code about Documentation:"
} |
// ClientLookup satisfies the ClusterClient interface and returns the ha tls
// client certs. | [
"func (c *requestForwardingClusterClient) ClientLookup(ctx context.Context, requestInfo *tls.CertificateRequestInfo) (*tls.Certificate, error) {\n\tparsedCert := c.core.localClusterParsedCert.Load().(*x509.Certificate)\n\tif parsedCert == nil {\n\t\treturn nil, nil\n\t}\n\tcurrCert := c.core.localClusterCert.Load()... | [
"func (cip *cachedSelectorPolicy) Consume(owner policy.PolicyOwner, cache cache.IdentityCache) *policy.EndpointPolicy {\n\t// TODO: This currently computes the EndpointPolicy from SelectorPolicy\n\t// on-demand, however in future the cip is intended to cache the\n\t// EndpointPolicy for this Identity and emit datap... | codesearchnet | {
"query": "Represent the text about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code about Software development:"
} |
Return the world continents.
@author Erik Campobadal Fores <soc@erik.cat>
@copyright 2017 erik.cat
@return Collection | [
"public static function continents() : Collection\n {\n $file = __DIR__ . \"/../Assets/topojson/world-continents.json\";\n\n return Collection::make(\n json_decode(file_get_contents($file), true)['objects']['continent']['geometries']\n )->map(function ($continent) {\n r... | [
"def CrearPlantillaPDF(self, papel=\"A4\", orientacion=\"portrait\"):\n \"\"\n \n # genero el renderizador con propiedades del PDF\n t = Template(\n format=papel, orientation=orientacion,\n title=\"F 1116 B/C %s\" % (self.NroOrden),\n autho... | codesearchnet | {
"query": "Represent the Github comment:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
// Generate implements the CSRF interface | [
"func (c *cookieCsrf) Generate(w http.ResponseWriter, req *http.Request) string {\n\t// reuse the session cookie if we already have one\n\t// this makes us more tolerant of multiple clicks against the login page\n\tcookie, err := req.Cookie(c.name)\n\tif err == nil && len(cookie.Value) > 0 {\n\t\treturn cookie.Valu... | [
"@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 instruction about Natural Language Processing:",
"pos": "Represent the code about Natural Language Processing:",
"neg": "Represent the code about programming:"
} |
This function should build the model which takes the input variables
and return cost at the end | [
"def build_graph(self, image, label):\n \"\"\"\"\"\"\n\n # In tensorflow, inputs to convolution function are assumed to be\n # NHWC. Add a single channel here.\n image = tf.expand_dims(image, 3)\n\n image = image * 2 - 1 # center the pixels values at zero\n # The context ... | [
"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 sentence about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code:"
} |
Ends an Array
@return the structured reader
@throws IOException Something went wrong reading | [
"public JsonReader endArray() throws IOException {\n if (currentValue.getKey() != END_ARRAY) {\n throw new IOException(\"Expecting END_ARRAY, but found \" + jsonTokenToStructuredElement(null));\n }\n consume();\n return this;\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 sentence about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code:"
} |
The first found LoginDecarator, there can only be one.
@return the first found {@link SimplePageDecorator} | [
"public static SimplePageDecorator first(){\n List<SimplePageDecorator> decorators = all();\n return decorators.isEmpty() ? null : decorators.get(0);\n }"
] | [
"public File getExistingFile(final String param) {\n return get(param, getFileConverter(),\n new And<>(new FileExists(), new IsFile()),\n \"existing file\");\n }"
] | codesearchnet | {
"query": "Represent the Github description about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about File management:"
} |
Set element value
@param int $index
@param mixed $value
@return Vector | [
"public function set($index, $value) : Vector\n {\n $values = $this->_set($index, $value, true);\n $this->setValues($values);\n return $this;\n }"
] | [
"protected function parseExpressionHtmlLine( Line$line ):self\n\t{\n\t\t$content= $line->slice(1);\n\n\t\treturn $this->openNode(new StringNode($this,$line))->appendLine(\"<?$content?>\");\n\t}"
] | codesearchnet | {
"query": "Represent the summarization about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code about programming:"
} |
@return \Magento\Framework\View\Element\BlockInterface|object
@throws \Magento\Framework\Exception\LocalizedException | [
"public function _getDatafieldRenderer()\n {\n $this->datafieldRenderer = $this->getLayout()->createBlock(\n \\Dotdigitalgroup\\Email\\Block\\Adminhtml\\Config\\Select::class,\n '',\n ['data' => ['is_render_to_js_template' => true]]\n );\n\n return $this->dat... | [
"public function _construct()\n {\n $this->_init(\\Magento\\Cron\\Model\\Schedule::class, \\Magento\\Cron\\Model\\ResourceModel\\Schedule::class);\n }"
] | codesearchnet | {
"query": "Represent the sentence:",
"pos": "Represent the code:",
"neg": "Represent the code about Software development:"
} |
Unescapes the character identified by the character or characters that
immediately follow a backslash. The backslash '\' should have already
been read. This supports both unicode escapes "u000A" and two-character
escapes "\n". | [
"private char readEscapeCharacter() throws JSONException {\n char escaped = in.charAt(pos++);\n switch (escaped) {\n case 'u':\n if (pos + 4 > in.length()) {\n throw syntaxError(\"Unterminated escape sequence\");\n }\n String h... | [
"def t_QUOTED_STRING(t):\n '\n # TODO: Add support for:\n # - An undefined escape sequence (such as \"\\a\" in a context where \"a\"\n # has no special meaning) is interpreted as if there were no backslash\n # (in this case, \"\\a\" is just \"a\"), though that may be changed by\n # extensions.\n ... | codesearchnet | {
"query": "Represent the post:",
"pos": "Represent the code:",
"neg": "Represent the code about Regular expressions:"
} |
Checks if user is authenticated and calls GET_AUTH or performs logout.
Otherwise, returns the login template. | [
"def GET(self, *args, **kwargs):\n \n if self.user_manager.session_logged_in():\n if not self.user_manager.session_username() and not self.__class__.__name__ == \"ProfilePage\":\n raise web.seeother(\"/preferences/profile\")\n\n if not self.is_lti_page and self.use... | [
"@Route(method= HttpMethod.GET, uri=\"/{id}\")\n public Result get(@Parameter(\"id\") String id) {\n // The value of id is computed from the {id} url fragment.\n return ok(id);\n }"
] | codesearchnet | {
"query": "Represent the text:",
"pos": "Represent the code:",
"neg": "Represent the code about Programming:"
} |
Rewrites calls to msgId($msgVar) to either a static constant message id or a conditional if
there is a fallback. | [
"private void handleMsgIdCall(FunctionNode fn, MsgFallbackGroupNode msgNode) {\n ExprNode msgIdNode;\n long primaryMsgId = MsgUtils.computeMsgIdForDualFormat(msgNode.getChild(0));\n if (msgNode.numChildren() == 1) {\n // easy peasy\n msgIdNode = createMsgIdNode(primaryMsgId, fn.getSourceLocation(... | [
"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 about PHP programming:",
"pos": "Represent the code about PHP programming:",
"neg": "Represent the code about programming:"
} |
Returns a replacement instance after removing the specified key.
If not found, returns <tt>self</tt>.
If empty, returns <tt>nil</tt>. | [
"def find_and_delete(key)\n index = index_for(key)\n entry = @entries[index]\n if entry && entry[0].eql?(key)\n return delete_at(index)\n else\n child = @children[index]\n if child\n copy = child.find_and_delete(key)\n unless copy.equal?(child)\n ... | [
"function(json_data){\n bbop_rest_response.json.call(this, json_data);\n //console.log('_is_a', this._is_a);\n this._is_a = 'bbop-response-golr';\n //console.log('_is_a', this._is_a);\n\n // The setting of:\n // this._raw (as JSON)\n // this._raw_string (incoming arg)\n // this._okay (... | codesearchnet | {
"query": "Represent the Github description about Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code about Programming:"
} |
Returns a sequential unordered {@code IntStreamEx} of given length which
elements are equal to supplied value.
@param value the constant value
@param length the length of the stream
@return a new {@code IntStreamEx}
@since 0.1.2 | [
"public static IntStreamEx constant(int value, long length) {\n return of(new ConstSpliterator.OfInt(value, length, false));\n }"
] | [
"public static Matrix copy(Matrix m) {\n\t\tif (m==null) throw new NullPointerException();\n\t\tMatrix copy=createMatrix(m.getRowCount(), m.getColumnCount());\n\t\tfor (int row=0; row<m.getRowCount(); row++) for (int col=0; col<m.getColumnCount(); col++)\n\t\t\tcopy.set(row, col, m.getQuick(row, col));\n\t\treturn ... | codesearchnet | {
"query": "Represent the Github description:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code about programming:"
} |
Concatenates an arbitrary number of meshes.
Currently supports vertices, vertex colors, and faces. | [
"def concatenate(cls, *args):\n \n nargs = len(args)\n if nargs == 1:\n return args[0]\n\n vs = [a.v for a in args if a.v is not None]\n vcs = [a.vc for a in args if a.vc is not None]\n fs = [a.f for a in args if a.f is not None]\n\n if vs and len(vs) != n... | [
"def handle_dims(opts):\n '''\n \n '''\n use,res = [],[];\n if opts['--X']:\n use.append('x');\n res.append(int(opts['--xres']));\n if opts['--Y']:\n use.append('y');\n res.append(int(opts['--yres']));\n if opts['--Z']:\n use.append('z');\n res.append(i... | codesearchnet | {
"query": "Represent the Github comment about Computer Graphics:",
"pos": "Represent the Github code about Computer Graphics:",
"neg": "Represent the Github code:"
} |
Permet d'envoyer un mail via la fonction mail()
@access public
@param <void>
@return <bool> retour de mail() | [
"public function envoyer() {\r\n $this->setEntete();\r\n return mail($this->destinataire_email, $this->sujet, $this->message, $this->entete);\r\n }"
] | [
"def as_dict(self):\n \n opt_info = {}\n opt_info[\"type\"] = \"value\"\n opt_info[\"name\"] = self.name\n opt_info[\"value\"] = self.value\n opt_info[\"otype\"] = self.otype.as_dict()\n #TODO: est-ce que l'on ne met pas a plat et les attr de otype et ceux de l'optio... | codesearchnet | {
"query": "Represent the Github post:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code about AWS Route 53:"
} |
Attempt to register any unregistered extension namespaces. | [
"public void registerUnregisteredNamespaces()\n {\n for (int i = 0; i < m_unregisteredExtensions.size(); i++)\n {\n String ns = (String)m_unregisteredExtensions.get(i);\n ExtensionNamespaceSupport extNsSpt = defineJavaNamespace(ns);\n if (extNsSpt != null)\n m_extensions.add(extNsSpt);\... | [
"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 sentence:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
Randomize a sequence of integers. | [
"def sequence(minimum, maximum):\n \"\"\"\"\"\"\n function = 'sequences'\n opts = {'min': minimum,\n 'max': maximum,\n 'col': 1,\n 'format': 'plain',\n 'rnd': 'new'}\n deal = get_http(RANDOM_URL, function, opts)\n deal_arr = str_to_arr(deal)\n return dea... | [
"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:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
retrieves the primary type of the resources node; is using the 'getPrimaryType()' method
if the wrapped resource is a JcrResource. | [
"@Override\n public String getPrimaryType() {\n return resource instanceof JcrResource\n ? ((JcrResource) resource).getPrimaryType()\n : getProperty(JcrConstants.JCR_PRIMARYTYPE);\n }"
] | [
"public void removeLinks(ServiceReference<D> declarationSRef) {\n D declaration = getDeclaration(declarationSRef);\n for (ServiceReference serviceReference : declaration.getStatus().getServiceReferencesBounded()) {\n // FIXME : In case of multiples Linker, we will remove the link of all the... | codesearchnet | {
"query": "Represent the text about Software Development:",
"pos": "Represent the code about Software Development:",
"neg": "Represent the code:"
} |
@param CompilerPayload $payload
@return CompilerPayload | [
"public function compileLimit(CompilerPayload $payload)\n {\n $builder = $payload->getBuilder();\n\n if ($builder instanceof Clause\\LimitInterface && $builder->getLimitClause()) {\n $newSQL = 'LIMIT ' . $builder->getLimitClause();\n $payload = $payload->appendSQL($newSQL);\n ... | [
"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 Github post about Programming:",
"pos": "Represent the Github code about Programming:",
"neg": "Represent the Github code about Software development:"
} |
// PausePod pauses a pod | [
"func (c *HyperClient) PausePod(podID string) error {\n\t_, err := c.client.PodPause(c.ctx, &types.PodPauseRequest{\n\t\tPodID: podID,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\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 Github summarization about Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code:"
} |
If MathJax times out, discard the DOM and load a new one (get a fresh MathJax) | [
"function RestartMathJax() {\n if (timer) {\n MathJax.Hub.queue.queue = []; // clear MathJax queue, so pending operations won't fire\n MathJax = timer = window = document = html = content = null;\n ReportError(\"Timeout waiting for MathJax: restarting\");\n }\n serverState = STATE.STOPPED;\n GetWindo... | [
"function _doLaunchAfterServerReady(initialDoc) {\n // update status\n _setStatus(STATUS_CONNECTING);\n _createLiveDocumentForFrame(initialDoc);\n\n // start listening for requests\n _server.start();\n\n // Install a one-time event handler when connected to the launcher pag... | codesearchnet | {
"query": "Represent the Github post:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
Read file from disk. | [
"def read(self, location):\n \n location = os.path.expanduser(location)\n\n # Try to open this file, using different encodings.\n for e in ENCODINGS:\n try:\n with codecs.open(location, 'r', e) as f:\n return f.read(), e\n except Un... | [
"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 instruction about File management:",
"pos": "Represent the Github code about File management:",
"neg": "Represent the Github code about programming:"
} |
Removes all temporary files from disk.
IMPORTANT! Use this call only in the end
when you are sure you don't need report files anymore | [
"public void cleanup() {\n if (this.childStorages != null) {\n for (FileTempStorage storage : this.childStorages) {\n storage.cleanup();\n }\n }\n\n for (File file : this.files.values()) {\n FileUtils.deleteQuietly(file);\n }\n this.... | [
"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 post:",
"pos": "Represent the code:",
"neg": "Represent the code about programming:"
} |
// Reset resets current gl context.
// All sprites are also cleaned.
// This is called at changing of scene, and
// this function is for clean previous scene. | [
"func (glpeer *GLPeer) Reset() {\n\tsimlog.FuncIn()\n\n\tglpeer.mu.Lock()\n\tdefer glpeer.mu.Unlock()\n\tglpeer.initEng()\n\n\tsimlog.FuncOut()\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 comment:",
"pos": "Represent the code:",
"neg": "Represent the code about programming:"
} |
Odpojení od FlexiBee. | [
"public function disconnect()\n {\n if (is_resource($this->curl)) {\n curl_close($this->curl);\n }\n $this->curl = null;\n }"
] | [
"public function settleCreditNote($invoice, $payment)\n {\n $success = 0;\n $prijataCastka = (float) $payment->getDataValue('sumCelkem');\n\n if ($prijataCastka < $invoice->getDataValue('zbyvaUhradit')) { //Castecna uhrada\n $this->addStatusMessages(sprinf(_('Castecna uhrada... | codesearchnet | {
"query": "Represent the Github text:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
// CopyObjectPartHandler - uploads a part by copying data from an existing object as data source. | [
"func (api objectAPIHandlers) CopyObjectPartHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := newContext(r, w, \"CopyObjectPart\")\n\n\tdefer logger.AuditLog(w, r, \"CopyObjectPart\", mustGetClaimsFromToken(r))\n\n\tobjectAPI := api.ObjectAPI()\n\tif objectAPI == nil {\n\t\twriteErrorResponse(ctx, w, erro... | [
"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 description about AWS S3:",
"pos": "Represent the Github code about AWS S3:",
"neg": "Represent the Github code about AWS S3:"
} |
Render the view.
@return void | [
"public function render()\n {\n switch ($this->type) {\n case \"file\":\n if (!is_readable($this->template)) {\n throw new \\Exception(\"Could not find template file: \" . $this->template);\n }\n\n extract($this->templateData);\n ... | [
"def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_"
] | codesearchnet | {
"query": "Represent the Github comment about Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code:"
} |
Generate a compact element for an atom, such as a circle or a square,
rather than text element.
@param atom the atom to generate the compact element for
@param model the renderer model
@return a compact rendering element | [
"public IRenderingElement generateCompactElement(IAtom atom, RendererModel model) {\n Point2d point = atom.getPoint2d();\n double radius = (Double) model.get(AtomRadius.class) / model.getParameter(Scale.class).getValue();\n double distance = 2 * radius;\n if (model.get(CompactShape.class... | [
"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 sentence about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code about programming:"
} |
Handles action on collection details page
@param \Symfony\Component\HttpFoundation\Request $request
@return \Symfony\Component\HttpFoundation\RedirectResponse | [
"public function handleCollectionAction(Request $request)\n {\n $this->denyAccessUnlessGranted('ez:infocollector:read');\n\n $collectionId = $request->request->get('CollectionId');\n $contentId = $request->request->get('ContentId');\n $fields = $request->request->get('FieldId', []);\n... | [
"public function addContent(string $content): \\Symfony\\Component\\HttpFoundation\\Response\n {\n return $this->setContent($this->getContent() . $content);\n }"
] | codesearchnet | {
"query": "Represent the Github comment about Symfony:",
"pos": "Represent the Github code about Symfony:",
"neg": "Represent the Github code:"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.