query stringlengths 16 255 | pos list | neg list | task stringclasses 1
value | instruction dict |
|---|---|---|---|---|
Create default config file | [
"def create(ctx):\n \n import shutil\n\n this_dir, this_filename = os.path.split(__file__)\n default_config_file = os.path.join(this_dir, \"apis/example-config.yaml\")\n config_file = ctx.obj[\"configfile\"]\n shutil.copyfile(default_config_file, config_file)\n print_message(\"Config file creat... | [
"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 sentence about Software Development:",
"pos": "Represent the Github code about Software Development:",
"neg": "Represent the Github code:"
} |
Throw file upload error, return true if error has been thrown, false if error has been catched
@param int $number
@param string $text
@access public | [
"public function throwError($number, $text = false, $exit = true)\n {\n if ($this->_catchAllErrors || in_array($number, $this->_skipErrorsArray)) {\n return false;\n }\n\n switch ($number)\n {\n case CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST:\n case CKF... | [
"public function shutdown()\n {\n\n // query whether or not, class has been shutdown by an unhandled error\n if ($lastError = error_get_last()) {\n // add the passed error information to the array with the errors\n $error = ErrorUtil::singleton()->fromArray($lastError);\n ... | codesearchnet | {
"query": "Represent the comment about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code about Software development:"
} |
Updates the error box with the form data, result or error objects
@param \Zepi\Web\UserInterface\Form\Form $form
@param boolean|string $result
@param array $errors | [
"public function updateErrorBox($form, $result, $errors)\n {\n if (($form->isSubmitted() && $result !== true) || count($errors) > 0) {\n if (is_string($result)) {\n $this->addError(new Error(\n Error::GENERAL_ERROR,\n $result\n ... | [
"public function seeRequiredFieldtOfType($label)\n {\n if ($this->platformStatus == self::WAITING_FOR_PUBLISHING) {\n $fieldManager = $this->getFieldTypeManager();\n // $type = ...\n //$name = $fieldManager->getThisFieldTypeName();\n\n $verification = new WebAss... | codesearchnet | {
"query": "Represent the Github instruction about Programming:",
"pos": "Represent the Github code about Programming:",
"neg": "Represent the Github code:"
} |
Give a nice representation of tables in notebooks. | [
"def _repr_html_(self):\n \"\"\"\"\"\"\n out = \"<table class='taqltable' style='overflow-x:auto'>\\n\"\n\n # Print column names (not if they are all auto-generated)\n if not(all([colname[:4] == \"Col_\" for colname in self.colnames()])):\n out += \"<tr>\"\n for col... | [
"def surface(self, canvas, X, Y, Z, color=None, label=None, **kwargs):\n \n raise NotImplementedError(\"Implement all plot functions in AbstractPlottingLibrary in order to use your own plotting library\")"
] | codesearchnet | {
"query": "Represent the Github instruction:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
Calls a callback by looping over cluster workers
@method worketIterator
@param {Function} callback
@return {void} | [
"function workerIterator (callback) {\n Object.keys(cluster.workers).forEach((index) => callback(cluster.workers[index]))\n}"
] | [
"def map(self, fn: Callable[[Any], Any]) -> 'Cont':\n \n \"\"\"\n return Cont(lambda c: self.run(compose(c, fn)))"
] | codesearchnet | {
"query": "Represent the Github post about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code:"
} |
Register a new error code | [
"def register_error_code(code, exception_type, domain='core'):\n \"\"\"\"\"\"\n Logger._error_code_to_exception[code] = (exception_type, domain)\n Logger._domain_codes[domain].add(code)"
] | [
"func New(*SmartSampleConfig, log.Logger, dtsink) (*SmartSampler, error) {\n\treturn nil, errors.New(\"you are attempting to configure a regular SignalFx Gateway with the config of a Smart Gateway. This is an unsupported configuration\")\n}"
] | codesearchnet | {
"query": "Represent the Github text about Natural Language Processing:",
"pos": "Represent the Github code about Natural Language Processing:",
"neg": "Represent the Github code about programming:"
} |
Return zstack as a :class:`numpy.ndarray`.
:param s: series
:param c: channel
:param t: timepoint
:returns: zstack as a :class:`numpy.ndarray` | [
"def zstack_array(self, s=0, c=0, t=0):\n \n return np.dstack([x.image for x in self.zstack_proxy_iterator(s=s, c=c, t=t)])"
] | [
"def resolution(self, values):\n \n values = np.asanyarray(values, dtype=np.int64)\n if values.shape != (2,):\n raise ValueError('resolution must be (2,) float')\n # assign passed values to focal length\n self._resolution = values"
] | codesearchnet | {
"query": "Represent the description:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
// executeBulkSetRowAttrs executes a set of SetRowAttrs() calls. | [
"func (e *executor) executeBulkSetRowAttrs(ctx context.Context, index string, calls []*pql.Call, opt *execOptions) ([]interface{}, error) {\n\tspan, ctx := tracing.StartSpanFromContext(ctx, \"Executor.executeBulkSetRowAttrs\")\n\tdefer span.Finish()\n\n\t// Collect attributes by field/id.\n\tm := make(map[string]ma... | [
"@Override\n public List findByRange(byte[] muinVal, byte[] maxVal, EntityMetadata m, boolean isWrapReq, List<String> relations,\n List<String> columns, List<IndexExpression> conditions, int maxResults) throws Exception {\n throw new UnsupportedOperationException(\"Support available only for thrift... | codesearchnet | {
"query": "Represent the instruction about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code about programming:"
} |
// CreateCSR returns a CSR to sign the given service along with the PEM-encoded
// private key for this certificate. | [
"func CreateCSR(uri CertURI, privateKey crypto.Signer, extensions ...pkix.Extension) (string, error) {\n\ttemplate := &x509.CertificateRequest{\n\t\tURIs: []*url.URL{uri.URI()},\n\t\tSignatureAlgorithm: x509.ECDSAWithSHA256,\n\t\tExtraExtensions: extensions,\n\t}\n\n\t// Create the CSR itself\n\tva... | [
"def verify(build)\n # TODO might as well cache this and store in the db so we dont have to\n # convert every time\n pkey = to_rsa_pkey\n signature = Base64.decode64(build.signature)\n digest = OpenSSL::Digest::SHA256.new\n\n # If the user submits html were going to expect the\n #... | codesearchnet | {
"query": "Represent the instruction:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
Checks if a key exists.
@param string|array $key
@return bool | [
"public function exists($key)\n {\n $placeholder = new stdClass;\n\n return ! collect(is_array($key) ? $key : func_get_args())->contains(function ($key) use ($placeholder) {\n return $this->get($key, $placeholder) === $placeholder;\n });\n }"
] | [
"public function setMustPass($ref)\n {\n if (null!==$this->getMask($ref)) {\n $this->must_pass = $ref;\n } else {\n throw new \\Exception(sprintf(\"Unknown standard [%s] in Hostname validation!\", $ref));\n }\n }"
] | codesearchnet | {
"query": "Represent the Github instruction about Software Development:",
"pos": "Represent the Github code about Software Development:",
"neg": "Represent the Github code about Software development:"
} |
Returns all <code>constraint</code> elements
@return list of <code>constraint</code> | [
"public List<ConstraintType<ParameterType<T>>> getAllConstraint()\n {\n List<ConstraintType<ParameterType<T>>> list = new ArrayList<ConstraintType<ParameterType<T>>>();\n List<Node> nodeList = childNode.get(\"constraint\");\n for(Node node: nodeList)\n {\n ConstraintType<ParameterType<... | [
"def setTargets(self, targets):\n \n if not self.verifyArguments(targets) and not self.patterned:\n raise NetworkError('setTargets() requires [[...],[...],...] or [{\"layerName\": [...]}, ...].', targets)\n self.targets = targets"
] | codesearchnet | {
"query": "Represent the description about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code:"
} |
Saves a BMP image
This function has been published on the PHP website, and can be used freely
@access public | [
"function imagebmp(&$im, $filename = \"\") {\n\n if (!$im) return false;\n $w = imagesx($im);\n $h = imagesy($im);\n $result = '';\n\n // if the image is not true color, we convert it first\n if (!imageistruecolor($im)) {\n $tmp = imagecreatetruecolor($w, $h);\n ... | [
"function getBanner (packagePath) {\n // Read package.json\n const pkg = require(packagePath)\n const { name, version, license } = pkg\n\n // Remove '#readme' from the URL\n const url = pkg.homepage.replace(/#.*$/, '')\n\n // Print an always-showing banner (with a !), this way it'll show up\n // in minified ... | codesearchnet | {
"query": "Represent the summarization:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
InternalXbaseWithAnnotations.g:6322:1: entryRuleJvmWildcardTypeReference returns [EObject current=null] : iv_ruleJvmWildcardTypeReference= ruleJvmWildcardTypeReference EOF ; | [
"public final EObject entryRuleJvmWildcardTypeReference() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleJvmWildcardTypeReference = null;\n\n\n try {\n // InternalXbaseWithAnnotations.g:6322:65: (iv_ruleJvmWildcardTypeReference= ruleJvmWildcardTypeReferenc... | [
"@Override\n public Object visitContextReference(ExcellentParser.ContextReferenceContext ctx) {\n String identifier = ctx.NAME().getText();\n return m_evalContext.resolveVariable(identifier);\n }"
] | codesearchnet | {
"query": "Represent the Github instruction about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code:"
} |
// SetName sets the Name field's value. | [
"func (s *SecurityConfiguration) SetName(v string) *SecurityConfiguration {\n\ts.Name = &v\n\treturn s\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:"
} |
Send a CTCP request to the given target. | [
"def ctcp(self, target, ctcp_verb, argument=None):\n \"\"\"\"\"\"\n # we don't support complex ctcp encapsulation because we're somewhat sane\n atoms = [ctcp_verb]\n if argument is not None:\n atoms.append(argument)\n X_DELIM = '\\x01'\n self.msg(target, X_DELIM ... | [
"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 comment about Computer Science:",
"pos": "Represent the Github code about Computer Science:",
"neg": "Represent the Github code about programming:"
} |
This method was created in VisualAge.
@return com.ibm.websphere.jsp.QueryResults | [
"public QueryResults execute() throws JspCoreException, SQLException {\n\n Connection conn = null;\n Statement stmt = null;\n ResultSet rs = null;\n ;\n QueryResults qs = null;\n // verify all parameters\n verify();\n\n // invoke the compute method of QueryRes... | [
"protected InvokerExtensionProcessor getInvokerExtensionProcessor(com.ibm.ws.webcontainer.webapp.WebApp app)\n {\n return new com.ibm.ws.webcontainer.osgi.extension.InvokerExtensionProcessor(app, config.getInvokerAttributes());\n }"
] | codesearchnet | {
"query": "Represent the comment about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code about programming:"
} |
List enrolled courses.
@return: List of enrolled courses.
@rtype: [str] | [
"def list_courses(self):\n \n course = CourseraOnDemand(session=self._session,\n course_id=None,\n course_name=None)\n return course.list_courses()"
] | [
"def QA_fetch_index_list_adv(collections=DATABASE.index_list):\n '''\n \n '''\n index_list_items = QA_fetch_index_list(collections)\n if len(index_list_items) == 0:\n print(\"QA Error QA_fetch_index_list_adv call item for item in collections.find() return 0 item, maybe the DATABASE.index_list ... | codesearchnet | {
"query": "Represent the instruction about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code about programming:"
} |
The includes() method determines whether one string may be found within another string,
returning true or false as appropriate.
@param string $searchString
@param int $position
@return bool | [
"public function includes($searchString, $position = 0)\n {\n if ($position + strlen($searchString) > $this->length()) {\n return false;\n }\n\n return $this->indexOf($searchString, $position) !== -1;\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 programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code about programming:"
} |
Find synonyms of a word
:param word: a word or a vector representation of word
:param num: number of synonyms to find
:return: array of (word, cosineSimilarity)
.. note:: Local use only | [
"def findSynonyms(self, word, num):\n \n if not isinstance(word, basestring):\n word = _convert_to_vector(word)\n words, similarity = self.call(\"findSynonyms\", word, num)\n return zip(words, similarity)"
] | [
"def classify(self, term, **kwargs):\n \n term = self._normalize(term)\n if dict.__contains__(self, term):\n return self[term][0].keys()[-1]\n # If the term is not in the dictionary, check the classifiers.\n # Returns the first term in the list returned by a classifier.... | codesearchnet | {
"query": "Represent the comment about Natural Language Processing:",
"pos": "Represent the code about Natural Language Processing:",
"neg": "Represent the code about programming:"
} |
Adds a plugin to the additional if this hasn't happened already | [
"@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n protected void registerDependency(List additionalList, GrailsPlugin plugin) {\n if (!addedNames.contains(plugin.getName())) {\n addedNames.add(plugin.getName());\n additionalList.add(plugin);\n addPluginDependencies(addit... | [
"def platform\n # If you are declaring a new platform, you will need to tell\n # Train a bit about it.\n # If you were defining a cloud API, you should say you are a member\n # of the cloud family.\n\n # This plugin makes up a new platform. Train (or rather InSpec) only\n # know how t... | codesearchnet | {
"query": "Represent the sentence:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
Render PhantomJS script template
@param $filePath
@return string | [
"private function renderTemplate($filePath)\n {\n return $this->render(array(\n 'url' => $this->url,\n 'width' => $this->width,\n 'height' => $this->height,\n 'fullPage' => $this->fullPage,\n 'timeout' => $this->timeout * 1000, // convert into millise... | [
"def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_"
] | codesearchnet | {
"query": "Represent the Github text:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
// loadAliass loads from the file pointed to by shared credentials filename for alias.
// The credentials retrieved from the alias will be returned or error. Error will be
// returned if it fails to read from the file. | [
"func loadAlias(filename, alias string) (hostConfig, error) {\n\tcfg := &config{}\n\tconfigBytes, err := ioutil.ReadFile(filename)\n\tif err != nil {\n\t\treturn hostConfig{}, err\n\t}\n\tif err = json.Unmarshal(configBytes, cfg); err != nil {\n\t\treturn hostConfig{}, err\n\t}\n\treturn cfg.Hosts[alias], nil\n}"
] | [
"def set_schema(self, schema_name, include_public=True):\n \n self.tenant = FakeTenant(schema_name=schema_name)\n self.schema_name = schema_name\n self.include_public_schema = include_public\n self.set_settings_schema(schema_name)\n self.search_path_set = False\n # C... | codesearchnet | {
"query": "Represent the Github text about Software Development:",
"pos": "Represent the Github code about Software Development:",
"neg": "Represent the Github code:"
} |
Marshall the given parameter object. | [
"public void marshall(TerminologyData terminologyData, ProtocolMarshaller protocolMarshaller) {\n\n if (terminologyData == null) {\n throw new SdkClientException(\"Invalid argument passed to marshall(...)\");\n }\n\n try {\n protocolMarshaller.marshall(terminologyData.getF... | [
"def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p"
] | codesearchnet | {
"query": "Represent the Github comment about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code:"
} |
// DeleteSIMRouteAt SIMルート削除 | [
"func (m *MobileGatewaySIMRoutes) DeleteSIMRouteAt(index int) bool {\n\tif m.SIMRoutes == nil {\n\t\treturn false\n\t}\n\n\tif index < len(m.SIMRoutes) {\n\t\ts := m.SIMRoutes[index]\n\t\tif simID, err := strconv.ParseInt(s.ResourceID, 10, 64); err == nil {\n\t\t\treturn m.DeleteSIMRoute(simID, s.Prefix)\n\t\t}\n\t... | [
"func (m *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\t// NOTE ucon内部のルーティングは一元的にこの関数から行う\n\t// Handlerを細分化しhttp.ServeMuxに登録すると、OPTIONSのhandleがうまくできなくなる\n\t// このため、Handlerはucon全体で1つとし、OPTIONSも通常のMethodと同じようにHandlerを設定し利用する\n\t// OPTIONSを適切にhandleするため、全てのHandlerに特殊なHookを入れるよりマシである\n\n\tm.router.S... | codesearchnet | {
"query": "Represent the instruction:",
"pos": "Represent the code:",
"neg": "Represent the code about Software development:"
} |
Instance depends on the API version:
* 2018-08-01: :class:`ExpressRouteGatewaysOperations<azure.mgmt.network.v2018_08_01.operations.ExpressRouteGatewaysOperations>` | [
"def express_route_gateways(self):\n \n api_version = self._get_api_version('express_route_gateways')\n if api_version == '2018-08-01':\n from .v2018_08_01.operations import ExpressRouteGatewaysOperations as OperationClass\n else:\n raise NotImplementedError(\"APIVe... | [
"def create(self, networkipv6s):\n \n\n data = {'networks': networkipv6s}\n return super(ApiNetworkIPv6, self).post('api/v3/networkv6/', data)"
] | codesearchnet | {
"query": "Represent the Github instruction:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code about programming:"
} |
Parse a response into a response type
@static
@param string $data Response data to be parsed
@param string $type = 'xml' Response format
@return mixed Response object | [
"public static function response($data, $type = self::FORMAT_XML)\n {\n if (is_string($data) && strlen($data) === 0) {\n return true; // Many operations return an empty string for success\n }\n switch ($type) {\n case static::FORMAT_XML:\n return Abstract... | [
"def processRequest(cls, ps, **kw):\n \n resource = kw['resource']\n method = resource.getOperation(ps, None) # This getOperation method is valid for ServiceSOAPBinding subclass\n rsp = method(ps, **kw)[1] # return (request, response) but we only need response\n return rsp"
] | codesearchnet | {
"query": "Represent the post about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code about Computer Science:"
} |
@param FeatureNode $featureNode
@param ScenarioInterface $scenarioNode
@return string | [
"public function generateFileName(FeatureNode $featureNode, ScenarioInterface $scenarioNode)\n {\n $feature = $this->relativizePaths($featureNode->getFile());\n $line = $scenarioNode->getLine();\n $fileName = join('_', [$feature, $line]);\n return preg_replace('/[^A-Za-z0-9\\-]/', '_'... | [
"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 Github sentence about Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code about Software development:"
} |
触发事件
@param {String} evt 事件类型
@param {[type]} data 事件数据
@return {[type]} this | [
"function(evt, data) {\n\t\t\tvar list = this.list[evt];\n\t\t\tif(!list) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tlist.state = 1; //标注为可以fire\n\t\t\tlist.data = data || '';\n\t\t\tvar handlers = list.handlers;\n\t\t\thandlers = this._findCanCallbacks(handlers);\n\t\t\twhile(handlers[0]) {\n\t\t\t\tvar cb = handlers... | [
"function hot(backendTplServer) {\n backendTplServer.app.get('/news/hot', function(request, response) {\n var data = Mock.mock({\n 'news|0-10': [news]\n });\n\n // 如果对象中有方法的定义, 最好不要放在 Mock.mock 中, 因为他会将方法定义变成直接的属性值(方法的返回值)\n data.__helper = __helper;\n\n response.ren... | codesearchnet | {
"query": "Represent the Github description about text processing:",
"pos": "Represent the Github code about text processing:",
"neg": "Represent the Github code:"
} |
Check to see if the ISO county of the IP is blocked
@param string $ip This should be the IP you are checking if it is blocked
@return boolean If the IP country is blocked will return true else returns false | [
"public function isISOBlocked($ip){\n return $this->db->select($this->getBlockedISOTable(), ['iso' => $this->getIPCountryISO($ip)]);\n }"
] | [
"public function validate( $input )\n {\n // Check if passed input is an object and instance of phpillowDocument\n // at all, otherwise we can exit immediately\n if ( !is_object( $input ) ||\n !( $input instanceof phpillowDocument ) )\n {\n throw new phpillowVal... | codesearchnet | {
"query": "Represent the Github instruction about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about PHP programming:"
} |
Returns the custom image associated with a given app. If there are
multiple candidate images on disk, one is chosen arbitrarily. | [
"def get_custom_image(user_context, app_id):\n \"\"\"\"\"\"\n possible_paths = _valid_custom_image_paths(user_context, app_id)\n existing_images = filter(os.path.exists, possible_paths)\n if len(existing_images) > 0:\n return existing_images[0]"
] | [
"def resolveEntryPoint(entryPoint):\n \n if inVirtualEnv():\n path = os.path.join(os.path.dirname(sys.executable), entryPoint)\n # Inside a virtualenv we try to use absolute paths to the entrypoints.\n if os.path.isfile(path):\n # If the entrypoint is present, Toil must have be... | codesearchnet | {
"query": "Represent the Github text about storage:",
"pos": "Represent the Github code about storage:",
"neg": "Represent the Github code about Software development:"
} |
/*
Initiates a connection to a Coinfloor API server and returns the new
WebSocket object. A websocket URL may be given to override the default.
If a callback function is provided, it will be invoked after the
connection is established. | [
"function (url, callback) {\n\t\tif (_websocket) {\n\t\t\t_websocket.close();\n\t\t\t_websocket = null;\n\t\t}\n\t\tvar ws = _websocket = new WebSocket(url || DEFAULT_URL);\n\t\tws.onopen = function (event) {\n\t\t\ttrigger(\"open\", event);\n\t\t};\n\t\tws.onerror = function (event) {\n\t\t\ttrigger(\"error\", eve... | [
"function createConnection() {\n\n // create the internal socket object\n var server = new Socket()\n , client = new Socket();\n\n // pair the sockets\n client.pair = server;\n server.pair = client;\n\n // register the server side so it is wrapped\n // in a connection and stored as an active connection\n ... | codesearchnet | {
"query": "Represent the Github summarization:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code about Computer Science:"
} |
Initialize layer structure. | [
"def _init(self):\n \"\"\"\"\"\"\n group_stack = [self]\n clip_stack = []\n last_layer = None\n\n for record, channels in self._record._iter_layers():\n current_group = group_stack[-1]\n\n blocks = record.tagged_blocks\n end_of_group = False\n ... | [
"def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_"
] | codesearchnet | {
"query": "Represent the Github comment:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
Return a service extension map from the given service providers.
@param array $providers
@return array | [
"private function serviceExtensionMap(array $providers): array\n {\n $wrap = function ($factory) { return [$factory]; };\n\n return array_reduce($providers, function ($extensions, ServiceProviderInterface $provider) use ($wrap) {\n\n return array_merge_recursive($extensions, array_map($w... | [
"@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 sentence about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about Programming:"
} |
Entry point to run the search utility
@param args Command line arguments
@throws Exception If something goes wrong | [
"public static void main(String[] args) throws Exception {\n ArgP argp = new ArgP();\n CliOptions.addCommon(argp);\n argp.addOption(\"--use-data-table\",\n \"Scan against the raw data table instead of the meta data table.\");\n args = CliOptions.parse(argp, args);\n if (args == null) {\n ... | [
"def get_app(self):\n \n # First see to connection stack\n ctx = connection_stack.top\n if ctx is not None:\n return ctx.app\n\n # Next return app from instance cache\n if self.app is not None:\n return self.app\n\n # Something went wrong, in mo... | codesearchnet | {
"query": "Represent the post about Software development:",
"pos": "Represent the code about Software development:",
"neg": "Represent the code:"
} |
Marshall the given parameter object. | [
"public void marshall(DescribeChannelRequest describeChannelRequest, ProtocolMarshaller protocolMarshaller) {\n\n if (describeChannelRequest == null) {\n throw new SdkClientException(\"Invalid argument passed to marshall(...)\");\n }\n\n try {\n protocolMarshaller.marshall... | [
"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 about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code:"
} |
// Put adds x to the pool. | [
"func (p *Pool) Put(x interface{}) {\n\tif x == nil {\n\t\treturn\n\t}\n\tp.store = append(p.store, x)\n}"
] | [
"public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }"
] | codesearchnet | {
"query": "Represent the text about Computer Science:",
"pos": "Represent the code about Computer Science:",
"neg": "Represent the code about programming:"
} |
Return the value and optionally derivative and second order derivative | [
"def results(self):\n \"\"\"\"\"\"\n if self.deriv == 0:\n return self.v,\n if self.deriv == 1:\n return self.v, self.d\n if self.deriv == 2:\n return self.v, self.d, self.dd"
] | [
"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 description:",
"pos": "Represent the code:",
"neg": "Represent the code about Natural Language Processing:"
} |
判断指定数组名称是否是java八大基本类型(int[]、short[]等,不包含对应的封装类型)
@param clazz 指定数组名称
@return 如果是基本类型则返回<code>true</code>
@throws NullPointerException 当传入Class对象为空时抛出该异常 | [
"public static boolean isGeneralArrayType(Class<?> clazz) throws NullPointerException {\n Assert.notNull(clazz, \"clazz不能为null\");\n String name = clazz.getName();\n return isGeneralArrayType(name);\n }"
] | [
"public Select parseSelect(MySqlSelectQueryBlock query) throws SqlParseException {\n\n Select select = new Select();\n /*zhongshu-comment SqlParser类没有成员变量,里面全是方法,所以将this传到WhereParser对象时是无状态的,\n 即SqlParser对象并没有给WhereParser传递任何属性,也不存在WhereParser修改SqlParser的成员变量值这一说\n ... | codesearchnet | {
"query": "Represent the Github description about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about programming:"
} |
Adds a data type definition.
@param string $typeName Name of the type.
@param string $typeClass The class to use.
@param string $classpath The classpath to use. | [
"public function addDataTypeDefinition($typeName, $typeClass, $classpath = null)\n {\n ComponentHelper::getComponentHelper($this)->addDataTypeDefinition($typeName, $typeClass, $classpath);\n }"
] | [
"public function initializeArguments()\n {\n $this->registerArgument('path', 'string', 'Location of the resource, can be either a path relative to the Public resource directory of the package or a resource://... URI', false, null);\n $this->registerArgument('package', 'string', 'Target package key.... | codesearchnet | {
"query": "Represent the Github text about Programming:",
"pos": "Represent the Github code about Programming:",
"neg": "Represent the Github code about programming:"
} |
// logRequest logs the body of the request. | [
"func (r *MintOAuthTokenGrantRPC) logRequest(c context.Context, req *minter.MintOAuthTokenGrantRequest, caller identity.Identity) {\n\tif !logging.IsLogging(c, logging.Debug) {\n\t\treturn\n\t}\n\tm := jsonpb.Marshaler{Indent: \" \"}\n\tdump, _ := m.MarshalToString(req)\n\tlogging.Debugf(c, \"Identity: %s\", calle... | [
"function execute(exec, req, res) {\n\n // start timing slow logs before execution\n // validation time is not included nor i/o\n this.state.slowlog.start(req.cmd, req.raw);\n\n // ensure the slowlog stop is called\n // before encoding and sending the response\n res.before = this.state.slowlog.stop;\n\n // e... | codesearchnet | {
"query": "Represent the Github summarization about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about Programming:"
} |
Whether this JWK has an asymmetric Public key. | [
"def has_public(self):\n \"\"\"\"\"\"\n if self.is_symmetric:\n return False\n reg = JWKValuesRegistry[self._params['kty']]\n for value in reg:\n if reg[value].public and value in self._key:\n return True"
] | [
"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:"
} |
Get schedule.
@return array
A schedule. It could be of 2 types:
- day: all classes within classes key
- week: all classes grouped by day within days key | [
"public function getSchedule() {\n // Use cached schedule if already processed.\n if ($this->schedule) {\n return $this->schedule;\n }\n\n $conf = $this->configFactory->get('openy_group_schedules.settings');\n $days_range = is_numeric($conf->get('days_range')) ? $conf->get('days_range') : 14;\n\... | [
"def can_pull(self, initial, scheduled):\n \n if not initial and self.config.is_valid_schedule():\n # if the config has a valid schedule, return True if this is a scheduled run\n return scheduled\n return True"
] | codesearchnet | {
"query": "Represent the Github description:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code about Software Development:"
} |
/*
(non-Javadoc)
@see
com.abubusoft.kripton.processor.sqlite.grammars.jql.JQLReplacerListener#
onColumnName(java.lang.String) | [
"@Override\n\tpublic String onColumnName(String columnName) {\n\t\tif (onlyBindParameter)\n\t\t\treturn null;\n\n\t\tif (currentSchema != null) {\n\t\t\tSet<SQLProperty> props = currentSchema.getPropertyBySimpleName(columnName);\n\t\t\tAssertKripton.assertTrueOrUnknownPropertyInJQLException(props != null && props.s... | [
"public Class<? extends org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor> bindIParseTreeConstructor() {\n\t\treturn org.eclipse.xtext.generator.parser.antlr.debug.parseTreeConstruction.SimpleAntlrParsetreeConstructor.class;\n\t}"
] | codesearchnet | {
"query": "Represent the comment:",
"pos": "Represent the code:",
"neg": "Represent the code about programming:"
} |
Reset _observed events. Remove self from observers.
:return: Nothing | [
"def forget(self):\n \n self._observed_events = {}\n if self in self._observers:\n self._observers.remove(self)"
] | [
"def _enter(self):\n \"\"\"\"\"\"\n command = self.command\n logger.log(5, \"Snippet keystroke `Enter`.\")\n # NOTE: we need to set back the actions (mode_off) before running\n # the command.\n self.mode_off()\n self.run(command)"
] | codesearchnet | {
"query": "Represent the Github summarization about Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code:"
} |
Converts a language code, e.g. 'de' to the KlarnaLanguage constant.
@param string $val language code
@return int|null | [
"public static function fromCode($val)\n {\n $val = strtoupper($val);\n if (array_key_exists($val, self::$_languages)) {\n return self::$_languages[$val];\n }\n return null;\n }"
] | [
"public static function configureInput(InputDefinition $definition)\n {\n $definition->addOption(new InputOption(\n 'date-fmt',\n null,\n InputOption::VALUE_REQUIRED,\n 'The date format (as a PHP date format string)',\n // @todo refactor so this can b... | codesearchnet | {
"query": "Represent the sentence about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code about Software development:"
} |
Flush the storage caching data. | [
"protected function flushApiCache($folderId = 0, $page = 0)\n {\n Yii::$app->storage->flushArrays();\n $this->deleteHasCache('storageApiDataFolders');\n $this->deleteHasCache(['storageApiDataFiles', (int) $folderId, (int) $page]);\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 description about Computer Science:",
"pos": "Represent the code about Computer Science:",
"neg": "Represent the code about programming:"
} |
// Get returns the credentials value, or error if the credentials Value failed
// to be retrieved. | [
"func (c *Credentials) Get() (Value, error) {\n\tc.m.Lock()\n\tdefer c.m.Unlock()\n\treturn c.provider.Retrieve()\n}"
] | [
"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 post about Software Development:",
"pos": "Represent the Github code about Software Development:",
"neg": "Represent the Github code about Software development:"
} |
// SetTags sets the Tags field's value. | [
"func (s *CreateSecretInput) SetTags(v []*Tag) *CreateSecretInput {\n\ts.Tags = v\n\treturn s\n}"
] | [
"function PbfSplicer(options) {\n // tag which will be auto-removed and auto-injected. Usually 'name'\n this.nameTag = options.nameTag;\n // tag that contains JSON initially, and which works as a prefix for multiple values\n this.multiTag = options.multiTag;\n\n // If options.namePicker is given, this class co... | codesearchnet | {
"query": "Represent the Github comment about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about programming:"
} |
获得一个带缓存的写入对象
@param path 输出路径,绝对路径
@param charset 字符集
@param isAppend 是否追加
@return BufferedReader对象
@throws IORuntimeException IO异常 | [
"public static BufferedWriter getWriter(String path, Charset charset, boolean isAppend) throws IORuntimeException {\r\n\t\treturn getWriter(touch(path), charset, isAppend);\r\n\t}"
] | [
"public static String getAbsolutePath(String path, Class<?> baseClass) {\r\n\t\tString normalPath;\r\n\t\tif (path == null) {\r\n\t\t\tnormalPath = StrUtil.EMPTY;\r\n\t\t} else {\r\n\t\t\tnormalPath = normalize(path);\r\n\t\t\tif (isAbsolutePath(normalPath)) {\r\n\t\t\t\t// 给定的路径已经是绝对路径了\r\n\t\t\t\treturn normalPat... | codesearchnet | {
"query": "Represent the Github summarization about API documentation:",
"pos": "Represent the Github code about API documentation:",
"neg": "Represent the Github code about text processing:"
} |
// Err is a no-op function. | [
"func (r *RawLogger) Err(message []byte) {\n\tfmt.Fprint(os.Stderr, string(message))\n\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:"
} |
// Set will set the value for an identifier. | [
"func (m *Map) Set(k KeyType, v ValueType) {\n\tm.set(k, v, mapKeyOptions{\n\t\tcopyKey: true,\n\t\tfinalizeKey: m.finalize != nil,\n\t})\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 summarization about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code:"
} |
Displays a form to edit an existing User entity. | [
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $user = $em->getRepository('ChillMainBundle:User')->find($id);\n\n if (!$user) {\n throw $this->createNotFoundException('Unable to find User entity.');\n }\n\n $editForm = $this->cre... | [
"protected function addSynchronizationInformation()\n {\n $this->html->pInfo($this->_(\n 'Check source for new surveys, changes in survey status and survey deletion. Can also perform maintenance on some sources, e.g. by changing the number of attributes.'\n ));\n $this... | codesearchnet | {
"query": "Represent the text:",
"pos": "Represent the code:",
"neg": "Represent the code about Data synchronization:"
} |
// SetOptionGroupName sets the OptionGroupName field's value. | [
"func (s *RestoreDBInstanceFromDBSnapshotInput) SetOptionGroupName(v string) *RestoreDBInstanceFromDBSnapshotInput {\n\ts.OptionGroupName = &v\n\treturn s\n}"
] | [
"private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n GetField fields = in.readFields();\n beginDefaultContext = fields.get(BEGIN_DEFAULT, true);\n\n // Note that further processing is required in JEEMetadataContextProviderImpl.deserializeThreadCo... | codesearchnet | {
"query": "Represent the text about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code about programming:"
} |
Set a footerDrawerItem at a specific position
@param drawerItem
@param position | [
"public void setStickyFooterItemAtPosition(@NonNull IDrawerItem drawerItem, int position) {\n if (mDrawerBuilder.mStickyDrawerItems != null && mDrawerBuilder.mStickyDrawerItems.size() > position) {\n mDrawerBuilder.mStickyDrawerItems.set(position, drawerItem);\n }\n\n DrawerUtils.reb... | [
"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 instruction:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
/*
@see javax.servlet.ServletRequest#getContentType() | [
"@Trivial\n @Override\n public String getContentType() {\n String type = this.request.getHeader(\"Content-Type\");\n if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {\n Tr.debug(tc, \"getContentType: \" + type);\n }\n return type;\n }"
] | [
"HttpSession newSession()\n {\n HttpSession session=_servletHandler.newHttpSession(this);\n Cookie cookie=_servletHandler.getSessionManager().getSessionCookie(session,isSecure());\n if (cookie!=null)\n _servletHttpResponse.getHttpResponse().addSetCookie(cookie);\n return se... | codesearchnet | {
"query": "Represent the Github sentence:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
// ZoneTemplates retrieves the list of child ZoneTemplates of the DomainTemplate | [
"func (o *DomainTemplate) ZoneTemplates(info *bambou.FetchingInfo) (ZoneTemplatesList, *bambou.Error) {\n\n\tvar list ZoneTemplatesList\n\terr := bambou.CurrentSession().FetchChildren(o, ZoneTemplateIdentity, &list, info)\n\treturn list, err\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 sentence:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
Retrieves the handler associated with the event.
@param eventType
the given event
@return the associated handler, <code>null</code> if not found | [
"private JClassType getHandlerForEvent(JClassType eventType) {\n\n\t\t// All handlers event must have an overrided method getAssociatedType().\n\t\t// We take advantage of this information to get the associated handler.\n\t\t// Ex:\n\t\t// com.google.gwt.event.dom.client.ClickEvent\n\t\t// ---> com.google.gwt.event... | [
"function ListenerList (emitter, eventId) {\n this._count = 0; // count of \"listeners\"\n this._methods = null; // null, function, or array of functions\n this._objects = null; // null, context, or array of contexts\n\n if (debugLevel > 0) {\n this._emitter = emitter; // our parent EventEmitter\... | codesearchnet | {
"query": "Represent the instruction about Software development:",
"pos": "Represent the code about Software development:",
"neg": "Represent the code about Software development:"
} |
将流的内容写入文件<br>
此方法不会关闭输入流
@param in 输入流,不关闭
@return dest
@throws IORuntimeException IO异常 | [
"public File writeFromStream(InputStream in) throws IORuntimeException {\r\n\t\tFileOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tout = new FileOutputStream(FileUtil.touch(file));\r\n\t\t\tIoUtil.copy(in, out);\r\n\t\t}catch (IOException e) {\r\n\t\t\tthrow new IORuntimeException(e);\r\n\t\t} finally {\r\n\t\t\tIo... | [
"public Select parseSelect(MySqlSelectQueryBlock query) throws SqlParseException {\n\n Select select = new Select();\n /*zhongshu-comment SqlParser类没有成员变量,里面全是方法,所以将this传到WhereParser对象时是无状态的,\n 即SqlParser对象并没有给WhereParser传递任何属性,也不存在WhereParser修改SqlParser的成员变量值这一说\n ... | codesearchnet | {
"query": "Represent the Github instruction about API documentation:",
"pos": "Represent the Github code about API documentation:",
"neg": "Represent the Github code about programming:"
} |
Use this API to disable snmpalarm of given name. | [
"public static base_response disable(nitro_service client, String trapname) throws Exception {\n\t\tsnmpalarm disableresource = new snmpalarm();\n\t\tdisableresource.trapname = trapname;\n\t\treturn disableresource.perform_operation(client,\"disable\");\n\t}"
] | [
"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 post:",
"pos": "Represent the code:",
"neg": "Represent the code about programming:"
} |
src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:214:1: conditionalOrExpression returns [BaseDescr result] : left= conditionalAndExpression ( DOUBLE_PIPE (args= fullAnnotation[null] )? right= conditionalAndExpression )* ; | [
"public final BaseDescr conditionalOrExpression() throws RecognitionException {\n\t\tBaseDescr result = null;\n\n\n\t\tBaseDescr left =null;\n\t\tAnnotationDescr args =null;\n\t\tBaseDescr right =null;\n\n\t\ttry {\n\t\t\t// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:215:3: (left= conditionalAndE... | [
"Rule LocalVariableDeclarationStatement() {\n return Sequence(ZeroOrMore(FirstOf(FINAL, Annotation())), Type(), VariableDeclarators(), SEMI);\n }"
] | codesearchnet | {
"query": "Represent the sentence:",
"pos": "Represent the code:",
"neg": "Represent the code about language and writing:"
} |
<!-- begin-user-doc -->
<!-- end-user-doc -->
@generated | [
"public EEnum getOBPRefCSys() {\n\t\tif (obpRefCSysEEnum == null) {\n\t\t\tobpRefCSysEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(58);\n\t\t}\n\t\treturn obpRefCSysEEnum;\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 post about Text generation:",
"pos": "Represent the Github code about Text generation:",
"neg": "Represent the Github code:"
} |
this is called by web socket thread not Chorus interpreter so log don't throw ChorusException, log errors instead | [
"public void stepSucceeded(StepSucceededMessage stepSuccessMessage) {\n ExecutingStep s = executingStep.get();\n if ( ! s.getExecutionUUID().equals(stepSuccessMessage.getExecutionId())) {\n //This could happen if chorus interpreter timed out the previous step while waiting for the reply\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:"
} |
// noAcceptableAuth is used to handle when we have no eligible
// authentication mechanism | [
"func noAcceptableAuth(conn io.Writer) error {\n\tconn.Write([]byte{socks5Version, noAcceptable})\n\treturn NoSupportedAuth\n}"
] | [
"func tagUserCredentials(conf agent.Config) (string, string, error) {\n\tusername := conf.Tag().String()\n\tvar password string\n\t// TODO(perrito) we might need an accessor for the actual state password\n\t// just in case it ever changes from the same as api password.\n\tapiInfo, ok := conf.APIInfo()\n\tif ok {\n\... | codesearchnet | {
"query": "Represent the Github description:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
Get output from the process
@return string | [
"private function getOutput() {\n $output = $this->process->getErrorOutput() . $this->process->getOutput();\n\n return trim(preg_replace('/ +$/m', '', $output));\n }"
] | [
"def postloop(self):\n \n cmd.Cmd.postloop(self) # Clean up command completion\n d1_cli.impl.util.print_info(\"Exiting...\")"
] | codesearchnet | {
"query": "Represent the instruction about Software Development:",
"pos": "Represent the code about Software Development:",
"neg": "Represent the code about Software development:"
} |
// ConcatString recursively concatenates strings from a binary expression | [
"func ConcatString(n *ast.BinaryExpr) (string, bool) {\n\tvar s string\n\t// sub expressions are found in X object, Y object is always last BasicLit\n\tif rightOperand, ok := n.Y.(*ast.BasicLit); ok {\n\t\tif str, err := GetString(rightOperand); err == nil {\n\t\t\ts = str + s\n\t\t}\n\t} else {\n\t\treturn \"\", f... | [
"private static String keyToGoWithElementsString(String label, DuplicateGroupedAndTyped elements) {\n /*\n * elements.toString(), which the caller is going to use, includes the homogeneous type (if\n * any), so we don't want to include it here. (And it's better to have it in the value, rather\n * tha... | codesearchnet | {
"query": "Represent the description about Software development:",
"pos": "Represent the code about Software development:",
"neg": "Represent the code about programming:"
} |
Delete file controller | [
"public function __async_delete()\n {\n /** @var \\samsonphp\\fs\\FileService $fsModule */\n $fsModule = $this->system->module('fs');\n\n /** @var \\samsoncms\\input\\Field $field */\n $this->createField(new dbQuery(), $_GET['e'], $_GET['f'], $_GET['i']);\n\n // Build uploaded ... | [
"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 text:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
Expand the root node
@param {Integer} maxLevel | [
"function(maxLevel) {\n var ul = this.el.childNodes[0];\n var liEls = ul.childNodes;\n for(var i = 0 ; i < liEls.length ; i++) {\n var li = liEls[i];\n this.expandBranch(li,maxLevel);\n }\n }"
] | [
"def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_"
] | codesearchnet | {
"query": "Represent the Github description about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code:"
} |
Gets the LogicalSwitches API client.
Returns:
LogicalSwitches: | [
"def logical_switches(self):\n \n if not self.__logical_switches:\n self.__logical_switches = LogicalSwitches(self.__connection)\n return self.__logical_switches"
] | [
"@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 Github instruction:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
// NewPutPolicy creates a new http.Handler for the put policy operation | [
"func NewPutPolicy(ctx *middleware.Context, handler PutPolicyHandler) *PutPolicy {\n\treturn &PutPolicy{Context: ctx, Handler: handler}\n}"
] | [
"func New(*SmartSampleConfig, log.Logger, dtsink) (*SmartSampler, error) {\n\treturn nil, errors.New(\"you are attempting to configure a regular SignalFx Gateway with the config of a Smart Gateway. This is an unsupported configuration\")\n}"
] | codesearchnet | {
"query": "Represent the post about Software development:",
"pos": "Represent the code about Software development:",
"neg": "Represent the code about programming:"
} |
// RequestPty requests the association of a pty with the session on the remote host. | [
"func (s *Session) RequestPty(term string, h, w int, termmodes TerminalModes) error {\n\tvar tm []byte\n\tfor k, v := range termmodes {\n\t\tkv := struct {\n\t\t\tKey byte\n\t\t\tVal uint32\n\t\t}{k, v}\n\n\t\ttm = append(tm, Marshal(&kv)...)\n\t}\n\ttm = append(tm, tty_OP_END)\n\treq := ptyRequestMsg{\n\t\tTerm: ... | [
"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 summarization about Computer Science:",
"pos": "Represent the Github code about Computer Science:",
"neg": "Represent the Github code about programming:"
} |
Prepend data to container
@param array $item Created Data | [
"protected function prepend(array $item)\n {\n if (! $this->isEnabled()) {\n $this->enable();\n }\n\n $container = $this->getContainer();\n $currentArr = $container->getArrayCopy();\n\n array_unshift($currentArr, $item);\n $container->exchangeArray($currentAr... | [
"def includeme(config):\n \n root = config.get_root_resource()\n root.add('nef_polymorphic', '{collections:.+,.+}',\n view=PolymorphicESView,\n factory=PolymorphicACL)"
] | codesearchnet | {
"query": "Represent the summarization about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code:"
} |
// expandPattern expands a regex pattern by generating permutations of any optional parameters
// and changing named parameters into their {openapi} equivalents. | [
"func expandPattern(pattern string) []string {\n\tvar paths []string\n\n\t// GenericNameRegex adds a regex that complicates our parsing. It is much easier to\n\t// detect and remove it now than to compensate for in the other regexes.\n\t//\n\t// example: (?P<foo>\\\\w(([\\\\w-.]+)?\\\\w)?) -> (?P<foo>)\n\tbase := G... | [
"private static String dotsToRegex(String dotsName) {\n /*\n * oops, next line requires JDK 1.5 return dotsName.replace(\"$\",\n * \"\\\\$\").replace(\".\", SEP); could use String.replaceAll(regex, repl)\n * but that can be problematic--javadoc says \"Note that backslashes (\\)\n ... | codesearchnet | {
"query": "Represent the description about Software development:",
"pos": "Represent the code about Software development:",
"neg": "Represent the code about Software development:"
} |
Get service with common arguments
@return mixed | [
"protected function getCommonService() {\n\t\tif ($this->service === null) {\n\t\t\tif ($this->arguments === null) {\n\t\t\t\t$this->service = $this->initService();\n\t\t\t} else {\n\t\t\t\t$args = $this->normalizeArgs($this->arguments);\n\t\t\t\t$args = $this->processArgs($args);\n\t\t\t\t\n\t\t\t\t$this->service ... | [
"def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_"
] | codesearchnet | {
"query": "Represent the sentence about PHP programming:",
"pos": "Represent the code about PHP programming:",
"neg": "Represent the code:"
} |
--------- main ends here. | [
"function show_copyright(comments) {\n var ret = \"\";\n for (var i = 0; i < comments.length; ++i) {\n var c = comments[i];\n if (c.type == \"comment1\") {\n ret += \"//\" + c.value + \"\\n\";\n } else {\n ret +... | [
"function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }"
] | codesearchnet | {
"query": "Represent the Github text:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
Get a string representation of this object.
@param indent: The indent.
@type indent: int
@return: A string.
@rtype: str | [
"def str(self, indent=0, history=None):\n \n if history is None:\n history = []\n if self in history:\n return '%s ...' % Repr(self)\n history.append(self)\n tab = '%*s' % (indent * 3, '')\n result = []\n result.append('%s<%s' % (tab, self.id))\... | [
"def arg_to_array(func):\n \n def fn(self, arg, *args, **kwargs):\n \"\"\"Function\n\n Parameters\n ----------\n arg : array-like\n Argument to convert.\n *args : tuple\n Arguments.\n **kwargs : dict\n Keyword arguments.\n\n Ret... | codesearchnet | {
"query": "Represent the Github comment about text processing:",
"pos": "Represent the Github code about text processing:",
"neg": "Represent the Github code about programming:"
} |
Marshall the given parameter object. | [
"public void marshall(SendMessagesRequest sendMessagesRequest, ProtocolMarshaller protocolMarshaller) {\n\n if (sendMessagesRequest == null) {\n throw new SdkClientException(\"Invalid argument passed to marshall(...)\");\n }\n\n try {\n protocolMarshaller.marshall(sendMess... | [
"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 is used in case normal flow for selection fails
@param componentId ComboBox id so we can use directly js to force selection of that value
@param value value
@return true or false | [
"private boolean setValueWithJs(final String componentId, final String value) {\r\n boolean selected;\r\n String script = \"return (function(){var c = Ext.getCmp('\" + componentId + \"'); var record = c.findRecord(c.displayField, '\" + value + \"');\" +\r\n \"if(record){c.onSelect(reco... | [
"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:",
"pos": "Represent the code:",
"neg": "Represent the code about programming:"
} |
Display status of FIDO2 application. | [
"def info(ctx):\n \n controller = ctx.obj['controller']\n\n if controller.is_fips:\n click.echo('FIPS Approved Mode: {}'.format(\n 'Yes' if controller.is_in_fips_mode else 'No'))\n else:\n if controller.has_pin:\n try:\n click.echo(\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 sentence:",
"pos": "Represent the code:",
"neg": "Represent the code about Programming:"
} |
Performs a dynamic query on the database and returns the matching rows.
@param dynamicQuery the dynamic query
@return the matching rows | [
"@Override\n\tpublic <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {\n\t\treturn cpAttachmentFileEntryPersistence.findWithDynamicQuery(dynamicQuery);\n\t}"
] | [
"@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 instruction about Programming:",
"pos": "Represent the code about Programming:",
"neg": "Represent the code:"
} |
添加Channel
@param channelInfo
@param channelParameterInfo
@throws Exception | [
"public void doAdd(@FormGroup(\"dataMediaInfo\") Group dataMediaInfo,\n @FormField(name = \"formDataMediaError\", group = \"dataMediaInfo\") CustomErrors err, Navigator nav)\n t... | [
"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:"
} |
/*
Delete a thread | [
"function delThread(pid) {\n //Delete worker entry from worker\n\n delete workers[pid];\n\n //Remove pid from pid array\n var position = pids.indexOf(pid);\n if (~position) pids.splice(position, 1);\n\n //Reset array index\n pids = pids.filter(function(){return true;});\n}"
] | [
"public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }"
] | codesearchnet | {
"query": "Represent the Github summarization:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code about programming:"
} |
TODO(user), remove once we merge jdk8 specific's with core | [
"@Nullable\n private static <T> TreePath findEnclosingMethodOrLambdaOrInitializer(TreePath path) {\n while (path != null) {\n if (path.getLeaf() instanceof MethodTree) {\n return path;\n }\n TreePath parent = path.getParentPath();\n if (parent != null) {\n if (parent.getLeaf() ... | [
"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 text:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
Figure out which version of Chef this cookbook requires. Returns an array
of Gem::Requirement-style string like `~> 12.0`.
@return [Array<String>] | [
"def chef_version_requirement\n if spec.metadata['halite_chef_version']\n # Manually overridden by gem metadata, use that.\n [spec.metadata['halite_chef_version']]\n elsif dep = spec.dependencies.find {|inner_dep| inner_dep.name == 'chef' && !inner_dep.requirement.none? }\n # Parse th... | [
"def versions(constraints, elm_version, should_update, only_update)\n if repository.cloned? &&\n !repository.fetched &&\n should_update &&\n (!only_update || only_update == package_name)\n # Get updates from upstream\n Logger.arrow \"Getting updates for: #{package_name.bol... | codesearchnet | {
"query": "Represent the Github text about Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code about programming:"
} |
Creates new document from markup.
Chainable.
@param unknown_type $markup
@return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery | [
"public static function newDocumentXML($markup = null, $charset = null) \n {\n $contentType = $charset\n ? \";charset=$charset\"\n : '';\n return self::newDocument($markup, \"text/xml{$contentType}\");\n }"
] | [
"def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_"
] | codesearchnet | {
"query": "Represent the Github post about Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code:"
} |
/*
Returns true if the specified URL should be encoded to include
the session id, false if not. | [
"public boolean shouldEncodeURL(String pURL, HttpServletRequest pRequest) {\n if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {\n LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[SHOULD_ENCODE_URL]);\n ... | [
"def uri_from(url)\n # This will raise an InvalidURIError if the URL is very wrong. It will\n # still pass for strings like \"foo\", though.\n url = URI(url)\n\n # We need to check if the URL was either http://, https:// or ftp://,\n # because these are the only ones we can download from. o... | codesearchnet | {
"query": "Represent the comment about Software Development:",
"pos": "Represent the code about Software Development:",
"neg": "Represent the code:"
} |
Resumes scanning until the next regular expression is matched, the end of
input is encountered or an I/O-Error occurs.
@return the next token
@throws java.io.IOException if any I/O-Error occurs | [
"public JSONToken yylex() throws java.io.IOException, ParseException {\n int zzInput;\n int zzAction;\n\n // cached fields:\n int zzCurrentPosL;\n int zzMarkedPosL;\n int zzEndReadL = zzEndRead;\n char[] zzBufferL = zzBuffer;\n char[] zzCMapL = ZZ_CMAP;\n\n ... | [
"def readline(self):\n \n try:\n s = self.fileobj.readline()\n except (OSError, IOError) as err:\n if err.args[0] == errno.EIO:\n # Linux-style EOF\n self.flag_eof = True\n raise EOFError('End Of File (EOF). Exception style plat... | codesearchnet | {
"query": "Represent the instruction:",
"pos": "Represent the code:",
"neg": "Represent the code about Programming:"
} |
Determine whether the component is supported with current version of Zest.
@param (string) $zVersion Zest version number from component config file.
@param (string) $comparator Operator that used to compare version.
@since 3.0.0
@return bool | [
"public function isSupported($zVersion, $comparator)\n {\n if (version_compare($zVersion, Version::VERSION, $comparator) === true) {\n return true;\n }\n\n return false;\n }"
] | [
"public static function getDatabaseConfig($dbConfig = null)\n {\n $config = Config::getInstance();\n\n if (is_null($dbConfig)) {\n $dbConfig = $config->database;\n }\n\n /**\n * Triggered before a database connection is established.\n *\n * This even... | codesearchnet | {
"query": "Represent the post:",
"pos": "Represent the code:",
"neg": "Represent the code about Programming:"
} |
Search an array for multiple values.
@param array $needles
the values to search the `$haystack` for.
@param array $haystack
the in which to search for the `$needles`
@return boolean
true if any of the `$needles` are in `$haystack`,
false otherwise. | [
"public static function in_array_all($needles, $haystack)\n {\n foreach ($needles as $n) {\n if (!in_array($n, $haystack)) {\n return false;\n }\n }\n\n return true;\n }"
] | [
"public static function removeElement(array $array, $item)\n {\n /*\n * No elements or the element does not exist?\n * Nothing to do\n */\n if (empty($array) || !in_array($item, $array, true)) {\n return false;\n }\n\n // Flip the array to make it lo... | codesearchnet | {
"query": "Represent the Github comment about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about Software development:"
} |
// WeekdayShort returns the locales short weekday given the 'weekday' provided | [
"func (pt *pt_PT) WeekdayShort(weekday time.Weekday) string {\n\treturn pt.daysShort[weekday]\n}"
] | [
"func parseDay(buff []byte, cursor *int, l int) (int, error) {\n\t// XXX : this is a relaxed constraint\n\t// XXX : we do not check if valid regarding February or leap years\n\t// XXX : we only checks that day is in range [01 -> 31]\n\t// XXX : in other words this function will not rant if you provide Feb 31th\n\tr... | codesearchnet | {
"query": "Represent the Github summarization about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about datetime:"
} |
// ChatDelete deletes a message. | [
"func (rtm *Client) ChatDelete(channelID string, ts Timestamp) error {\n\tres := basicResponse{}\n\terr := NewExternalRequest().\n\t\tAsPost().\n\t\tWithScheme(APIScheme).\n\t\tWithHost(APIEndpoint).\n\t\tWithPath(\"api/chat.delete\").\n\t\tWithPostData(\"token\", rtm.Token).\n\t\tWithPostData(\"channel\", channelI... | [
"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 instruction:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code about programming:"
} |
<pre>
The JWT audience is used when generating a JWT id token for the backend.
</pre>
<code>string jwt_audience = 7;</code> | [
"public java.lang.String getJwtAudience() {\n java.lang.Object ref = \"\";\n if (authenticationCase_ == 7) {\n ref = authentication_;\n }\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.p... | [
"def info_authn(self):\n \n authz_header = request.headers.get('Authorization', '[none]')\n if (not authz_header.startswith('Bearer ')):\n return False\n token = authz_header[7:]\n return self.access_token_valid(\n token, \"info_authn: Authorization header\")... | codesearchnet | {
"query": "Represent the Github instruction:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code about Programming:"
} |
Make a string key out of many criteria. | [
"def make_key(*criteria):\n \"\"\"\"\"\"\n criteria = [stringify(c) for c in criteria]\n criteria = [c for c in criteria if c is not None]\n if len(criteria):\n return ':'.join(criteria)"
] | [
"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 summarization about programming:",
"pos": "Represent the code about programming:",
"neg": "Represent the code:"
} |
Save the config to the configured file action
@return null | [
"public function saveConfigAction() {\n $cfgr = Mage::getModel('turpentine/varnish_admin')->getConfigurator();\n if (is_null($cfgr)) {\n $this->_getSession()->addError(\n $this->__('Failed to load configurator') );\n } else {\n Mage::dispatchEvent('turpentin... | [
"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 text about Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code:"
} |
//IsIP checks to see if the value is a valid IP address. Returns an error if not valid | [
"func IsIP(value string) error {\n\tif nil == net.ParseIP(value) {\n\t\treturn NewViolation(fmt.Sprintf(\"invalid IP Address %s\", value))\n\t}\n\treturn nil\n}"
] | [
"function inflate(object) {\n // check if the object is an object and isn't empty\n if (is(object) && !empty(object)) {\n // create a new object for the result\n let result = {};\n\n // for each key in the object\n Object.keys(object).forEach((path) => {\n // get value from the object\n cons... | codesearchnet | {
"query": "Represent the description:",
"pos": "Represent the code:",
"neg": "Represent the code:"
} |
create specified path (obj, fn) -> null | [
"function createDir (argv, next) {\n const loc = path.resolve(path.join(argv.d, argv.name))\n mkdirp(loc, function (err) {\n if (err) return next(err)\n process.chdir(loc)\n argv.directory = loc\n argv.d = loc\n next()\n })\n}"
] | [
"function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }"
] | codesearchnet | {
"query": "Represent the Github instruction about Software development:",
"pos": "Represent the Github code about Software development:",
"neg": "Represent the Github code:"
} |
Home the robot.
:returns: This instance. | [
"def home(self) -> 'InstrumentContext':\n \n def home_dummy(mount): pass\n cmds.do_publish(self.broker, cmds.home, home_dummy,\n 'before', None, None, self._mount.name.lower())\n self._hw_manager.hardware.home_z(self._mount)\n self._hw_manager.hardware.home_... | [
"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:"
} |
#generates a n digit pin | [
"public static function generate_pin($length = 8)\n {\n $factory = new \\RandomLib\\Factory;\n $generator = $factory->getLowStrengthGenerator();\n #--with easy to speak letters\n #$alfabet = range('A', 'Z');\n #$consonants = array_diff($alfabet, array('Y', 'H', 'W', 'Q', 'C')) ... | [
"def anim(host, seq, anim, d):\n \n at(host, 'ANIM', seq, [anim, d])"
] | codesearchnet | {
"query": "Represent the Github description:",
"pos": "Represent the Github code:",
"neg": "Represent the Github code:"
} |
<!-- begin-user-doc -->
<!-- end-user-doc -->
@generated | [
"@Override\n\tpublic void eUnset(int featureID) {\n\t\tswitch (featureID) {\n\t\t\tcase AfplibPackage.GFLTRG__XPOS:\n\t\t\t\tsetXPOS(XPOS_EDEFAULT);\n\t\t\t\treturn;\n\t\t\tcase AfplibPackage.GFLTRG__YPOS:\n\t\t\t\tsetYPOS(YPOS_EDEFAULT);\n\t\t\t\treturn;\n\t\t}\n\t\tsuper.eUnset(featureID);\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 comment about Text generation:",
"pos": "Represent the Github code about Text generation:",
"neg": "Represent the Github code:"
} |
The value to compare to.
Generated from protobuf field <code>.google.firestore.v1beta1.Value value = 3;</code>
@param \Google\Cloud\Firestore\V1beta1\Value $var
@return $this | [
"public function setValue($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Firestore\\V1beta1\\Value::class);\n $this->value = $var;\n\n return $this;\n }"
] | [
"public function setHttpCheck($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig_HttpCheck::class);\n $this->writeOneof(5, $var);\n\n return $this;\n }"
] | codesearchnet | {
"query": "Represent the Github description about programming:",
"pos": "Represent the Github code about programming:",
"neg": "Represent the Github code about programming:"
} |
// IndexOfNode returns the position of the specified node within the Selection
// object, or -1 if not found. | [
"func (s *Selection) IndexOfNode(node *html.Node) int {\n\treturn indexInSlice(s.Nodes, node)\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 Github post about Software development:",
"pos": "Represent the Github code about Software development:",
"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.