query
stringlengths
16
255
pos
list
neg
list
task
stringclasses
1 value
instruction
dict
USAGE: color-lighten(@neutral, 50);
[ "function getColorLightenFunction(less) {\n\n function rgba() {\n var rgbaFunc = less.functions.functionRegistry.get(\"rgba\");\n return rgbaFunc.apply(null, arguments);\n }\n\n return function (color, amount) {\n var baseRGB = [255, 255, 255];\n var value = amount.value / 100;\n\n if (value < 0) ...
[ "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 post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Return a label to display for a field
[ "def get_field_label(self, field_name, field=None):\n \n label = None\n if field is not None:\n label = getattr(field, 'verbose_name', None)\n if label is None:\n label = getattr(field, 'name', None)\n if label is None:\n label = field_name...
[ "def _get_generic_schema(self):\n \n schema = Schema(\n vid=ID(stored=True, unique=True), # Object id\n title=NGRAMWORDS(),\n keywords=KEYWORD, # Lists of coverage identifiers, ISO time values and GVIDs, source names, source abbrev\n doc=TEXT) # Generated...
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
@param MockConfig $expectation @return bool
[ "private function isExpectedScenarioState(MockConfig $expectation)\n {\n if ($expectation->getRequest()->hasScenarioState()) {\n $this->checkScenarioNameOrThrowException($expectation);\n $this->logger->debug('Checking scenario state again expectation');\n $scenarioState = ...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Block Record @alias module:wallet.BlockRecord @constructor @param {Hash} hash @param {Number} height @param {Number} time
[ "function BlockRecord(hash, height, time) {\n if (!(this instanceof BlockRecord))\n return new BlockRecord(hash, height, time);\n\n this.hash = hash || encoding.NULL_HASH;\n this.height = height != null ? height : -1;\n this.time = time || 0;\n this.hashes = [];\n this.index = new Set();\n}" ]
[ "function (state) {\n // console.log(JSON.stringify(state, false, 2));\n let env = state.pointers[state.head];\n let specific = '';\n let faked = '';\n\n if(env.type === 'internal') {\n let dHeight = env.meta.height - env.forkRoot;\n specific = `fork root: ${env.forkRoot}\nheight: +${dHeigh...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about Blockchain:" }
Utility function for raising a werkzeug.exceptions.NotFound execption with the supplied WSGI environment and message. :param dict environ: The WSGI environment dictionary for the request :param str msg: The error message
[ "def raise_not_found(self, environ, msg):\n \n raise NotFound(response=self.rewriterapp._error_response(environ, msg))" ]
[ "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 instruction about Natural Language Processing:", "pos": "Represent the code about Natural Language Processing:", "neg": "Represent the code:" }
Parses samples, specified in either a manifest or listed with --samples :param str path_to_manifest: Path to configuration file :return: Samples and their attributes as defined in the manifest :rtype: list[list]
[ "def parse_manifest(path_to_manifest):\n \n samples = []\n with open(path_to_manifest, 'r') as f:\n for line in f.readlines():\n if not line.isspace() and not line.startswith('#'):\n sample = line.strip().split('\\t')\n require(len(sample) == 3, 'Bad manifest...
[ "def run_objective(objective, _name, raw_output, output_files, threads)\n # output is a, array: [raw_output, output_files].\n # output_files is a hash containing the absolute paths\n # to file(s) output by the target in the format expected by the\n # objective function(s), with keys as the keys ...
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Document height @method docHeight @return {Number} The current height of the document.
[ "function(node) {\n var h = Y_DOM._getDocSize(node).height;\n return Math.max(h, Y_DOM._getWinSize(node).height);\n }" ]
[ "function get_margin_width()\n {\n //ignore image width, use same width as on predefined bullet ListBullet\n //for proper alignment of bullet image and text. Allow image to not fitting on left border.\n //This controls the extra indentation of text to make room for the bullet image.\n ...
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// SetKeyId sets the KeyId field's value.
[ "func (s *StreamDescription) SetKeyId(v string) *StreamDescription {\n\ts.KeyId = &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 description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
A JSON serializable dict representation of self.
[ "def as_dict(self):\n \n return {\"@module\": self.__class__.__module__,\n \"@class\": self.__class__.__name__,\n \"operation\": self.operation, \"title\": self.title,\n \"xc\": self.xc.as_dict(), \"basis_set\": self.basis_set.as_dict(),\n \"...
[ "def build(self):\n \"\"\"\"\"\"\n from ambry.orm.config import BuildConfigGroupAccessor\n\n # It is a lightweight object, so no need to cache\n return BuildConfigGroupAccessor(self.dataset, 'buildstate', self._session)" ]
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Приводит в порядок порядковые номера материалов раздела: удаляет дубликаты, дыры в нумерации. @internal @return void
[ "public function fixMaterialTags() {\n \t$r = self::getDbConnection()->fetchAll('SELECT count(tag) as cnt from '.$this->materialsTable.' where idcat='.$this->prototype->id.' group by tag having cnt>1');\n \tif (!count($r)) return;\n \t$i = 100;\n \t$r = self::getDbConnection()->query('SELECT id FROM '.$...
[ "private function processA(array $result) {\n\t\ttry {\n\t\t\t$result = $this->processI($result);\n\t\t}\n\t\t/**\n\t\t * 2016-08-02\n\t\t * Исключительная ситуация может быть не только типа @see \\Df\\Core\\Exception,\n\t\t * но и типа @see \\Exception,\n\t\t * потому что чтение некорректных данных может приводить...
codesearchnet
{ "query": "Represent the sentence about software development:", "pos": "Represent the code about software development:", "neg": "Represent the code about Programming:" }
@param string|string[] $question @param string[] $choices @param string $default @param InputInterface $input @param OutputInterface $output @return string|null
[ "private function choice($question, array $choices, $default, InputInterface $input, OutputInterface $output)\n {\n $helper = new QuestionHelper();\n\n $result = $helper->ask($input, $output, new ChoiceQuestion(\n $question,\n $choices,\n $choices[$default]\n ...
[ "public static function ExpectRetrievedValueIsArray(\n string $property,\n $value,\n string $class_name\n ) : array {\n /**\n * @psalm-var T\n */\n $value = static::MaybeThrowIfNotType($property, $value, $class_name, 'array');\n\n return $value;\n }" ]
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Software development:" }
/*! Returns the meta data used for storing search indeces.
[ "function metaData( $contentObjectAttribute )\n {\n $matrix = $contentObjectAttribute->content();\n $columnsArray = $matrix->attribute( 'columns' );\n $columns = $columnsArray['sequential'];\n $metaDataArray = array();\n foreach ( $columns as $column )\n {\n $...
[ "def _get_generic_schema(self):\n \n schema = Schema(\n vid=ID(stored=True, unique=True), # Object id\n title=NGRAMWORDS(),\n keywords=KEYWORD, # Lists of coverage identifiers, ISO time values and GVIDs, source names, source abbrev\n doc=TEXT) # Generated...
codesearchnet
{ "query": "Represent the Github text about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
PersistenceDelegate.initialize()
[ "protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out)\n {\n //\n // Get the bean and associated beanInfo for the source instance\n //\n ControlBean control = (ControlBean)oldInstance;\n BeanInfo beanInfo;\n try\n {\n ...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
This preInvoke is called during init & during destroy of a Servlet class object. It will call the other preInvoke to ensure delegation occurs. {@inheritDoc}
[ "@Override\n public Object preInvoke(String servletName) throws SecurityViolationException, IOException {\n // preInvoke will ensure delegation is done when run-as is specified\n return preInvoke(null, null, servletName, true);\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 description:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
// ItemByID by returns the file's Item of a given ID. // If the ID is known, the returned error is ErrUnknownItem.
[ "func (f *File) ItemByID(id uint32) (*Item, error) {\n\tmeta, err := f.getMeta()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tit := &Item{\n\t\tf: f,\n\t\tID: id,\n\t}\n\tif meta.ItemLocation != nil {\n\t\tfor _, ilbe := range meta.ItemLocation.Items {\n\t\t\tif uint32(ilbe.ItemID) == id {\n\t\t\t\tshallowCopy ...
[ "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 description about File management:", "pos": "Represent the code about File management:", "neg": "Represent the code about programming:" }
Iterates through the tasks setting the correct outline level and ID values. @param id current ID value @param task current task @param outlineLevel current outline level @return next ID value
[ "private int updateStructure(int id, Task task, Integer outlineLevel)\n {\n task.setID(Integer.valueOf(id++));\n task.setOutlineLevel(outlineLevel);\n outlineLevel = Integer.valueOf(outlineLevel.intValue() + 1);\n for (Task childTask : task.getChildTasks())\n {\n id = updateStruct...
[ "function(c, i, array) {\n if (c === undefined || c === null) return;\n // c is the component, type is dimension|attribute,\n // level is dataset|series|observation, i is index,\n // array is the component array\n failed += !iterator.call(context, c, type, level, i, array);\n }" ]
codesearchnet
{ "query": "Represent the sentence about Work management:", "pos": "Represent the code about Work management:", "neg": "Represent the code about programming:" }
// Unlink removes a large object from the database.
[ "func (o *LargeObjects) Unlink(oid pgtype.OID) error {\n\t_, err := o.fp.CallFn(\"lo_unlink\", []fpArg{fpIntArg(int32(oid))})\n\treturn 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 comment about Technology:", "pos": "Represent the Github code about Technology:", "neg": "Represent the Github code:" }
What Facebook uses to define the url in a batch
[ "@JsonProperty(\"relative_url\")\n\tpublic String getRelativeURL() {\n\t\tStringBuilder bld = new StringBuilder();\n\t\tbld.append(this.object);\n\t\t\n\t\tParam[] params = this.getParams();\n\t\t\n\t\tif (params != null && params.length > 0) {\n\t\t\tbld.append('?');\n\t\t\tboolean afterFirst = false;\n\t\t\t\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 summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
// Initialize a new storage disk.
[ "func newPosix(path string) (*posix, error) {\n\tvar err error\n\tif path, err = getValidPath(path); err != nil {\n\t\treturn nil, err\n\t}\n\tfi, err := os.Stat(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tp := &posix{\n\t\tconnected: true,\n\t\tdiskPath: path,\n\t\t// 4MiB buffer pool for posix internal...
[ "@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 sentence about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code about programming:" }
fast counting to the lines of a given filename through only reading out a limited buffer
[ "def countLines(filename, buf_size=1048576):\n \n f = open(filename)\n try:\n lines = 1\n read_f = f.read # loop optimization\n buf = read_f(buf_size)\n # Empty file\n if not buf:\n return 0\n while buf:\n lines += buf.count('\\n')\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 post:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Natural Language Processing:" }
Return the version before the given version. @param string $from
[ "public function getPreviousVersion($from)\n {\n $lastTimestamp = 0;\n foreach (array_keys($this->versions) as $timestamp) {\n if ($timestamp == $from) {\n return $lastTimestamp;\n }\n $lastTimestamp = $timestamp;\n }\n\n return 0;\n ...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github comment about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "public EClass getBLN() {\n\t\tif (blnEClass == null) {\n\t\t\tblnEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(324);\n\t\t}\n\t\treturn blnEClass;\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 summarization about Text generation:", "pos": "Represent the Github code about Text generation:", "neg": "Represent the Github code:" }
find files matching a shell-style pattern
[ "def runGlob(self, path, **kwargs):\n \n def commandComplete(cmd):\n return cmd.updates['files'][-1]\n\n return self.runRemoteCommand('glob', {'path': path,\n 'logEnviron': self.logEnviron, },\n evaluate...
[ "def _glob_to_re(self, pattern):\n \n pattern_re = fnmatch.translate(pattern)\n\n # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which\n # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix,\n # and by extension they shouldn't match such \"specia...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Check if a directory should be considered in the walk.
[ "def _check_open_dir(self, fs, path, info):\n # type: (FS, Text, Info) -> bool\n \n if self.exclude_dirs is not None and fs.match(self.exclude_dirs, info.name):\n return False\n if self.filter_dirs is not None and not fs.match(self.filter_dirs, info.name):\n return ...
[ "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 sentence:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Sets a list of observer events that will be logged if verbose output is enabled. @param string $observerEvents List of observer events
[ "public function setObserverEvents($observerEvents)\n {\n $this->observerEvents = [];\n\n $token = ' ,;';\n $ext = strtok($observerEvents, $token);\n\n while ($ext !== false) {\n $this->observerEvents[] = $ext;\n $ext = strtok($token);\n }\n }" ]
[ "function makeEventDispatcher(obj) {\n $.extend(obj, {\n on: on,\n off: off,\n one: one,\n trigger: trigger,\n _EventDispatcher: true\n });\n // Later, on() may add _eventHandlers: Object.<string, Array.<{event:string, namespace:?string,\n ...
codesearchnet
{ "query": "Represent the comment about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }
Check if proxy is still initialized
[ "def homegearCheckInit(self, remote):\n \"\"\"\"\"\"\n rdict = self.remotes.get(remote)\n if not rdict:\n return False\n if rdict.get('type') != BACKEND_HOMEGEAR:\n return False\n try:\n interface_id = \"%s-%s\" % (self._interface_id, remote)\n ...
[ "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 Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
// Job instantiates a Transfer job from the TransferConfig struct
[ "func (t *TransferConfig) Job() (*storagetransfer.TransferJob, error) {\n\tif t.DestBucket == \"\" || t.Src == nil {\n\t\treturn nil, ErrBadConfig\n\t}\n\n\t// Google returns an error if more than 20 inclusionary/exclusionary fields are included\n\tif len(t.IncludePrefixes) > MaxPrefix || len(t.ExcludePrefixes) > M...
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
// Run implements Command.Run.
[ "func (c *deleteImageMetadataCommand) Run(ctx *cmd.Context) (err error) {\n\tapi, err := c.newAPIFunc()\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer api.Close()\n\n\terr = api.Delete(c.ImageId)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\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 Github description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
// NewAroonOscForStream creates an Aroon Oscillator (AroonOsc) for online usage with a source data stream
[ "func NewAroonOscForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int) (indicator *AroonOsc, err error) {\n\tind, err := NewAroonOsc(timePeriod)\n\tpriceStream.AddTickSubscription(ind)\n\treturn ind, 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 summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Retrieves additional HTML attributes as a string ready for inclusion in markup. @param array $attributes Required. @return string
[ "protected function get_html_attributes( array $attributes ) {\n\t\t$html_attributes = '';\n\t\tif ( ! empty( $attributes ) ) {\n\t\t\tforeach ( $attributes as $attr => $val ) {\n\t\t\t\t$html_attributes .= \\esc_attr( $attr ) . '=\"' . \\esc_attr( $val ) . '\" ';\n\t\t\t}\n\t\t}\n\n\t\treturn $html_attributes;\n\t...
[ "public function XML_val($field, $arguments = [], $cache = false)\n {\n $result = $this->obj($field, $arguments, $cache);\n // Might contain additional formatting over ->XML(). E.g. parse shortcodes, nl2br()\n return $result->forTemplate();\n }" ]
codesearchnet
{ "query": "Represent the instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Programming:" }
// dataSourceIdentityUserV3Attributes populates the fields of an User resource.
[ "func dataSourceIdentityUserV3Attributes(d *schema.ResourceData, user *users.User) error {\n\tlog.Printf(\"[DEBUG] openstack_identity_user_v3 details: %#v\", user)\n\n\td.SetId(user.ID)\n\td.Set(\"default_project_id\", user.DefaultProjectID)\n\td.Set(\"description\", user.Description)\n\td.Set(\"domain_id\", user.D...
[ "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 post about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Compare two paths after normalization of them. @param path1 first path for comparison @param path2 second path for comparison @return whether the two paths are equivalent after normalization
[ "public static boolean pathEquals(String path1, String path2) {\n return cleanPath(path1).equals(cleanPath(path2));\n }" ]
[ "def _check_graph(self, graph):\n \"\"\"\"\"\"\n if graph.num_vertices != self.size:\n raise TypeError(\"The number of vertices in the graph does not \"\n \"match the length of the atomic numbers array.\")\n # In practice these are typically the same arrays using the s...
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
Marshall the given parameter object.
[ "public void marshall(TriggerUpdate triggerUpdate, ProtocolMarshaller protocolMarshaller) {\n\n if (triggerUpdate == null) {\n throw new SdkClientException(\"Invalid argument passed to marshall(...)\");\n }\n\n try {\n protocolMarshaller.marshall(triggerUpdate.getName(), N...
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Execute this process, blocking until it has completed.
[ "public void run() throws IOException {\n if (this.isStarted() || this.isComplete()) {\n throw new IllegalStateException(\"The process can only be used once.\");\n }\n\n final ProcessBuilder builder = new ProcessBuilder(this.cmd);\n builder.directory(new File(this.workingDir));\n builder.environ...
[ "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 programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
// SelectFromStrings ...
[ "func SelectFromStrings(messageToPrint string, options []string) (string, error) {\n\treturn SelectFromStringsFromReader(messageToPrint, options, os.Stdin)\n}" ]
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code:" }
// DefaultDescribeFormatOptions returns default options for formatting // the output.
[ "func DefaultDescribeFormatOptions() (DescribeFormatOptions, error) {\n\truntime.LockOSThread()\n\tdefer runtime.UnlockOSThread()\n\n\topts := C.git_describe_format_options{}\n\tecode := C.git_describe_init_format_options(&opts, C.GIT_DESCRIBE_FORMAT_OPTIONS_VERSION)\n\tif ecode < 0 {\n\t\treturn DescribeFormatOpti...
[ "@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 Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Provide a human readable description for On instance. @param on - On @return human readable description - String
[ "protected String describe(final On on, final boolean and) {\n if (and) {\n return nominalValue(on.getTime());\n }\n return String.format(\"%s %s \", bundle.getString(\"at\"), nominalValue(on.getTime())) + \"%s\";\n }" ]
[ "def initialize(self, id=None, text=None):\n self.id = none_or(id, int)\n \n\n self.text = none_or(text, str)\n \"\"\"\n Username or IP address of the user at the time of the edit : str | None\n \"\"\"" ]
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Sets the Filters. @param array|sting $filters the filters @return self
[ "public function setFilters($filters)\n {\n if (! is_array($filters))\n $filters = [$filters];\n\n $this->filters = array_unique(array_merge($this->filters, $filters));\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 comment about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Writes a short in Intel byte order.
[ "static void writeShort(OutputStream out, int i) throws IOException {\n out.write((byte)i);\n out.write((byte)(i >> 8));\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 comment about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code:" }
// CanRetry returns the current number of retries, and whether or not it exceeds // the maximum number of retries (see: retryCounter.MaxRetries).
[ "func (r *retryCounter) CanRetry(oid string) (int, bool) {\n\tcount := r.CountFor(oid)\n\treturn count, count < r.MaxRetries\n}" ]
[ "func (p *propertySet) setTargetAttributeWithCount(targetAttribute string, allowedCount uint64, taskGroup string) {\n\t// Store that this is for a task group\n\tif taskGroup != \"\" {\n\t\tp.taskGroup = taskGroup\n\t}\n\n\t// Store the constraint\n\tp.targetAttribute = targetAttribute\n\n\tp.allowedCount = allowedC...
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Programming:" }
Small range of hyperparameters.
[ "def slicenet_range1(ranged_hparams):\n \"\"\"\"\"\"\n rhp = ranged_hparams\n rhp.set_float(\"clip_grad_norm\", 1.0, 10.0, scale=rhp.LOG_SCALE)\n rhp.set_float(\"learning_rate\", 0.02, 1.0, scale=rhp.LOG_SCALE)\n rhp.set_float(\"optimizer_adam_beta2\", 0.995, 0.998)\n rhp.set_float(\"weight_decay\", 1.0, 5.0)...
[ "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 text:", "pos": "Represent the code:", "neg": "Represent the code:" }
<p> Performs pixel-wise addition<br> d(x,y) = inputA(x,y) + inputB(x,y) </p> @param inputA Input image. Not modified. @param inputB Input image. Not modified. @param output Output image. Modified.
[ "public static <T extends ImageBase<T>, O extends ImageBase>\n\tvoid add(T inputA, T inputB, O output) {\n\t\tif( inputA instanceof ImageGray) {\n\t\t\tif (GrayU8.class == inputA.getClass()) {\n\t\t\t\tPixelMath.add((GrayU8) inputA, (GrayU8) inputB, (GrayU16) output);\n\t\t\t} else if (GrayS8.class == inputA.getCla...
[ "public static int cudnnBatchNormalizationForwardTraining(\n cudnnHandle handle, \n int mode, \n Pointer alpha, /** alpha[0] = result blend factor */\n Pointer beta, /** beta[0] = dest layer blend factor */\n cudnnTensorDescriptor xDesc, \n Pointer x, /** NxCxHxW */\n ...
codesearchnet
{ "query": "Represent the Github comment about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code:" }
// Reblock is used to reinsert an existing blocked evaluation into the blocked // evaluation tracker.
[ "func (e *Eval) Reblock(args *structs.EvalUpdateRequest, reply *structs.GenericResponse) error {\n\tif done, err := e.srv.forward(\"Eval.Reblock\", args, args, reply); done {\n\t\treturn err\n\t}\n\tdefer metrics.MeasureSince([]string{\"nomad\", \"eval\", \"reblock\"}, time.Now())\n\n\t// Ensure there is only a sin...
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Querying related methods Looks up parent instances @returns {String} current value prepended by parents' values
[ "function () {\n var that = this,\n parentInstance = that.getParentInstance(),\n parentValue = parentInstance && parentInstance.extendedCurrentValue(),\n currentValue = $.trim(that.el.val());\n\n return utils.compact([parentValue, currentValue]).join(' ');\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 comment about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Memory efficient function for loading a table from a FITS file.
[ "def create_table_from_fits(fitsfile, hduname, colnames=None):\n \"\"\"\"\"\"\n\n if colnames is None:\n return Table.read(fitsfile, hduname)\n\n cols = []\n with fits.open(fitsfile, memmap=True) as h:\n for k in colnames:\n data = h[hduname].data.field(k)\n cols += [...
[ "public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }" ]
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
// SampleRate returns the metrics sampling rate.
[ "func (mc *MetricsConfiguration) SampleRate() float64 {\n\tif mc.SamplingRate > 0.0 && mc.SamplingRate <= 1.0 {\n\t\treturn mc.SamplingRate\n\t}\n\treturn defaultSamplingRate\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 comment about Signal Processing:", "pos": "Represent the code about Signal Processing:", "neg": "Represent the code:" }
Parses the scheme-specific portion of the URI and place its parts into instance variables. @throws Exception @return void
[ "protected function parseUri($uriString = '')\n {\n $status = @preg_match(\"~^((//)([^/?#]*))([^?#]*)(\\?([^#]*))?(#(.*))?$~\", $uriString, $matches);\n\n if($status === FALSE)\n {\n throw new Exception(\"URI scheme-specific decomposition failed\");\n }\n\n if(!$status) return;\n\n $this->pa...
[ "public static OriginIdElement addOriginId(Message message) {\n OriginIdElement originId = new OriginIdElement();\n message.addExtension(originId);\n // TODO: Find solution to have both the originIds stanzaId and a nice to look at incremental stanzaID.\n // message.setStanzaId(originId.g...
codesearchnet
{ "query": "Represent the description about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Software development:" }
Return handler to open rasters (rasterio.open).
[ "def _raster_opener(cls, filename, *args, **kwargs):\n \"\"\"\"\"\"\n with rasterio.Env(**cls.get_gdal_env(filename)):\n try:\n return rasterio.open(filename, *args, **kwargs)\n except (rasterio.errors.RasterioIOError, rasterio._err.CPLE_BaseError) as e:\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 Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
Retrieves the page's content, passed through any necessary parsing eg Wiki based content @return String
[ "public function ParsedContent() {\n\t\t$formatter = $this->getFormatter();\n\t\t$content = $formatter->formatContent($this);\n\n\t\t// purify the output - we don't want people breaking pages if we set purify=true\n\t\tif (self::$purify_output) {\n\t\t\tinclude_once SIMPLEWIKI_DIR . '/thirdparty/htmlpurifier-4.0.0-...
[ "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 about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Remove the property with the given key. The internal property object is not deleted itself but it's value is set to <code>null</code> and the method <code>isDeleted()</code> will return <code>true</code> . @param key Key for the property to remove.
[ "public final void remove(final String key) {\r\n final Property prop = find(key);\r\n if (prop != null) {\r\n prop.setValue(null);\r\n }\r\n }" ]
[ "function Value(payload) {\n\n var path = payload.path;\n\n /**\n @property {string} key The string representation of the Key (read-only).\n @memberof Value\n @instance\n @name key\n */\n this.key = path.join(\".\");\n\n /**\n @property {boolean} exists A boolean value that indic...
codesearchnet
{ "query": "Represent the Github description about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code:" }
Matrix-vector product for real symmetric-packed matrix.
[ "def cublasSspmv(handle, uplo, n, alpha, AP, x, incx, beta, y, incy):\n \n\n status = _libcublas.cublasSspmv_v2(handle,\n _CUBLAS_FILL_MODE[uplo], \n n,\n ctypes.byref(ctypes.c_float(alpha)),\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 comment:", "pos": "Represent the code:", "neg": "Represent the code about Natural Language Processing:" }
Remove valores de uma tabela no banco de dados @param string $column coluna da tabela @param string $value valor na tabela @return boolean se todos os valores foram deletados com sucesso
[ "public static function delete($column, $value)\n {\n try {\n\n self::instance();\n\n $tableStatic = static::$table;\n \n $stmt = self::$db->prepare(\"delete from {$tableStatic} where {$column} = :value\");\n \n $stmt->bindValue(\":v...
[ "def associar_assinatura(self, sequencia_cnpj, assinatura_ac):\n \n retorno = super(ClienteSATLocal, self).\\\n associar_assinatura(sequencia_cnpj, assinatura_ac)\n # (!) resposta baseada na redação com efeitos até 31-12-2016\n return RespostaSAT.associar_assinatura(retorn...
codesearchnet
{ "query": "Represent the Github sentence about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code:" }
Function that finds all IDs of entities that match the search criteria. @return array
[ "protected function findIdsByGivenCriteria()\n {\n $select = $this->getSelectAs($this->idField);\n\n $subQueryBuilder = $this->createSubQueryBuilder($select);\n if (null != $this->limit) {\n $subQueryBuilder->setMaxResults($this->limit)->setFirstResult($this->limit * ($this->page ...
[ "def build(self):\n \"\"\"\"\"\"\n from ambry.orm.config import BuildConfigGroupAccessor\n\n # It is a lightweight object, so no need to cache\n return BuildConfigGroupAccessor(self.dataset, 'buildstate', self._session)" ]
codesearchnet
{ "query": "Represent the Github instruction about database:", "pos": "Represent the Github code about database:", "neg": "Represent the Github code:" }
Gets a single object @param type $callerClass @param type $filter @param type $cache @param type $orderby @return DataObject
[ "public function getOne($callerClass, $filter = \"\", $cache = true, $orderby = \"\", $requiredPerm = 'View')\n {\n $items = $this->getAll($callerClass, $filter, $orderby, null, null, $requiredPerm);\n if ($items && count($items)) {\n return $items[0];\n }\n }" ]
[ "public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef)\n {\n // @todo: Is it possible to store a default value in the DB?\n $fieldDef->defaultValue = new FieldValue();\n $fieldDef->defaultValue->data = array('text' => null);\n }" ]
codesearchnet
{ "query": "Represent the summarization about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Check that a string is not empty if its not null. @param value value. @param name parameter name for the exception message. @return the given value.
[ "public static String notEmptyIfNotNull(String value, String name) {\n return notEmptyIfNotNull(value, name, null);\n }" ]
[ "def initialize(self, id=None, text=None):\n self.id = none_or(id, int)\n \n\n self.text = none_or(text, str)\n \"\"\"\n Username or IP address of the user at the time of the edit : str | None\n \"\"\"" ]
codesearchnet
{ "query": "Represent the Github text about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
// ReadJSON returns the decoded configuration file, or an error.
[ "func ReadJSON(secustom string) (configger Config, err error) {\n\tnaclKey := new([keySize]byte)\n\tcopy(naclKey[:], pad[:keySize])\n\tnonce := new([nonceSize]byte)\n\tin, err := ioutil.ReadFile(secustom)\n\tif err != nil {\n\t\treturn configger, err\n\t}\n\tcopy(nonce[:], in[:nonceSize])\n\tconfigbytes, ok := secr...
[ "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 description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
// ReadB64 is a blocking read for base64 encoded msgpack rpc data. // It is called serially by the mobile run loops.
[ "func ReadB64() (res string, err error) {\n\tdefer func() { err = flattenError(err) }()\n\tif conn == nil {\n\t\treturn \"\", errors.New(\"connection not initialized\")\n\t}\n\tn, err := conn.Read(buffer)\n\tif n > 0 && err == nil {\n\t\tstr := base64.StdEncoding.EncodeToString(buffer[0:n])\n\t\treturn str, nil\n\t...
[ "func (h Handler) GetE(cmd common.GetRequest) (<-chan common.GetEResponse, <-chan error) {\n\t// Being minimalist, not lazy. The chunked handler is not meant to be used with a\n\t// backing store that supports the GetE protocol extension. It would be a waste of\n\t// time and effort to support it here if it would \...
codesearchnet
{ "query": "Represent the Github description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Párování faktur dle nezaplacenych faktur
[ "public function invoicesMatchingByInvoices()\n {\n foreach ($this->getInvoicesToProcess() as $invoiceData) {\n $payments = $this->findPayments($invoiceData);\n if (!empty($payments) && count(current($payments))) {\n $typDokl = $invoiceData['typDokl'][0]...
[ "public function settleCreditNote($invoice, $payment)\n {\n $success = 0;\n $prijataCastka = (float) $payment->getDataValue('sumCelkem');\n\n if ($prijataCastka < $invoice->getDataValue('zbyvaUhradit')) { //Castecna uhrada\n $this->addStatusMessages(sprinf(_('Castecna uhrada...
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
This method will try to decrypt the given JWE and recipient using a JWK. @param JWE $jwe A JWE object to decrypt @param JWK $jwk The key used to decrypt the input @param int $recipient The recipient used to decrypt the token
[ "public function decryptUsingKey(JWE &$jwe, JWK $jwk, int $recipient): bool\n {\n $jwkset = new JWKSet([$jwk]);\n\n return $this->decryptUsingKeySet($jwe, $jwkset, $recipient);\n }" ]
[ "function(algo) {\n switch (algo) {\n // Algorithm-Specific Fields for RSA encrypted session keys:\n // - MPI of RSA encrypted value m**e mod n.\n case enums.publicKey.rsa_encrypt:\n case enums.publicKey.rsa_encrypt_sign:\n return [type_mpi];\n\n // Algorithm-Specific Fi...
codesearchnet
{ "query": "Represent the post about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Encryption:" }
@param string $file @return array
[ "protected function findTables($file)\n {\n $tables = [];\n $xml = simplexml_load_file($file);\n foreach ($xml->xpath('TABLES/TABLE') as $element) {\n if (null !== $element['NAME']) {\n $tables[] = (string) $element['NAME'];\n }\n }\n\n r...
[ "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 text about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
@param string $template @param bool $clearAssignments @return string @throws DomainException
[ "public function fetch($template, $clearAssignments = true)\n {\n\n extract($this->variablesForTemplate, EXTR_OVERWRITE);\n\n $template = $this->templateFolder . $template . '.template.php';\n\n if (file_exists($template) === false) {\n throw new DomainException('Template not foun...
[ "public function getViewer($action)\n {\n // Answer Viewer Object (from parent):\n \n if (!$this->isCMSPreview()) {\n return parent::getViewer($action);\n }\n \n // Load Page Requirements (uses theme):\n \n PageController::create(Page::create())-...
codesearchnet
{ "query": "Represent the Github summarization about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code about Software development:" }
// SwarmUpdate updates the swarm.
[ "func (cli *Client) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error {\n\tquery := url.Values{}\n\tquery.Set(\"version\", strconv.FormatUint(version.Index, 10))\n\tquery.Set(\"rotateWorkerToken\", fmt.Sprintf(\"%v\", flags.RotateWorkerToken))\n\tquery.Set(\"ro...
[ "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:" }
/*Line 34 - 'AtomBrowser.js'
[ "function () {\n/*Line 35 - 'AtomBrowser.js' */ var nVer = navigator.appVersion;\n/*Line 36 - 'AtomBrowser.js' */ var nAgt = navigator.userAgent;\n/*Line 37 - 'AtomBrowser.js' */ this.userAgent = nAgt;\n/*Line 38 - 'AtomBrowser.js' */ var browserName = navigator.appName;\n/*Line 39 - 'At...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the comment:", "pos": "Represent the code:", "neg": "Represent the code:" }
// EnableWithAIForwarding will start instrumentation and will connect to app insights forwarder // exporter making the metrics and traces available in app insights.
[ "func EnableWithAIForwarding(agentEndpoint string) (err error) {\n\terr = Enable()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ttraceExporter, err := ocagent.NewExporter(ocagent.WithInsecure(), ocagent.WithAddress(agentEndpoint))\n\tif err != nil {\n\t\treturn err\n\t}\n\ttrace.RegisterExporter(traceExporter)\n\tre...
[ "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:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Returns the number of shares for the given security. It gets the number from all the accounts in the book.
[ "def get_quantity(self) -> Decimal:\n \n from pydatum import Datum\n # Use today's date but reset hour and lower.\n today = Datum()\n today.today()\n today.end_of_day()\n return self.get_num_shares_on(today.value)" ]
[ "public static function getRankingQueryLimit()\n {\n $configGeneral = Config::getInstance()->General;\n $configLimit = $configGeneral['archiving_ranking_query_row_limit'];\n $limit = $configLimit == 0 ? 0 : max(\n $configLimit,\n $configGeneral['datatable_archiving_maxi...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Update an existing BuildConfiguration with new information :param id: ID of BuildConfiguration to update :param name: Name of BuildConfiguration to update :return:
[ "def update_build_configuration(id, **kwargs):\n \n data = update_build_configuration_raw(id, **kwargs)\n if data:\n return utils.format_json(data)" ]
[ "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 text:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
Add a new TocElement to the TOC container.
[ "def add_element(self, element):\n \"\"\"\"\"\"\n try:\n self.toc[element.group][element.name] = element\n except KeyError:\n self.toc[element.group] = {}\n self.toc[element.group][element.name] = element" ]
[ "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 summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// GenerateHandlers ...
[ "func GenerateHandlers() map[string]mist.HandleFunc {\n\treturn map[string]mist.HandleFunc{\n\t\t\"register\": handleRegister,\n\t\t\"unregister\": handleUnregister,\n\t\t\"set\": handleSet,\n\t\t\"unset\": handleUnset,\n\t\t\"tags\": handleTags,\n\t}\n}" ]
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
转换最终分词结果到 finallyResult 数组 @return void
[ "private function _sort_finally_result()\n {\n $newarr = array();\n $i = 0;\n foreach($this->simpleResult as $k=>$v)\n {\n if( empty($v['w']) ) continue;\n if( isset($this->finallyResult[$k]) && count($this->finallyResult[$k]) > 0 )\n {\n ...
[ "protected static void fixResultByRule(List<Vertex> linkedArray)\n {\n\n //--------------------------------------------------------------------\n //Merge all seperate continue num into one number\n mergeContinueNumIntoOne(linkedArray);\n\n //-------------------------------------------...
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about text processing:" }
// Parse implements Parser.
[ "func (parser *SourceParser) Parse(req *http.Request, params imageserver.Params) error {\n\tParseQueryString(imageserver_source.Param, req, params)\n\treturn nil\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 sentence about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about File management:" }
Returns the form element as an HTML tag @return string
[ "public function outputElement() : string\n {\n $selected = explode(',', $this->getValue());\n $disabled = $this->disabled;\n $hidden = $this->hidden;\n\n $return = '<div class=\"checkboxgroup\">';\n foreach ($this->options as $val=>$txt) {\n if (in_array($val, $hidd...
[ "function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }" ]
codesearchnet
{ "query": "Represent the text about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
// Initialize the database from revel.Config
[ "func InitDb(dbResult *DbGorp) error {\n\tparams := DbInfo{}\n\tparams.DbDriver = revel.Config.StringDefault(\"db.driver\", \"sqlite3\")\n\tparams.DbHost = revel.Config.StringDefault(\"db.host\", \"localhost\")\n\tif params.DbDriver == \"sqlite3\" && params.DbHost == \"localhost\" {\n\t\tparams.DbHost = \"/tmp/app....
[ "@Override\n public void generatePluginConfig(String serverName, File writeDirectory) {\n // Pass true to utilityRequest since this method will be called from the pluginUtility\n // or by the GeneratePluginConfigListener not by a call to the mbean.\n generatePluginConfig(null,serverName,true...
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Compute the total size of all elements in objects.
[ "def get_size(objects):\n \"\"\"\"\"\"\n res = 0\n for o in objects:\n try:\n res += _getsizeof(o)\n except AttributeError:\n print(\"IGNORING: type=%s; o=%s\" % (str(type(o)), str(o)))\n return res" ]
[ "def run_objective(objective, _name, raw_output, output_files, threads)\n # output is a, array: [raw_output, output_files].\n # output_files is a hash containing the absolute paths\n # to file(s) output by the target in the format expected by the\n # objective function(s), with keys as the keys ...
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Lists the analysis modules.
[ "def ListAnalysisPlugins(self):\n \"\"\"\"\"\"\n analysis_plugin_info = (\n analysis_manager.AnalysisPluginManager.GetAllPluginInformation())\n\n column_width = 10\n for name, _, _ in analysis_plugin_info:\n if len(name) > column_width:\n column_width = len(name)\n\n table_view = v...
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
Execute the job. @return void @throws \Throwable
[ "protected function job(): void\n {\n CorporationDivision::where('corporation_id', $this->getCorporationId())->get()\n ->each(function ($division) {\n\n // retrieve last known entry for the current division and active corporation\n $last_known_entry = CorporationWa...
[ "@Help(help = \"Create the object of type {#}\")\n public T create(final T object) throws SDKException {\n return (T) requestPost(object);\n }" ]
codesearchnet
{ "query": "Represent the comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Internal method to perform the normalization. @param filename the filename @param keepSeparator true to keep the final separator @return the normalized filename
[ "private static String doNormalizeIgnoreOtherSeparator(String filename, boolean keepSeparator) {\n\t\tif (filename == null) {\n\t\t\treturn null;\n\t\t}\n\t\tint size = filename.length();\n\t\tif (size == 0) {\n\t\t\treturn filename;\n\t\t}\n\t\tint prefix = 0;\n\t\t// int prefix = getPrefixLength(filename);\n\t\t/...
[ "def usufyToCsvExport(d, fPath):\n \n\n from pyexcel_io import get_data\n try:\n oldData = {\"OSRFramework\": get_data(fPath) }\n except:\n # No information has been recovered\n oldData = {\"OSRFramework\":[]}\n\n # Generating the new tabular data.\n tabularData = _generateTab...
codesearchnet
{ "query": "Represent the text about Documentation:", "pos": "Represent the code about Documentation:", "neg": "Represent the code:" }
Processes parallel bean definitions.
[ "protected void processParallelBeans() {\n new Thread(() -> {\n final List<BeanDefinitionReference> parallelBeans = beanDefinitionsClasses.stream()\n .filter(bd -> bd.getAnnotationMetadata().hasDeclaredStereotype(Parallel.class) && bd.isEnabled(this))\n .colle...
[ "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:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// Connect connects to the Client given conn. It first resets the firmata board // then continuously polls the firmata board for new information when it's // available.
[ "func (b *Client) Connect(conn io.ReadWriteCloser) (err error) {\n\tif b.Connected() {\n\t\treturn ErrConnected\n\t}\n\n\tb.connection = conn\n\tb.Reset()\n\tconnected := make(chan bool, 1)\n\tconnectError := make(chan error, 1)\n\n\tb.Once(b.Event(\"ProtocolVersion\"), func(data interface{}) {\n\t\te := b.Firmware...
[ "def read(self, timeout=1.0):\n \n start = time()\n while len(self.rcv_data) == 0:\n if time() - start > timeout:\n # Read operations should typically take ~1-2ms.\n # If this exception occurs, then it could indicate\n # a problem in one o...
codesearchnet
{ "query": "Represent the Github summarization about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Get Date from "yyyyMMddThhmmssZ" @param val String "yyyyMMddThhmmssZ" @return Date @throws BadDateException on format error
[ "public static Date fromISODateTimeUTC(final String val) throws BadDateException {\n try {\n synchronized (isoDateTimeUTCFormat) {\n return isoDateTimeUTCFormat.parse(val);\n }\n } catch (Throwable t) {\n throw new BadDateException();\n }\n }" ]
[ "def _evalDateStd(self, datetimeString, sourceTime):\n \n s = datetimeString.strip()\n sourceTime = self._evalDT(datetimeString, sourceTime)\n\n # Given string is in the format 07/21/2006\n return self.parseDate(s, sourceTime)" ]
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
daoinput keys: migration_request_id
[ "def execute(self, conn, daoinput, transaction = False):\n \n if not conn:\n\t dbsExceptionHandler(\"dbsException-failed-connect2host\", \"Oracle/MigrationRequests/Remove. Expects db connection from upper layer.\",\n self.logger.exception)\n daoinput['create_by...
[ "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 text:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
<code>optional .alluxio.grpc.file.UpdateUfsModePOptions options = 2;</code>
[ "public alluxio.grpc.UpdateUfsModePOptions getOptions() {\n return options_ == null ? alluxio.grpc.UpdateUfsModePOptions.getDefaultInstance() : options_;\n }" ]
[ "@java.lang.Deprecated\n public java.util.Map<java.lang.String, alluxio.grpc.InconsistentPropertyValues> getValues() {\n return getValuesMap();\n }" ]
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Convenience method used to sending appropriate Kill signal to the task VM @param context @param command @throws IOException
[ "private void finishTask(TaskControllerContext context,\n TaskCommands command) throws IOException{\n if(context.task == null) {\n LOG.info(\"Context task null not killing the JVM\");\n return;\n }\n ShellCommandExecutor shExec = buildTaskControllerExecutor(\n command, context.env.con...
[ "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 description about technology:", "pos": "Represent the code about technology:", "neg": "Represent the code about Software development:" }
This method can be called by a payment gateway to provide automated integration. This action performs some basic setup then hands control directly to the payment handler's "callback" action. @param $request Current Request Object
[ "public function callback($request)\n {\n // If post data exists, process. Otherwise provide error\n if ($this->payment_handler === null) {\n // Redirect to error page\n return $this->redirect(Controller::join_links(\n Director::BaseURL(),\n $this...
[ "def webhook_handler(request):\n \n body = request.stream.read().decode('utf8')\n print('webhook handler saw:', body)\n api.notify_webhook_received(payload=body)\n\n # nb. protected references are not part of the API.\n # this is just to demonstrate that the asyncid is stored\n print('key store...
codesearchnet
{ "query": "Represent the Github comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
{@inheritdoc} Импорт из файла.
[ "public function startImport(array &$form, FormStateInterface $form_state) {\n // Выполняет стандартную валидацию полей формы и добавляет примечания об ошибках.\n ConfigFormBase::validateForm($form, $form_state);\n\n if (!$form_state->getValue('validate_error')) {\n $config = $this->...
[ "private function processA(array $result) {\n\t\ttry {\n\t\t\t$result = $this->processI($result);\n\t\t}\n\t\t/**\n\t\t * 2016-08-02\n\t\t * Исключительная ситуация может быть не только типа @see \\Df\\Core\\Exception,\n\t\t * но и типа @see \\Exception,\n\t\t * потому что чтение некорректных данных может приводить...
codesearchnet
{ "query": "Represent the instruction about writing:", "pos": "Represent the code about writing:", "neg": "Represent the code about Programming:" }
// NewClient creates a new client for a server identified by the given dsn // A dsn is a string in the form: // {PROTOCOL}://{PUBLIC_KEY}:{SECRET_KEY}@{HOST}/{PATH}{PROJECT_ID} // eg: // http://abcd:efgh@sentry.example.com/sentry/project1
[ "func NewClient(dsn string) (client *Client, err error) {\n\tu, err := url.Parse(dsn)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbasePath := path.Dir(u.Path)\n\tproject := path.Base(u.Path)\n\n\tif u.User == nil {\n\t\treturn nil, fmt.Errorf(\"the DSN must contain a public and secret key\")\n\t}\n\tpublicKey...
[ "def lookup_endpoint(cli):\n \"\"\"\"\"\"\n url = '/applications/{0}/environment'.format(APPNAME)\n environ = cli.user.get(url).item\n port = environ['DOTCLOUD_SATELLITE_ZMQ_PORT']\n host = socket.gethostbyname(environ['DOTCLOUD_SATELLITE_ZMQ_HOST'])\n return \"tcp://{0}:{1}\".format(host, port)" ...
codesearchnet
{ "query": "Represent the post about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code:" }
Create new Scope from the configuration string. @param \RomanPitak\Nginx\Config\Text $configString @return Scope @throws Exception
[ "public static function fromString(Text $configString)\n {\n $scope = new Scope();\n while (false === $configString->eof()) {\n\n if (true === $configString->isEmptyLine()) {\n $scope->addPrintable(EmptyLine::fromString($configString));\n }\n\n $char ...
[ "final public static function sinfo(array $params):string\n {\n return (\\iumioFramework\\Core\\Base\\Server\\GlobalServer::getServerInfo($params['name']));\n }" ]
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
performs a counter-clockwise rotation
[ "void rotateGridCCW( Grid g ) {\n\n\t\twork.clear();\n\t\tfor (int i = 0; i < g.rows * g.columns; i++) {\n\t\t\twork.add(null);\n\t\t}\n\n\t\tfor (int row = 0; row < g.rows; row++) {\n\t\t\tfor (int col = 0; col < g.columns; col++) {\n\t\t\t\twork.set(col*g.rows + row, g.get(g.rows - row - 1,col));\n\t\t\t}\n\t\t}\...
[ "def gaussian_window(t, params):\n \n window = suspect.basis.gaussian(t, 0, 0, params[\"line_broadening\"])\n\n # the above gaussian function returns an area 1 fid, for a windowing\n # function we need to be area preserving (first point must be 1)\n return window / window[0]" ]
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
生成update SQL @access public @param Query $query 查询对象 @return string
[ "public function update(Query $query)\n {\n $options = $query->getOptions();\n\n $table = $this->parseTable($query, $options['table']);\n $data = $this->parseData($query, $options['data']);\n\n if (empty($data)) {\n return '';\n }\n\n foreach ($data as $key =...
[ "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 sentence about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code about programming:" }
Report to stats server of the existing domain
[ "private static function sendInformation()\n {\n $url = CMS_SITE . 'ping.php?site=' . urlencode(Configuration::getInstance()->get('site')['name']) . '&host=' . urlencode(HOST) . '&ip=' . urlencode(IP) . '&server=' . urlencode(SERVER_IP) . '&key=' . urlencode(Configuration::getInstance()->get('cms')['uniqu...
[ "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:" }
(non-PHPdoc) @see \Core\Html\Bootstrap\Navbar\NavbarElementAbstract::build()
[ "public function build()\n {\n // Create brand\n $html = $this->content instanceof Img ? $this->page->build() : $this->content;\n\n // Brand wrapped by a link\n if ($this->link instanceof A) {\n\n $this->link->addCss('navbar-brand');\n $this->link->setInner($html...
[ "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 Github post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Returns the repository for an asset @param AssetInterface $asset @return RepositoryInterface @api
[ "public function getRepository(AssetInterface $asset)\n {\n $assetRepositoryClassName = str_replace('\\\\Model\\\\', '\\\\Repository\\\\', get_class($asset)) . 'Repository';\n\n if (class_exists($assetRepositoryClassName)) {\n return $this->objectManager->get($assetRepositoryClassName);\...
[ "public function createUrlAlias(URLAlias $urlAlias): UIValue\\Content\\UrlAlias\n {\n return new UIValue\\Content\\UrlAlias($urlAlias);\n }" ]
codesearchnet
{ "query": "Represent the comment about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Programming:" }
create app instance and run it @param array|string $config if string it is basePath @param boolean $run if run @return static
[ "static public function launch($config, $run = true)\n\t{\n\t\tif (is_string($config)) {\n\t\t $config = ['basePath' => $config];\n\t\t}\n\t\t\n\t\t$app = new static($config);\n\t\t\n\t\tif ($run) {\n\t\t return $app->run();\n\t\t}\n\t\t\n\t\treturn $app;\n\t}" ]
[ "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 post about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code:" }
Remove a graphical shape from the canvas.
[ "public void remove(Plot p) {\n shapes.remove(p);\n\n JComponent[] tb = p.getToolBar();\n if (tb != null) {\n for (JComponent comp : tb) {\n toolbar.remove(comp);\n }\n }\n\n repaint();\n }" ]
[ "def fill_between(self, canvas, X, lower, upper, 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 post:", "pos": "Represent the code:", "neg": "Represent the code about Data analysis:" }
Registers the built-in message types.
[ "def register_builtin_message_types():\n \"\"\"\"\"\"\n from .plain import PlainTextMessage\n from .email import EmailTextMessage, EmailHtmlMessage\n register_message_types(PlainTextMessage, EmailTextMessage, EmailHtmlMessage)" ]
[ "@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 comment:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Map natural position to machine code postion
[ "def map_position(pos):\n \"\"\"\"\"\"\n\n posiction_dict = dict(zip(range(1, 17), [i for i in range(30, 62) if i % 2]))\n return posiction_dict[pos]" ]
[ "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 text:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Natural Language Processing:" }
Sets the primary and secondary colorization assignments.
[ "public void setZations (byte primary, byte secondary, byte tertiary, byte quaternary)\n {\n zations = (primary | (secondary << 16) | (tertiary << 24) | (quaternary << 8));\n }" ]
[ "def _get_generic_schema(self):\n \n schema = Schema(\n vid=ID(stored=True, unique=True), # Object id\n title=NGRAMWORDS(),\n keywords=KEYWORD, # Lists of coverage identifiers, ISO time values and GVIDs, source names, source abbrev\n doc=TEXT) # Generated...
codesearchnet
{ "query": "Represent the Github post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
// GetUsage measures the total memory provisioned for the current process // from the OS
[ "func GetUsage() Usage {\n\tmemStats := new(runtime.MemStats)\n\truntime.ReadMemStats(memStats)\n\treturn Usage{\n\t\tMem: memStats.Sys,\n\t}\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:" }
// NewFuncNode create new Function Expression Node.
[ "func NewFuncNode(name string, f Func) *FuncNode {\n\treturn &FuncNode{Name: name, F: f}\n}" ]
[ "public LHS toLHS( CallStack callstack, Interpreter interpreter)\n throws EvalError\n {\n // loosely typed map expression new {a=1, b=2} are treated\n // as non assignment (LHS) to retrieve Map.Entry key values\n // then wrapped in a MAP_ENTRY type LHS for value assignment.\n r...
codesearchnet
{ "query": "Represent the Github post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Initialise default formats.
[ "def _init_formats(self):\n \n theme = self._color_scheme\n # normal message format\n fmt = QtGui.QTextCharFormat()\n fmt.setForeground(theme.foreground)\n fmt.setBackground(theme.background)\n self._formats[OutputFormat.NormalMessageFormat] = fmt\n\n # error ...
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the summarization about Web development:", "pos": "Represent the code about Web development:", "neg": "Represent the code:" }
Add a simple property to the map file. @param writer xml stream writer @param name property name @param propertyType property type @param readMethod read method name @param writeMethod write method name @throws XMLStreamException
[ "private void addProperty(XMLStreamWriter writer, String name, Class<?> propertyType, String readMethod, String writeMethod) throws XMLStreamException\n {\n if (name.length() != 0)\n {\n writer.writeStartElement(\"property\");\n\n // convert property name to .NET style (i.e. first letter...
[ "@Override\n public void visit(String name, Object value) {\n if (tc.isDebugEnabled()) {\n Tr.debug(tc, MessageFormat.format(\"visit [ {0} ] Name [ {1} ] Value [ 2 ]\",\n getHashText(), name, value));\n }\n\n if (value instanceof Type) ...
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }