query
stringlengths
16
255
pos
list
neg
list
task
stringclasses
1 value
instruction
dict
Get a list of active projects. :return list: A list of tuples containing a title and pageid in that order.
[ "def active(self):\n \n projects = []\n r = requests.get(self.api,\n params={'action': 'query', 'list': 'categorymembers', 'cmpageid': self.active_id,\n 'cmtype': 'page', 'cmlimit': '500', 'format': 'json'},\n heade...
[ "def reset ():\n \n global __prefixes_suffixes, __suffixes_to_types, __types, __rule_names_to_types, __target_suffixes_cache\n\n __register_features ()\n\n # Stores suffixes for generated targets.\n __prefixes_suffixes = [property.PropertyMap(), property.PropertyMap()]\n\n # Maps suffixes to types...
codesearchnet
{ "query": "Represent the sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Print the top nav menu. @param out The html out stream. @param reg The resources object. @exception DBException File exception.
[ "public void printHtmlMenuStart(PrintWriter out, ResourceBundle reg)\n throws DBException\n {\n this.printHtmlBanner(out, reg);\n this.printHtmlLogo(out, reg);\n this.printHtmlMenubar(out, reg);\n\n String strHTML = reg.getString(\"htmlTableStart\");\n strHTML = Utility....
[ "protected Expression instantiate(Object oldInstance, Encoder out)\n {\n //\n // An implementation instance is actually constructed at decode time by calling\n // ControlBean.ensureControl on the parent bean. This will create a new impl\n // instance and run the impl initializer on i...
codesearchnet
{ "query": "Represent the Github text about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
modified to work in the new world
[ "public FragmentResponseMessage processFragmentTask(SiteProcedureConnection siteConnection)\n {\n final FragmentResponseMessage currentFragResponse =\n new FragmentResponseMessage(m_fragmentMsg, m_initiator.getHSId());\n currentFragResponse.setStatus(FragmentResponseMessage.SUCCESS, null...
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Return all packages that are installed, but missing from "packages". Return value is a tuple of the package names
[ "def determine_extra_packages(self, packages):\n \n\n args = [\n \"pip\",\n \"freeze\",\n ]\n installed = subprocess.check_output(args, universal_newlines=True)\n\n installed_list = set()\n lines = installed.strip().split('\\n')\n for (package, ...
[ "def list_nodes(self):\n \"\"\"\"\"\"\n self.add_environment_file(user='stack', filename='stackrc')\n ret, _ = self.run(\"ironic node-list --fields uuid|awk '/-.*-/ {print $2}'\", user='stack')\n # NOTE(Gonéri): the good new is, the order of the nodes is preserved and follow the one from...
codesearchnet
{ "query": "Represent the instruction about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Technology:" }
Get plain value of the current user @return string
[ "protected function getUserString() : string\n {\n $result = 'System';\n\n $userFields = [\n 'name',\n 'username',\n 'email',\n ];\n\n $currentUser = User::getCurrentUser();\n if (empty($currentUser) || !is_array($currentUser)) {\n re...
[ "def getKeySequenceCounter(self):\n \"\"\"\"\"\"\n print '%s call getKeySequenceCounter' % self.port\n keySequence = ''\n keySequence = self.__sendCommand(WPANCTL_CMD + 'getprop -v Network:KeyIndex')[0]\n return keySequence" ]
codesearchnet
{ "query": "Represent the Github text about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code:" }
// SyncPeer returns the current sync peer.
[ "func (b *blockManager) SyncPeer() *ServerPeer {\n\tb.syncPeerMutex.Lock()\n\tdefer b.syncPeerMutex.Unlock()\n\n\treturn b.syncPeer\n}" ]
[ "@Override\n public void init(TCPWriteRequestContext x, H2MuxTCPWriteCallback c) {\n writeReqContext = x;\n muxCallback = c;\n\n // callback will need to know how to get back to this write queue.\n // This means one and only one H2WriteTree per H2InboundLink which has just one true TC...
codesearchnet
{ "query": "Represent the Github summarization about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code:" }
Finds any {@link ParameterConverter} defined in the given injector and, if none found, recurses to its parent. @param injector the Injector @return A List of ParameterConverter instances
[ "private List<ParameterConverter> findConverters(Injector injector) {\n List<Binding<ParameterConverter>> bindingsByType = injector\n .findBindingsByType(new TypeLiteral<ParameterConverter>() {\n });\n if (bindingsByType.isEmpty() && injector.getParent() != null) {\n ...
[ "private void ensureAccessible(Key<?> key, GinjectorBindings parent, GinjectorBindings child) {\n // Parent will be null if it is was an optional dependency and it couldn't be created.\n if (parent != null && !child.equals(parent) && !child.isBound(key)) {\n PrettyPrinter.log(logger, TreeLogger.DEBUG,\n ...
codesearchnet
{ "query": "Represent the Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Command-line interface for interacting with a WVA device
[ "def cli(ctx, hostname, username, password, config_dir, https):\n \"\"\"\"\"\"\n ctx.is_root = True\n ctx.user_values_entered = False\n ctx.config_dir = os.path.abspath(os.path.expanduser(config_dir))\n ctx.config = load_config(ctx)\n ctx.hostname = hostname\n ctx.username = username\n ctx.p...
[ "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 description:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Compile the current schema into a callable validator :return: Callable validator :rtype: callable :raises SchemaError: Schema compilation error
[ "def compile_schema(self, schema):\n \n compiler = self.get_schema_compiler(schema)\n\n if compiler is None:\n raise SchemaError(_(u'Unsupported schema data type {!r}').format(type(schema).__name__))\n\n return compiler(schema)" ]
[ "def fetch_entity_cls_from_registry(entity):\n \"\"\"\"\"\"\n # Defensive check to ensure we only process if `to_cls` is a string\n if isinstance(entity, str):\n try:\n return repo_factory.get_entity(entity)\n except AssertionError:\n # Entity has not been registered (ye...
codesearchnet
{ "query": "Represent the comment about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Software development:" }
:return: Key suitable to be used for the index.entries dictionary :param entry: One instance of type BaseIndexEntry or the path and the stage
[ "def entry_key(*entry):\n \"\"\"\"\"\"\n if len(entry) == 1:\n return (entry[0].path, entry[0].stage)\n else:\n return tuple(entry)" ]
[ "@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 about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
// SetInputFileKey sets the InputFileKey field's value.
[ "func (s *StartThingRegistrationTaskInput) SetInputFileKey(v string) *StartThingRegistrationTaskInput {\n\ts.InputFileKey = &v\n\treturn s\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 text about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
Generated Unique Authorization Code @return Generated Authorization Code
[ "public static String generateAuthorizationCode() {\n StringBuilder buf = new StringBuilder(AUTHORIZATION_CODE_LENGTH);\n SecureRandom rand = new SecureRandom();\n for (int i = 0; i < AUTHORIZATION_CODE_LENGTH; i++) {\n buf.append(allowedCharacters[rand.nextInt(allowedCharacters.leng...
[ "function newService()\n {\n ### Attain Login Continue If Has\n /** @var iHttpRequest $request */\n $request = \\IOC::GetIoC()->get('/HttpRequest');\n $tokenAuthIdentifier = new IdentifierHttpToken;\n $tokenAuthIdentifier\n ->setRequest($request)\n ->setT...
codesearchnet
{ "query": "Represent the Github text about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Tries to load first available record and return data record. Doesn't throw exception if model can't be loaded or there are no data records. @param Model $m @param mixed $table @return array|false
[ "public function tryLoadAny(Model $m, $table = null)\n {\n if (!isset($table)) {\n $table = $m->table;\n }\n\n if (!$this->data[$table]) {\n return false; // no records at all in table\n }\n\n reset($this->data[$table]);\n $key = key($this->data[$ta...
[ "public function validate() {\n if ($this->initializer) {\n Ensure::isFalse($this->initializer->getRepository() && $this->initializer->getValue(), 'It makes no sense to define initializer repository and value simultaneously for column [%s]', $this->name);\n }\n }" ]
codesearchnet
{ "query": "Represent the summarization about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
Return a set of constraints that define fermionic ladder operators. :param a: The non-Hermitian variables. :type a: list of :class:`sympy.physics.quantum.operator.Operator`. :returns: a dict of substitutions.
[ "def fermionic_constraints(a):\n \n substitutions = {}\n for i, ai in enumerate(a):\n substitutions[ai ** 2] = 0\n substitutions[Dagger(ai) ** 2] = 0\n substitutions[ai * Dagger(ai)] = 1.0 - Dagger(ai) * ai\n for aj in a[i+1:]:\n # substitutions[ai*Dagger(aj)] = -Dagg...
[ "def term_with_coeff(term, coeff):\n \n if not isinstance(coeff, Number):\n raise ValueError(\"coeff must be a Number\")\n new_pauli = term.copy()\n # We cast to a complex number to ensure that internally the coefficients remain compatible.\n new_pauli.coefficient = complex(coeff)\n return ...
codesearchnet
{ "query": "Represent the text about text processing:", "pos": "Represent the code about text processing:", "neg": "Represent the code:" }
Recover the lease from HDFS, retrying multiple times.
[ "public void recoverFileLease(final FileSystem fs, final Path p,\n Configuration conf)\n throws IOException {\n // lease recovery not needed for local file system case.\n if (!(fs instanceof DistributedFileSystem)) {\n return;\n }\n recoverDFSFileLease((DistributedF...
[ "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:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Get the families that the person is a spouse of. @return the list of families
[ "public List<Family> getFamilies() {\n final List<Family> families = new ArrayList<>();\n for (final FamilyNavigator nav : familySNavigators) {\n families.add(nav.getFamily());\n }\n return families;\n }" ]
[ "def _reflex_rule_process(self, wf_action):\n \n # Check out if the analysis has any reflex rule bound to it.\n # First we have get the analysis' method because the Reflex Rule\n # objects are related to a method.\n a_method = self.getMethod()\n if not a_method:\n ...
codesearchnet
{ "query": "Represent the Github text about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Create an <code>unsigned int</code> @throws NumberFormatException If <code>value</code> does not contain a parsable <code>unsigned int</code>.
[ "public static UInteger valueOf(String value) throws NumberFormatException {\n return valueOfUnchecked(rangeCheck(Long.parseLong(value)));\n }" ]
[ "def _ConvertInteger(value):\n \n if isinstance(value, float) and not value.is_integer():\n raise ParseError('Couldn\\'t parse integer: {0}.'.format(value))\n\n if isinstance(value, six.text_type) and value.find(' ') != -1:\n raise ParseError('Couldn\\'t parse integer: \"{0}\".'.format(value))\n\n return ...
codesearchnet
{ "query": "Represent the sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
L1 - PHP ARRAY LAYER @param string $namespace @param string $locale @param string $name @return string
[ "public function getContent(string $namespace, string $locale, string $name): string\n {\n $nKey = self::getNKey($namespace, $locale);\n\n // L1 read\n $content = $this->loadedData[$nKey][$name] ?? false;\n\n if (is_string($content)) {\n // L1 hit\n return $conte...
[ "static function init() {return dfcf(function() {\n\t\t$appId = S::s()->appId(); /** @var string|null $appId */\n\t\treturn !$appId ? '' : df_block_output(__CLASS__, 'init', ['appId' => $appId]);\n\t});}" ]
codesearchnet
{ "query": "Represent the Github comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
// Get implements backend.B.
[ "func (be *Backend) Get(c context.Context, configSet config.Set, path string, p backend.Params) (*config.Config, error) {\n\tsvc := be.GetConfigInterface(c, p.Authority)\n\n\tcfg, err := svc.GetConfig(c, configSet, path, !p.Content)\n\tif err != nil {\n\t\treturn nil, translateConfigErr(err)\n\t}\n\n\treturn makeIt...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the instruction about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
// GetProof returns the MerkleProof for a given Account
[ "func (self *StateDB) GetProof(a common.Address) ([][]byte, error) {\n\tvar proof proofList\n\terr := self.trie.Prove(crypto.Keccak256(a.Bytes()), 0, &proof)\n\treturn [][]byte(proof), err\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:", "pos": "Represent the code:", "neg": "Represent the code:" }
获取sessionid @param create 无sessionid是否自动创建 @return sessionid
[ "public String getSessionid(boolean create) {\r\n String sessionid = getCookie(SESSIONID_NAME, null);\r\n if (create && (sessionid == null || sessionid.isEmpty())) {\r\n sessionid = context.createSessionid();\r\n this.newsessionid = sessionid;\r\n }\r\n return sessi...
[ "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 comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Method invoked on the end of the successful updateAction before picking view.
[ "protected function afterUpdate()\n {\n $this->dispatcher->getEventsManager()->fire(Events::AFTER_UPDATE, $this);\n return $this->afterSave();\n }" ]
[ "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 comment about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
// SetJobStatus sets the JobStatus field's value.
[ "func (s *DominantLanguageDetectionJobFilter) SetJobStatus(v string) *DominantLanguageDetectionJobFilter {\n\ts.JobStatus = &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 Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
e.g. a: Hydroélectrique -> a: hydroelectric
[ "public static String stemmedInsensitiveGroupingKey(TermWord termWord) {\n\t\treturn StringUtils.replaceAccents(String.format(\n\t\t\t\tSTEMMED_INSENSITIVE_GKEY_FORMAT, \n\t\t\t\ttermWord.getSyntacticLabel(), \n\t\t\t\ttermWord.getWord().getStem()).toLowerCase());\n\t}" ]
[ "function writeTimeBound(type, prmname, boundType, outputType) {\n return utils.parts(type, {\n B : prmname,\n // TODO: is this correct?\n C : boundType+'_'+(type === 'QU' ? 'UBT' : 'LBT')+'(KAF)',\n E : '1MON'\n }, outputType);\n //A=HEXT2014 B=SR-CMN_SR-CMN C=STOR_UBT(KAF) E=1MON F=CAMANCHE R FLOOD...
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Fetch data @return array|false Data or false if not found.
[ "protected function fetchData() {\n $environment = $this->app->environment;\n $user = false;\n $password = false;\n\n /* If using PHP in CGI mode. */\n if (isset($_SERVER[$this->options[\"environment\"]])) {\n $matches = null;\n\n if (preg_match(\"/Basic\\s+(...
[ "private function getColumnFromName($name)\n {\n foreach ($this->columnConfiguration as $i => $col) {\n if ($col->getName() == $name) {\n return $col;\n }\n }\n\n // This exception should never happen. If it does, something is\n // wrong w/ the rel...
codesearchnet
{ "query": "Represent the Github instruction about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about Software development:" }
// newMqttSender - create new mqtt sender
[ "func newMqttSender(addr contract.Addressable, cert string, key string) sender {\n\tprotocol := strings.ToLower(addr.Protocol)\n\n\topts := MQTT.NewClientOptions()\n\tbroker := protocol + \"://\" + addr.Address + \":\" + strconv.Itoa(addr.Port) + addr.Path\n\topts.AddBroker(broker)\n\topts.SetClientID(addr.Publishe...
[ "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:" }
// ListRunning takes a list of Entities representing ActionReceivers and // returns all of the Actions that have are running on each of those // Entities.
[ "func (a *ActionAPI) ListRunning(arg params.Entities) (params.ActionsByReceivers, error) {\n\tif err := a.checkCanRead(); err != nil {\n\t\treturn params.ActionsByReceivers{}, errors.Trace(err)\n\t}\n\n\treturn a.internalList(arg, runningActions)\n}" ]
[ "protected void addPubSubOutputHandler(PubSubOutputHandler handler)\n {\n if (iPubSubOutputHandlers == null)\n iPubSubOutputHandlers = new HashSet();\n\n // Add the PubSubOutputHandler to the list that this neighbour\n // knows about. This is so a recovered neighbour can add the list of\n // outp...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Fire afterPersist events to the PersistableListener.
[ "protected void fireAfterPersist() {\n PersistableListener l = _listener;\n \n if(l != null) {\n try {\n l.afterPersist();\n } catch(Exception e) {\n _log.error(\"failure on calling afterPersist\", e);\n }\n }\n }" ]
[ "public H2StreamProcessor startNewInboundSession(Integer streamID) {\n H2StreamProcessor h2s = null;\n h2s = muxLink.createNewInboundLink(streamID);\n return h2s;\n // call the stream processor with the data it needs to then call \"ready\" are the underlying HttpInboundLink\n // (...
codesearchnet
{ "query": "Represent the Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// ValidateSpec validates Go chaincodes
[ "func (nodePlatform *Platform) ValidatePath(rawPath string) error {\n\tpath, err := url.Parse(rawPath)\n\tif err != nil || path == nil {\n\t\treturn fmt.Errorf(\"invalid path: %s\", err)\n\t}\n\n\t//Treat empty scheme as a local filesystem path\n\tif path.Scheme == \"\" {\n\t\tpathToCheck, err := filepath.Abs(rawPa...
[ "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 sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Writes bytes to the underlying RRD file on the disk @param offset Starting file offset @param b Bytes to be written.
[ "@Override\r\n\tprotected synchronized void write(long offset, byte[] b) throws IOException {\r\n\t\tif (byteBuffer != null) {\r\n\t\t\tbyteBuffer.position((int) offset);\r\n\t\t\tbyteBuffer.put(b);\r\n\t\t} else {\r\n\t\t\tthrow new IOException(\"Write failed, file \" + getPath() + \" not mapped for I/O\");\r\n\t\...
[ "private void refreshBuffer() throws IOException {\n if (output == null) {\n // We're writing to a single buffer.\n throw new OutOfSpaceException();\n }\n\n // Since we have an output stream, this is our buffer\n // and buffer offset == 0\n output.write(buffer, 0, position);\n position =...
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code about writing:" }
[getDsn description]. @return [type] [description]
[ "public function getDsn()\n {\n if (!$this->config) {\n return '';\n }\n $dsn = array();\n\n if ($this->config->getHost()) {\n $dsn[] = 'host='.$this->config->getHost();\n }\n\n if ($this->config->getPort()) {\n $dsn[] = 'port='.$this->co...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the summarization about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Offset Get @since 2.0.0 @param mixed $offset The offset form which retrieve the data. @return mixed The value at the passed offset
[ "public function offsetGet($offset)\n {\n if (! $this->offsetExists($offset)) {\n throw new \\OutOfBoundsException(\n sprintf(\n 'Key %s does not exists',\n $offset\n )\n );\n }\n\n return $this->data[$...
[ "function NDDBIndex(idx, nddb) {\n // The name of the index.\n this.idx = idx;\n // Reference to the whole nddb database.\n this.nddb = nddb;\n // Map indexed-item to a position in the original database.\n this.resolve = {};\n // List of all keys in `resolve` object....
codesearchnet
{ "query": "Represent the description about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
/* (non-Javadoc) @see javax.persistence.metamodel.ManagedType#getDeclaredSingularAttribute( java.lang.String, java.lang.Class)
[ "@Override\n public <Y> SingularAttribute<X, Y> getDeclaredSingularAttribute(String paramString, Class<Y> paramClass)\n {\n return getDeclaredSingularAttribute(paramString, paramClass, true);\n }" ]
[ "protected void checkTypeAdapter(@SuppressWarnings(\"rawtypes\") ModelEntity entity, TypeMirror propertyType, TypeAdapter typeAdapter, ModelAnnotation annotation) {\n\t\tTypeName sourceType = TypeUtility.typeName(TypeAdapterHelper.detectSourceType(entity.getElement(), typeAdapter.adapterClazz));\n\t\tTypeName uboxS...
codesearchnet
{ "query": "Represent the Github comment about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about Software development:" }
Move the evaluator to the next value. Skips values the User does not have access to. @return true, if successful @throws EFapsException on Error
[ "public boolean next()\n throws EFapsException\n {\n initialize(false);\n boolean stepForward = true;\n boolean ret = true;\n while (stepForward && ret) {\n ret = step(this.selection.getAllSelects());\n stepForward = !this.access.hasAccess(inst());\n ...
[ "@Override\n public boolean setProperty(String name, Object value)\n {\n /* Note: can not call local method, since it'll return false for\n * recognized but non-mutable properties\n */\n return mConfig.setProperty(name, value);\n }" ]
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
@author Vova Feldman (@svovaf) @since 1.2.2.7 @param bool $lowercase @return string
[ "function get_module_label( $lowercase = false ) {\r\n $label = $this->is_addon() ?\r\n $this->get_text_inline( 'Add-On', 'addon' ) :\r\n ( $this->is_plugin() ?\r\n $this->get_text_inline( 'Plugin', 'plugin' ) :\r\n $this->get_text_inlin...
[ "final protected function fc($k = null, $d = null) {return dfak(\n\t\t/** 2017-12-12 @todo Should we care of a custom `config_path` or not? https://mage2.pro/t/5148 */\n\t\tdf_config_field($this->getPath())->getData(), $k, $d\n\t);}" ]
codesearchnet
{ "query": "Represent the post about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Programming:" }
获取日线数据 :param symbol: :return: pd.dataFrame or None
[ "def daily(self, symbol=None):\n '''\n \n '''\n reader = TdxDailyBarReader()\n vipdoc = self.find_path(symbol=symbol, subdir='lday', ext='day')\n\n if vipdoc is not None:\n return reader.get_df(vipdoc)\n\n return None" ]
[ "def QA_fetch_index_day_adv(\n code,\n start, end=None,\n if_drop_index=True,\n # 🛠 todo collections 参数没有用到, 且数据库是固定的, 这个变量后期去掉\n collections=DATABASE.index_day):\n '''\n \n '''\n '获取指数日线'\n end = start if end is None else end\n start = str(start)[0:10]\n end...
codesearchnet
{ "query": "Represent the Github text about Software Engineering:", "pos": "Represent the Github code about Software Engineering:", "neg": "Represent the Github code:" }
Register a custom HTML macro. @param string $name @param callable $macro @return void
[ "public static function macro($name, $macro)\n {\n $html = self::getInstance()->html;\n $args = func_get_args();\n call_user_func_array(array($html, __FUNCTION__), $args);\n }" ]
[ "private function getFormOptionsDeclaration()\n {\n\n // we got a max instances allowed in normality tags\n $formOptions = json_encode( $this->formOptions );\n $formOptions = Php::varExport( $formOptions, true );\n\n $this->class->classComponents[] = new VariableDeclaration(\n ...
codesearchnet
{ "query": "Represent the instruction about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
İhale dünyasından gelen ili db ye ekle @param {string} _ilAdi @returns {Promise}
[ "function f_sehir_ekle(_ilAdi) {\r\n var defer = redis.dbQ.Q.defer();\r\n if (_ilAdi) {\r\n defer = db.sehir.f_db_sehir_ekle(/** @type {Sehir} */{Id: 0, Adi: _ilAdi});\r\n } else {\r\n defer.resolve(null);\r\n }\r\n return defer.promise;\r\n }" ]
[ "final protected function c() {return dfc($this, function() {/** @var int|null $id $id */return\n\t\t!($id = $this->o()->getCustomerId()) ? null : df_customer($id)\n\t;});}" ]
codesearchnet
{ "query": "Represent the summarization about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
//NewText 初始化文本消息
[ "func NewText(content string) *Text {\n\ttext := new(Text)\n\ttext.Content = content\n\treturn text\n}" ]
[ "protected static void fixResultByRule(List<Vertex> linkedArray)\n {\n\n //--------------------------------------------------------------------\n //Merge all seperate continue num into one number\n mergeContinueNumIntoOne(linkedArray);\n\n //-------------------------------------------...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about text processing:" }
Adds an listener to the underlying native EPStatement. @param listener the listener to add
[ "private void addEPStatementListener(UpdateListener listener) {\n\t\tif (this.subscriber == null) {\n\t\t\tif (epStatement != null) {\n\t\t\t\tepStatement.addListener(listener);\n\t\t\t}\n\t\t}\n\t}" ]
[ "@Override\n public void init(TCPWriteRequestContext x, H2MuxTCPWriteCallback c) {\n writeReqContext = x;\n muxCallback = c;\n\n // callback will need to know how to get back to this write queue.\n // This means one and only one H2WriteTree per H2InboundLink which has just one true TC...
codesearchnet
{ "query": "Represent the Github post about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Infers a schema based on the record. The column names are based on indexing. @param record the record to infer from @return the infered schema
[ "public static Schema infer(List<Writable> record) {\n Schema.Builder builder = new Schema.Builder();\n for (int i = 0; i < record.size(); i++) {\n if (record.get(i) instanceof DoubleWritable)\n builder.addColumnDouble(String.valueOf(i));\n else if (record.get(i) i...
[ "@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:" }
// Status is used for performing an HTTP check against a dependency; it satisfies // the "ICheckable" interface.
[ "func (h *HTTP) Status() (interface{}, error) {\n\tresp, err := h.do()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resp.Body.Close()\n\n\t// Check if StatusCode matches\n\tif resp.StatusCode != h.Config.StatusCode {\n\t\treturn nil, fmt.Errorf(\"Received status code '%v' does not match expected status cod...
[ "@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 description:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Parses a Lifx data packet (as a bytestring), returning into a Header object for the fields that are common to all data packets, and a bytestring of payload data for the type-specific fields (suitable for passing to `parse_payload`).
[ "def parse_packet(data, format=None):\n \n unpacked = struct.unpack(BASE_FORMAT, data[:_FORMAT_SIZE])\n psize, protocol, mac, gateway, time, ptype = unpacked\n header = Header(psize, protocol, mac, gateway, time, ptype)\n return header, data[_FORMAT_SIZE:]" ]
[ "def parse(self, root):\n \"\"\"\"\"\"\n #Use the first element in the versions list since there should only be one.\n v = _get_xml_version(root)[0]\n result = {}\n\n for child in root: \n if child.tag in self.versions[v].entries:\n entry = self.v...
codesearchnet
{ "query": "Represent the summarization about Data processing:", "pos": "Represent the code about Data processing:", "neg": "Represent the code about Software development:" }
// JoinOn appends join condition to the last join.
[ "func (q *Query) JoinOn(condition string, params ...interface{}) *Query {\n\tif q.joinAppendOn == nil {\n\t\tq.err(errors.New(\"pg: no joins to apply JoinOn\"))\n\t\treturn q\n\t}\n\tq.joinAppendOn(&condAppender{\n\t\tsep: \" AND \",\n\t\tcond: condition,\n\t\tparams: params,\n\t})\n\treturn q\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 sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
J[rows,col:(col+3)] = [a;b]*R
[ "private void addToJacobian(DMatrix tripplet, int col , double a[], double b[], DMatrixRMaj R ) {\n\t\tset(tripplet,jacRowX,col+0,a[0]*R.data[0] + a[1]*R.data[3] + a[2]*R.data[6]);\n\t\tset(tripplet,jacRowX,col+1,a[0]*R.data[1] + a[1]*R.data[4] + a[2]*R.data[7]);\n\t\tset(tripplet,jacRowX,col+2,a[0]*R.data[2] + a[1...
[ "def plogdet(K):\n \n \"\"\"\n egvals = eigvalsh(K)\n return npsum(log(egvals[egvals > epsilon]))" ]
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
Protected mixed $callback @return callable
[ "protected static function callback($callback)\n {\n if( is_string($callback) && ! is_callable($callback) )\n {\n return self::controllerCallback($callback);\n }\n\n return $callback;\n }" ]
[ "final protected function c() {return dfc($this, function() {/** @var int|null $id $id */return\n\t\t!($id = $this->o()->getCustomerId()) ? null : df_customer($id)\n\t;});}" ]
codesearchnet
{ "query": "Represent the Github sentence about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Get messages for an area @param string $area @return array
[ "public function get($area = '')\n {\n $area = $area ?: $this->workingArea ?: $this->defaultArea;\n $messages = (array)Session::get($this->id . '.' . $area);\n Session::clear($this->id . '.' . $area);\n $this->clearWorking();\n\n if ($this->unique) {\n $content = [];...
[ "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 post about PHP programming:", "pos": "Represent the code about PHP programming:", "neg": "Represent the code about programming:" }
Get all changed values.
[ "def _get_changes(self):\n ''''''\n result = dict( (f['id'], f.get('value','')) for f in self._data if f.get('changed', False) )\n self._clear_changes\n return result" ]
[ "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 instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
/* @return zero list @see com.oath.cyclops.react.collectors.lazy.LazyResultConsumer#getResults()
[ "@Override\n public Collection<FastFuture<T>> getResults() {\n active.stream()\n .forEach(cf -> safeJoin.apply(cf));\n active.clear();\n return new ArrayList<>();\n }" ]
[ "public <T> ListT<W,T> unit(final T unit) {\n return of(run.unit(ListX.of(unit)));\n }" ]
codesearchnet
{ "query": "Represent the Github comment about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Fake nearby preprocessor. We can put here the function to generate contours or nearby places. It must return a layer with a specific layer_purpose. :return: The output layer. :rtype: QgsMapLayer
[ "def fake_nearby_preprocessor(impact_function):\n \n _ = impact_function # NOQA\n from safe.test.utilities import load_test_vector_layer\n fake_layer = load_test_vector_layer(\n 'gisv4',\n 'impacts',\n 'building-points-classified-vector.geojson',\n clone_to_memory=True)\n ...
[ "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 comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
The parent container of all modals, this is where you initialze your modal. @return \Zend\View\Model\ViewModel
[ "public function renderToolTemplateModalContainerAction()\n {\n\n $melisKey = $this->params()->fromRoute('melisKey', '');\n\n // declare the Tool service that we will be using to completely create our tool.\n $melisTool = $this->getServiceLocator()->get('MelisCoreTool');\n\n // tell t...
[ "protected function configureFormer()\n {\n // Use Bootstrap 3\n Config::set('former.framework', 'TwitterBootstrap3');\n\n // Reduce the horizontal form's label width\n Config::set('former.TwitterBootstrap3.labelWidths', []);\n\n // Change Former's required field HTML\n ...
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
// NewPhraseQuery creates a new PhraseQuery.
[ "func NewPhraseQuery(terms ...string) *PhraseQuery {\n\tq := &PhraseQuery{newFtsQueryBase()}\n\tq.options[\"terms\"] = terms\n\treturn q\n}" ]
[ "@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 Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Ask if the user wishes to continue with the force flag enabled.
[ "private function force_prompt()\n {\n if ($this->force === false) {\n return;\n }\n\n $question = new ConfirmationQuestion(\n \"\\n<error>Force flag enabled. Any published files will overwrite target files if they exist.</error> \\n\\nContinue? \",\n false\n...
[ "func (r *controller) Update(ctx context.Context, t *api.Task) error {\n\t// TODO(stevvooe): While assignment of tasks is idempotent, we do allow\n\t// updates of metadata, such as labelling, as well as any other properties\n\t// that make sense.\n\treturn nil\n}" ]
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
Populate partial row. @param row the row @param entityMetadata the entity metadata @param entity the entity
[ "private void populatePartialRow(PartialRow row, EntityMetadata entityMetadata, Object entity)\n {\n MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata()\n .getMetamodel(entityMetadata.getPersistenceUnit());\n Class entityClazz = entityMetadata.getEntity...
[ "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 instruction about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code:" }
@private Respond to a command execution.
[ "function onCommand(cmd, args) {\n\n if(cmd === Constants.MAP.multi.name) {\n return this._abort(new Error('multi transaction cannot be nested'));\n }\n\n if(cmd === Constants.MAP.watch.name) {\n return this._abort(\n new Error('watch should be executed before a multi transaction'));\n }\n\n if(!thi...
[ "@Override\n public void generatePluginConfig(String serverName, File writeDirectory) {\n // Pass true to utilityRequest since this method will be called from the pluginUtility\n // or by the GeneratePluginConfigListener not by a call to the mbean.\n generatePluginConfig(null,serverName,true...
codesearchnet
{ "query": "Represent the Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
// Append appends the views in a vectorised view to this vectorised view.
[ "func (vv *VectorisedView) Append(vv2 VectorisedView) {\n\tvv.views = append(vv.views, vv2.views...)\n\tvv.size += vv2.size\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 comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Load/dump individual message fields :param msg: :param fields: :param field_archiver: :return:
[ "async def message_fields(self, msg, fields):\n \n for field in fields:\n try:\n self.tracker.push_field(field[0])\n await self.message_field(msg, field)\n self.tracker.pop()\n\n except Exception as e:\n raise helpers.Ar...
[ "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:" }
removeUser @param User $user @return self
[ "public function removeUser($user)\n {\n if ($this->getUsers()->contains($user))\n {\n $this->getUsers()->removeElement($user);\n $user->removeGroup($this);\n }\n return $this;\n }" ]
[ "final protected function c() {return dfc($this, function() {/** @var int|null $id $id */return\n\t\t!($id = $this->o()->getCustomerId()) ? null : df_customer($id)\n\t;});}" ]
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
polyline with more then 2 vertices
[ "def polyline(document, coords):\n\t\"\"\n\tpoints = []\n\tfor i in range(0, len(coords), 2):\n\t\tpoints.append(\"%s,%s\" % (coords[i], coords[i+1]))\n\t\n\treturn setattribs(\n\t\tdocument.createElement('polyline'),\n\t\tpoints = ' '.join(points),\n\t)" ]
[ "def transform_cb(self, setting, value):\n \"\"\"\"\"\"\n self.make_callback('transform')\n\n # whence=0 because need to calculate new extents for proper\n # cutout for rotation (TODO: always make extents consider\n # room for rotation)\n whence = 0\n self.redraw(wh...
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code:" }
Get the current database connection @return rcube_db Database object
[ "public function get_dbh()\n {\n if (!$this->db) {\n $this->db = rcube_db::factory(\n $this->config->get('db_dsnw'),\n $this->config->get('db_dsnr'),\n $this->config->get('db_persistent')\n );\n\n $this->db->set_debug((bool)$thi...
[ "@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 text about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code about Programming:" }
// skipReview returns true if the request was satisfied by the lastKnown
[ "func skipReview(request *reviewRequest, lastKnownValue *reviewRecord) bool {\n\n\t// if your request is nil, you have no reason to make a review\n\tif request == nil {\n\t\treturn true\n\t}\n\n\t// if you know nothing from a prior review, you better make a request\n\tif lastKnownValue == nil {\n\t\treturn false\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 post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Return loaded AuthenticationType with the given handle. @param string $atHandle authenticationType handle @throws \Exception when an invalid handle is provided @return AuthenticationType
[ "public static function getByHandle($atHandle)\n {\n $db = Loader::db();\n $row = $db->GetRow('SELECT * FROM AuthenticationTypes WHERE authTypeHandle=?', [$atHandle]);\n if (!$row) {\n throw new Exception(t('Invalid Authentication Type Handle'));\n }\n $at = self::lo...
[ "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 text about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }
Return aggregated status. @param ExtendedFileInterface $file @return int
[ "public function getStatus(ExtendedFileInterface $file)\n {\n $status = 0;\n foreach ($this->findStatusByFile($file) as $fileStatus) {\n $status |= (int) $fileStatus;\n }\n\n return $status;\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:" }
Implement write of Writable
[ "public void write(DataOutput out) throws IOException {\n out.writeLong(blockId);\n out.writeLong(blockGenStamp);\n super.write(out);\n }" ]
[ "def property_(getter: Map[Domain, Range]) -> property:\n \n return property(map_(WeakKeyDictionary())(getter))" ]
codesearchnet
{ "query": "Represent the comment:", "pos": "Represent the code:", "neg": "Represent the code:" }
Return a tuple of DIMACS CNF clause literals.
[ "def _lits(lexer, varname, nvars):\n \"\"\"\"\"\"\n tok = _expect_token(lexer, {OP_not, IntegerToken})\n if isinstance(tok, IntegerToken) and tok.value == 0:\n return tuple()\n else:\n if isinstance(tok, OP_not):\n neg = True\n tok = _expect_token(lexer, {IntegerToken...
[ "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 comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Returns the name of the currently logged in user's personal workspace (even if that might not exist at that time). If no user is logged in this method returns null. @return string @api
[ "public function getPersonalWorkspaceName()\n {\n $currentUser = $this->userDomainService->getCurrentUser();\n\n if (!$currentUser instanceof User) {\n return null;\n }\n\n $username = $this->userDomainService->getUsername($currentUser);\n return ($username === null ...
[ "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 Workspace management:", "pos": "Represent the code about Workspace management:", "neg": "Represent the code about Software development:" }
Removes whitespace from json strings, returning the string
[ "def json_minify(string, strip_space=True): # pragma: no cover\n \n in_string = False\n in_multi = False\n in_single = False\n\n new_str = []\n index = 0\n\n for match in re.finditer(TOKENIZER, string):\n\n if not (in_multi or in_single):\n tmp = string[index:match.start()]\n ...
[ "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 Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Returns a byte array representing prefix of a queue. The prefix is formed by first two bytes of MD5 of the queue name followed by the queue name.
[ "public static byte[] getQueueRowPrefix(QueueName queueName) {\n if (queueName.isStream()) {\n // NOTE: stream is uniquely identified by table name\n return Bytes.EMPTY_BYTE_ARRAY;\n }\n String flowlet = queueName.getThirdComponent();\n String output = queueName.getSimpleName();\n byte[] id...
[ "def delete_node_storage(node)\n return if node == BLANK_NODE\n raise ArgumentError, \"node must be Array or BLANK_NODE\" unless node.instance_of?(Array)\n\n encoded = encode_node node\n return if encoded.size < 32\n\n # FIXME: in current trie implementation two nodes can share identical\n ...
codesearchnet
{ "query": "Represent the comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Software development:" }
Check MySQL version @throws Exception
[ "public function checkServerVersion()\n {\n $serverVersion = $this->getServerVersion();\n $requiredVersion = Config::getInstance()->General['minimum_mysql_version'];\n\n if (version_compare($serverVersion, $requiredVersion) === -1) {\n throw new Exception(Piwik::translate('Gener...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code:" }
Creates a new Proxy instance @param name JNDI name of the object to be lazily looked up @param objectType object type @param <T> typed parameter @return Proxy object
[ "@SuppressWarnings(\"unchecked\")\n public static <T> T newInstance(String name, Class<?> objectType) {\n return (T) Proxy.newProxyInstance(\n ClassLoaderUtils.getClassLoader(),\n new Class[]{objectType},\n new LazyJndiResolver(name));\n }" ]
[ "static WebServiceRef createWebServiceRefFromResource(Resource resource, Class<?> typeClass, String jndiName) throws InjectionException {\n // notice we send in 'Service.class' for the 'value' attribute, this is\n // because only service type injections are possible with the @Resource\n // anno...
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
// Add an error as single field to the log entry. All it does is call // `WithError` for the given `error`.
[ "func (logger *Logger) WithError(err error) *Entry {\n\tentry := logger.newEntry()\n\tdefer logger.releaseEntry(entry)\n\treturn entry.WithError(err)\n}" ]
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the Github instruction about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
// flushSignal will use server to queue the flush IO operation to a pool of flushers. // Lock must be held.
[ "func (c *client) flushSignal() bool {\n\tif c.out.sgw {\n\t\tc.out.sg.Signal()\n\t\treturn true\n\t}\n\treturn false\n}" ]
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the Github sentence about Technology:", "pos": "Represent the Github code about Technology:", "neg": "Represent the Github code about programming:" }
Returns true if the given element exists in the given array; false otherwise.
[ "private boolean existsIn(String element, String[] a) {\n for (String s : a) {\n if (element.equals(s)) {\n return true;\n }\n }\n return false;\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 summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Notifies listeners on drawing finishing.
[ "protected void fireDrawingEnd() {\n\t\tfinal ListenerCollection<EventListener> list = this.listeners;\n\t\tif (list != null) {\n\t\t\tfor (final DrawingListener listener : list.getListeners(DrawingListener.class)) {\n\t\t\t\tlistener.onDrawingEnd();\n\t\t\t}\n\t\t}\n\t}" ]
[ "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 sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Returns all active plugins. @return list of loaded plugins.
[ "public List<MoskitoPlugin> getPlugins() {\n\t\tArrayList<MoskitoPlugin> ret = new ArrayList<MoskitoPlugin>(plugins.values());\n\t\treturn ret;\n\t}" ]
[ "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 Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
Reset the specification. @return Expectation
[ "public function reset()\n {\n $this->_passed = null;\n $this->_expectations = [];\n $this->_log = new Log([\n 'block' => $this,\n 'backtrace' => $this->_backtrace\n ]);\n return $this;\n }" ]
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github description about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Filters the preferred editor from the list of all available editors.<p> @param preferredEditor the preferred editor identification String @return the preferred editor configuration object or null, if none is found
[ "private CmsWorkplaceEditorConfiguration filterPreferredEditor(String preferredEditor) {\n\n if (m_preferredEditors.size() == 0) {\n Iterator<CmsWorkplaceEditorConfiguration> i = m_editorConfigurations.iterator();\n while (i.hasNext()) {\n CmsWorkplaceEditorConfiguration ...
[ "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 comment about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Add a validator the form element @param mixed $validator @throws Exception @return AbstractElement
[ "public function addValidator($validator)\n {\n if (!($validator instanceof \\Pop\\Validator\\AbstractValidator) && !is_callable($validator)) {\n throw new Exception('Error: The validator must be an instance of Pop\\Validator\\AbstractValidator or a callable object.');\n }\n $this...
[ "protected final function AddCssClassField()\n {\n $name = 'CssClass';\n $this->AddField(Input::Text($name, $this->Content()->GetCssClass()), false, Trans(\"Core.ContentForm.$name\"));\n }" ]
codesearchnet
{ "query": "Represent the comment about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
// SetWorkflowExecution sets the WorkflowExecution field's value.
[ "func (s *ExternalWorkflowExecutionCancelRequestedEventAttributes) SetWorkflowExecution(v *WorkflowExecution) *ExternalWorkflowExecutionCancelRequestedEventAttributes {\n\ts.WorkflowExecution = 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 sentence about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
// SetFunctionArn sets the FunctionArn field's value.
[ "func (s *LambdaAction) SetFunctionArn(v string) *LambdaAction {\n\ts.FunctionArn = &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 instruction about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Retrieves a resource by its URI Args: uri: URI of the resource Returns: Resource object
[ "def get_by_uri(self, uri):\n \n self._helper.validate_resource_uri(uri)\n data = self._helper.do_get(uri)\n\n if data:\n new_resource = self.new(self._connection, data)\n else:\n new_resource = None\n\n return new_resource" ]
[ "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 instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Software development:" }
为指定的页面返回地址值 @param int $pageno @return string $url
[ "protected function _get_url($pageno = 1)\n {\n if (empty($this->page_tpl))\n {\n return Tool::url_merge('page', $pageno, 'mvc,q');\n }\n else\n {\n return str_replace('{page}', $pageno, $this->page_tpl);\n }\n }" ]
[ "public static SqlInfo getSqlInfoSimply(String nsAtZealotId, Object paramObj) {\n String[] arr = nsAtZealotId.split(ZealotConst.SP_AT);\n if (arr.length != LEN) {\n throw new ValidFailException(\"nsAtZealotId参数的值必须是xml文件中的 nameSpace + '@@' + zealotId 节点的值,\"\n + \"如:'stu...
codesearchnet
{ "query": "Represent the summarization about text processing:", "pos": "Represent the code about text processing:", "neg": "Represent the code about Software Development:" }
@param ServerRequestInterface $request @return ResponseInterface
[ "public function updateAnalytics(ServerRequestInterface $request): ResponseInterface\n {\n $modules = $this->module_service->findByInterface(ModuleAnalyticsInterface::class, true);\n\n $this->updateStatus($modules, $request);\n\n return redirect(route('analytics'));\n }" ]
[ "@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 post about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Sets max depth. @param maxDepth the max depth @return the max depth
[ "@javax.annotation.Nonnull\n public com.simiacryptus.util.data.DensityTree setMaxDepth(int maxDepth) {\n this.maxDepth = maxDepth;\n return this;\n }" ]
[ "def transform_cb(self, setting, value):\n \"\"\"\"\"\"\n self.make_callback('transform')\n\n # whence=0 because need to calculate new extents for proper\n # cutout for rotation (TODO: always make extents consider\n # room for rotation)\n whence = 0\n self.redraw(wh...
codesearchnet
{ "query": "Represent the Github comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Attemps to register a post type. @link https://codex.wordpress.org/Function_Reference/register_post_type @return object Returns the result of register_post_type()
[ "function register()\n {\n // Ensure the default options have been set.\n $customizedOptions = $this->model->getConfiguration() + array(\n 'labels' => array(),\n 'supports' => array('title', 'editor'),\n 'hierarchical' => false,\n ...
[ "public static function add_route( $route, $callback, $args = array() ) {\n\t\tHelper::warn('Timber::add_route (and accompanying methods for load_view, etc. Have been deprecated and will soon be removed. Please update your theme with Route::map. You can read more in the 1.0 Upgrade Guide: https://timber.github.io/d...
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
Initialize the access log. Use $this->accesslog to access afterwards @return \Gems_AccessLog
[ "protected function _initAccesslog()\n {\n $this->bootstrap(array('cache', 'db', 'loader'));\n\n $accesslog = $this->createProjectClass('AccessLog', $this->cache, $this->db, $this->loader);\n\n return $accesslog;\n }" ]
[ "public function init()\n {\n $this->response->disableLayout();\n $this->userStore = b8\\Store\\Factory::getStore('User');\n }" ]
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// ReadCommand reads the next command.
[ "func (rd *Reader) ReadCommand() (Command, error) {\n\tif len(rd.cmds) > 0 {\n\t\tcmd := rd.cmds[0]\n\t\trd.cmds = rd.cmds[1:]\n\t\treturn cmd, nil\n\t}\n\tcmds, err := rd.readCommands(nil)\n\tif err != nil {\n\t\treturn Command{}, err\n\t}\n\trd.cmds = cmds\n\treturn rd.ReadCommand()\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:" }
Authenticate to a server using SASL plain, or does so on connection. Args: name (str): Name to auth with. password (str): Password to auth with. identity (str): Identity to auth with (defaults to name).
[ "def sasl_plain(self, name, password, identity=None):\n \n if identity is None:\n identity = name\n\n self.sasl('plain', name, password, identity)" ]
[ "def authentication_validation(username, password, access_token):\n '''\n \n '''\n if bool(username) is not bool(password):\n raise Exception(\"Basic authentication requires a username AND\"\n \" password.\")\n if (username and access_token) or (password and access_token...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Process flatfile. @param progress_trace $trace @return bool true if any data processed, false if not
[ "protected function process_file(progress_trace $trace) {\n global $CFG, $DB;\n\n // We may need more memory here.\n core_php_time_limit::raise();\n raise_memory_limit(MEMORY_HUGE);\n\n $filelocation = $this->get_config('location');\n if (empty($filelocation)) {\n ...
[ "def finish_parse(self, last_lineno_seen):\n \"\"\"\"\"\"\n if self.state == self.STATES['step_in_progress']:\n # We've reached the end of the log without seeing the final \"step finish\"\n # marker, which would normally have triggered updating the step. As such we\n #...
codesearchnet
{ "query": "Represent the Github text about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
Generic method used to create a field map from a block of data. @param data field map data
[ "private void createFieldMap(byte[] data)\n {\n int index = 0;\n int lastDataBlockOffset = 0;\n int dataBlockIndex = 0;\n\n while (index < data.length)\n {\n long mask = MPPUtility.getInt(data, index + 0);\n //mask = mask << 4;\n\n int dataBlockOffset = MPPUtility....
[ "public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }" ]
codesearchnet
{ "query": "Represent the Github comment about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
Validates that the collection naming is correct, based on entity format config. @param EntityMetadata $metadata @throws MetadataException
[ "private function validateCollectionNaming(EntityMetadata $metadata)\n {\n $persistence = $metadata->persistence;\n if (false === $this->entityUtil->isEntityTypeValid($persistence->collection)) {\n throw MetadataException::invalidMetadata(\n $metadata->type,\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 text about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about File management:" }
// SetCommitment sets the Commitment field's value.
[ "func (s *ReservationPlan) SetCommitment(v string) *ReservationPlan {\n\ts.Commitment = &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 instruction about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
// stateNeg is the state after reading `-` during a number.
[ "func stateNeg(s *scanner, c int) int {\n\tif c == '0' {\n\t\ts.step = state0\n\t\treturn scanContinue\n\t}\n\tif '1' <= c && c <= '9' {\n\t\ts.step = state1\n\t\treturn scanContinue\n\t}\n\treturn s.error(c, \"in numeric literal\")\n}" ]
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Generate shared s3 application bucket name. Args: include_region (bool): Include region in the name generation.
[ "def shared_s3_app_bucket(self, include_region=False):\n \n if include_region:\n shared_s3_app_bucket = self.format['shared_s3_app_region_bucket'].format(**self.data)\n else:\n shared_s3_app_bucket = self.format['shared_s3_app_bucket'].format(**self.data)\n return s...
[ "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 text:", "pos": "Represent the code:", "neg": "Represent the code about AWS S3:" }
// sqrt3 sets z to sqrt(3) and returns z.
[ "func sqrt3(z *decimal.Big, ctx decimal.Context) *decimal.Big {\n\tif ctx.Precision <= constPrec {\n\t\treturn ctx.Set(z, _Sqrt3)\n\t}\n\t// TODO(eric): get rid of this allocation.\n\treturn ctx.Set(z, Sqrt(decimal.WithContext(ctx), three))\n}" ]
[ "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 Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Natural Language Processing:" }
// GetChange mocks base method
[ "func (m *MockGerritServer) GetChange(arg0 context.Context, arg1 *GetChangeRequest) (*ChangeInfo, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetChange\", arg0, arg1)\n\tret0, _ := ret[0].(*ChangeInfo)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}" ]
[ "@Override\n public void generatePluginConfig(String serverName, File writeDirectory) {\n // Pass true to utilityRequest since this method will be called from the pluginUtility\n // or by the GeneratePluginConfigListener not by a call to the mbean.\n generatePluginConfig(null,serverName,true...
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Creates validator function assessing all defined attributes of a model. @param {object<string,object>} attributes definition of essential attributes @returns {function():Error[]} concatenated implementation of all defined attributes' validation handlers
[ "function compileValidator( attributes ) {\n\tif ( !attributes || typeof attributes !== \"object\" || Array.isArray( attributes ) ) {\n\t\tthrow new TypeError( \"definition of attributes must be object\" );\n\t}\n\n\tconst attributeNames = Object.keys( attributes );\n\tconst numAttributes = attributeNames.length;\n...
[ "def values(*rels):\n '''\n \n '''\n #Action function generator to multiplex a relationship at processing time\n def _values(ctx):\n '''\n Versa action function Utility to specify a list of relationships\n\n :param ctx: Versa context used in processing (e.g. includes the prototyp...
codesearchnet
{ "query": "Represent the Github text about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Send a Bokeh Server protocol message to the connected client. Args: message (Message) : a message to send
[ "def send_message(self, message):\n ''' \n\n '''\n try:\n if _message_test_port is not None:\n _message_test_port.sent.append(message)\n yield message.send(self)\n except (WebSocketClosedError, StreamClosedError): # Tornado 4.x may raise StreamClosedE...
[ "function (request) {\n // Extract information from request. The toString() call converts the\n // payload from a binary Buffer into a string, decoded using UTF-8\n // character encoding.\n console.log('Service received request payload: ' +\n request.payload.toString())\n // Create ...
codesearchnet
{ "query": "Represent the instruction about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Returns <code>true</code> if any column definition contains a single action.<p> @return <code>true</code> if any column definition contains a single action
[ "public boolean hasSingleActions() {\n\n Iterator<CmsListColumnDefinition> itCols = m_columns.elementList().iterator();\n while (itCols.hasNext()) {\n CmsListColumnDefinition col = itCols.next();\n if (!col.getDefaultActions().isEmpty() || !col.getDirectActions().isEmpty()) {\n ...
[ "public void required(String tagName, String actionName, String attributeName, Object attribute) throws ApplicationException {\n\tif (attribute == null)\n\t throw new ApplicationException(\"Attribute [\" + attributeName + \"] for tag [\" + tagName + \"] is required if attribute action has the value [\" + actionN...
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
@param int $loc location of the T_USE token @return array|null [string|null $alias, string $namespace] @throws \OutOfBoundsException
[ "private function parseUse($loc): ?array\n {\n // Parse FQCN\n $tokens = $this->getTokenStream();\n $loc = $tokens->next($loc);\n $use = $this->parseNamespace($loc);\n $alias = null; // default array index of PHP\n\n // Parse alias\n $loc = $tokens->next($l...
[ "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 post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }