query
stringlengths
16
255
pos
list
neg
list
task
stringclasses
1 value
instruction
dict
新增Task @param id ID,为每一个Task定义一个ID @param pattern {@link CronPattern}对应的String表达式 @param task {@link Task} @return this
[ "public Scheduler schedule(String id, String pattern, Task task) {\r\n\t\treturn schedule(id, new CronPattern(pattern), task);\r\n\t}" ]
[ "public static String getTransferQueue(String name) {\n LOG.debug(\"对于需要保序的情况,只应该启动单个中转节点,目前启动多个节点原节点会被挤掉线,但是由于重连机制,会轮着挤掉线\");\n return IdManager.generateStaticQueueId(buildTransferName(name));\n }" ]
codesearchnet
{ "query": "Represent the post about text processing:", "pos": "Represent the code about text processing:", "neg": "Represent the code:" }
Like DebugVariableNode.render, but doesn't catch UnicodeDecodeError.
[ "def debug_variable_node_render(self, context):\n \n try:\n output = self.filter_expression.resolve(context)\n output = template_localtime(output, use_tz=context.use_tz)\n output = localize(output, use_l10n=context.use_l10n)\n output = force_text(output)\n except Exception as e:...
[ "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 sentence about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Provides a touch events wrapper for (ms)pointer events. Based on changes by veproza https://github.com/CloudMade/Leaflet/pull/1019 ref http://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890
[ "function (obj, type, handler, id) {\n\n\t\tswitch (type) {\n\t\tcase 'touchstart':\n\t\t\treturn this.addPointerListenerStart(obj, type, handler, id);\n\t\tcase 'touchend':\n\t\t\treturn this.addPointerListenerEnd(obj, type, handler, id);\n\t\tcase 'touchmove':\n\t\t\treturn this.addPointerListenerMove(obj, type, ...
[ "function topLevelRedirect (url) {\n if (window === top) location.href = url\n else parent.postMessage('slackin-redirect:' + id + ':' + url, '*')\n // Q: Why can't we just `top.location.href = url;`?\n // A:\n // [sandboxing]: http://www.html5rocks.com/en/tutorials/security/sandboxed-iframes/\n // [CSP]: http...
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// SetSMSChannelResponse sets the SMSChannelResponse field's value.
[ "func (s *GetSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *GetSmsChannelOutput {\n\ts.SMSChannelResponse = 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:" }
Extracts resource data from the given bytes representation and calls :method:`from_string` with the resulting text representation.
[ "def from_bytes(self, bytes_representation, resource=None):\n \n text = bytes_representation.decode(self.encoding)\n return self.from_string(text, resource=resource)" ]
[ "def values(*rels):\n '''\n \n '''\n #Action function generator to multiplex a relationship at processing time\n def _values(ctx):\n '''\n Versa action function Utility to specify a list of relationships\n\n :param ctx: Versa context used in processing (e.g. includes the prototyp...
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
// Rate creates a new ugen at a specific rate. // If rate is an unsupported value this method will cause // a runtime panic. // There will also be a runtime panic if BufNum is nil.
[ "func (playbuf PlayBuf) Rate(rate int8) Input {\n\tCheckRate(rate)\n\tif playbuf.BufNum == nil {\n\t\tpanic(fmt.Errorf(\"BufNum can not be nil\"))\n\t}\n\t(&playbuf).defaults()\n\tdone := C(float32(playbuf.Done))\n\treturn NewInput(\"PlayBuf\", rate, 0, playbuf.NumChannels, playbuf.BufNum, playbuf.Speed, playbuf.Tr...
[ "public static long createFileId(long containerId) {\n long id = BlockId.createBlockId(containerId, BlockId.getMaxSequenceNumber());\n if (id == INVALID_FILE_ID) {\n // Right now, there's not much we can do if the file id we're returning is -1, since the file\n // id is completely determined by the ...
codesearchnet
{ "query": "Represent the Github description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Handles indentation after the current token.
[ "private function postIndent()\n {\n $next = $this->tokens->getId($this->tokens->key() + 1);\n\n switch ($this->tokens->getId()) {\n case DocLexer::T_COLON:\n if ($this->space) {\n $this->result .= ' ';\n }\n\n break;\n ...
[ "def star_sep_check(self, original, loc, tokens):\n \"\"\"\"\"\"\n return self.check_py(\"3\", \"keyword-only argument separator (add 'match' to front to produce universal code)\", original, loc, tokens)" ]
codesearchnet
{ "query": "Represent the comment about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Send HTTP headers for this stream. @return void
[ "protected function sendHttpHeaders(): void\n {\n // grab content disposition\n $disposition = $this->opt->getContentDisposition();\n\n if ($this->output_name) {\n // Various different browsers dislike various characters here. Strip them all for safety.\n $safe_output =...
[ "@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 Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about Programming:" }
Returns a dict of magnetic species and the magnitude of their associated magmoms. Will return a set if there are multiple magmoms per species. :return: dict of magnetic species and magmoms
[ "def magnetic_species_and_magmoms(self):\n \n\n structure = self.get_ferromagnetic_structure()\n\n magtypes = {\n str(site.specie): set()\n for site in structure\n if site.properties[\"magmom\"] != 0\n }\n\n for site in structure:\n if s...
[ "def set_prop(self, prop, value, ef=None):\n \n if ef:\n # prop should be restricted to n_decoys, an int, the no. of decoys corresponding to a given FPF.\n # value is restricted to the corresponding enrichment factor and should be a float\n self.ef[prop] = value\n ...
codesearchnet
{ "query": "Represent the summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
// NewRemoveSaasCommand returns a command which removes a consumed application.
[ "func NewRemoveSaasCommand() cmd.Command {\n\tcmd := &removeSaasCommand{}\n\tcmd.newAPIFunc = func() (RemoveSaasAPI, error) {\n\t\troot, err := cmd.NewAPIRoot()\n\t\tif err != nil {\n\t\t\treturn nil, errors.Trace(err)\n\t\t}\n\t\treturn application.NewClient(root), nil\n\t}\n\treturn modelcmd.Wrap(cmd)\n}" ]
[ "def create(self, **kwargs):\n \n raise exceptions.MethodNotImplemented(method=self.create, url=self.url, details='GUID cannot be duplicated, to create a new GUID use the relationship resource')" ]
codesearchnet
{ "query": "Represent the sentence about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Natural Language Processing:" }
:type identifiers: subject_abcs.IdentifierCollection :param permission_s: a collection of 1..N permissions :type permission_s: List of permission string(s)
[ "def _is_permitted(self, identifiers, permission_s):\n \n\n for realm in self.realms:\n # the realm's is_permitted returns a generator\n yield from realm.is_permitted(identifiers, permission_s)" ]
[ "def _get_generic_schema(self):\n \n schema = Schema(\n vid=ID(stored=True, unique=True), # Object id\n title=NGRAMWORDS(),\n keywords=KEYWORD, # Lists of coverage identifiers, ISO time values and GVIDs, source names, source abbrev\n doc=TEXT) # Generated...
codesearchnet
{ "query": "Represent the summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Save edits for a given post @param blogName The blog name of the post @param id the Post id @param detail The detail to save @throws IOException if any file specified in detail cannot be read
[ "public void postEdit(String blogName, Long id, Map<String, ?> detail) throws IOException {\n Map<String, Object> sdetail = JumblrClient.safeOptionMap(detail);\n sdetail.put(\"id\", id);\n requestBuilder.postMultipart(JumblrClient.blogPath(blogName, \"/post/edit\"), sdetail);\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 sentence:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Handles a configure failure.
[ "protected void handleConfigureResponseFailure(RaftMemberContext member, ConfigureRequest request, Throwable error) {\n // Log the failed attempt to contact the member.\n failAttempt(member, request, error);\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 sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Search through and find all instances of the search term in an srt or transcript, create a supercut around that instance, and output a new video file comprised of those supercuts.
[ "def videogrep(inputfile, outputfile, search, searchtype, maxclips=0, padding=0, test=False, randomize=False, sync=0, use_transcript=False, use_vtt=False, export_clips=False):\n \n\n padding = padding / 1000.0\n sync = sync / 1000.0\n composition = []\n foundSearchTerm = False\n\n if use_transcrip...
[ "def reset(self):\n \n\n # Use first matching element as title (0 or more xpath expressions)\n self.title = OrderedSet()\n\n # Use first matching element as body (0 or more xpath expressions)\n self.body = OrderedSet()\n\n # Use first matching element as author (0 or more x...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Paint the arrow in disabled state. @param g the Graphics2D context to paint with. @param width the width. @param height the height.
[ "private void paintForegroundDisabled(Graphics2D g, int width, int height) {\n Shape s = decodeArrowPath(width, height);\n\n g.setPaint(disabledColor);\n g.fill(s);\n\n }" ]
[ "function () {\n Layer.call(this, \"ScreenCreditController\");\n\n /**\n * An {@link Offset} indicating where to place the attributions on the screen.\n * @type {Offset}\n * @default The lower left corner of the window with an 11px left margin and a 2px bott...
codesearchnet
{ "query": "Represent the summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Compile an update statement into SQL. @param \Nova\Database\Query\Builder $query @param array $values @return string
[ "public function compileUpdate(Builder $query, $values)\n {\n $sql = parent::compileUpdate($query, $values);\n\n if (isset($query->orders)) {\n $sql .= ' ' .$this->compileOrders($query, $query->orders);\n }\n\n if (isset($query->limit)) {\n $sql .= ' ' .$this->co...
[ "public function toSql(\\Doctrine\\DBAL\\Schema\\SchemaDiff $schema) //Doctrine\\DBAL\\Schema\\SchemaDiff | \\Doctrine\\DBAL\\Schema\\Schema\n {\n return $schema->toSaveSql($this->getPlatform());\n //return $schema->toSql($this->getPlatform()); //it can return with DROP TABLE\n }" ]
codesearchnet
{ "query": "Represent the post about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about programming:" }
Wait a bit and then wait until $.active will become 0. $.active is not documented, but it shows amount of ongoing jQuery requests. @function waitUntilAllAjaxCallsFinish @returns {Function}
[ "function () {\n return function () {\n return casper.wait(200)\n .waitFor(function () {\n var remainingAjaxRequests = this.evaluate(function () {\n var amount = 0;\n\n try {\n ...
[ "function completedPage(instance, error)\n{\n\tmaybeCallback(instance.handlers.page)(error, instance.currentPageUrl, instance.currentCustomData);\n\t\n\t// Auto-starts next queue item, if any\n\t// If not, fires \"end\"\n\tinstance.currentDone();\n}" ]
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code:" }
/** * 取得一个多个Project * @params * page: 页码 * pageSize: 每夜记录条数 * projectOwner 所属用户 * @return * result 返回的模型 * error 错误,如果一切Ok,error为 nil */
[ "func (c *Client) GetProjectList(page string, pageSize string, projectOwner string) (result ProjectListResultModel, err error) {\n\n\tparams := url.Values{}\n\tparams.Add(\"Page\", page)\n\tparams.Add(\"PageSize\", pageSize)\n\n\tif projectOwner != \"\" {\n\t\tparams.Add(\"ProjectOwner\", projectOwner)\n\t}\n\n\tpa...
[ "private static function appRun(){\n // echo \"runing\";\n // 当有get参数传递时 获取get参数\n if(isset($_GET['s'])){\n // 更加\"/\"将get参数分割成数组\n $info = explode('/',$_GET['s']);\n\n // 获取模块名称 转换成小写\n $m = strtolower($info[0]);\n // 获取控制器名称 转换成小写\n ...
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Retrieve the linked MetaModel instance. @return IMetaModel
[ "protected function getTagMetaModel()\n {\n if (empty($this->objSelectMetaModel)) {\n $this->objSelectMetaModel = $this->objAttribute->getTagMetaModel();\n }\n\n return $this->objSelectMetaModel;\n }" ]
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github instruction about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
Return the audio bit rate of the media file in bits per second. @return int
[ "public function getAudioBitRate()\n {\n if ($this->audioBitRate === null) {\n $match = [];\n preg_match(self::$REGEX_AUDIO_BITRATE, $this->output, $match);\n $this->audioBitRate = (int)(array_key_exists(1, $match) ? ($match[1] * 1000) : 0);\n }\n\n return $t...
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the description about Signal Processing:", "pos": "Represent the code about Signal Processing:", "neg": "Represent the code:" }
// Publishes a publication using the default client. Using the underlying broker // set within the options.
[ "func Publish(ctx context.Context, msg Message, opts ...PublishOption) error {\n\treturn DefaultClient.Publish(ctx, msg, opts...)\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 post about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about programming:" }
@param object $import @param string|UploadedFile $file @param string|null $disk @param string|null $readerType @return Reader|PendingDispatch
[ "public function import($import, $file, string $disk = null, string $readerType = null)\n {\n if ($import instanceof ShouldQueue) {\n return $this->queueImport($import, $file, $disk, $readerType);\n }\n\n $filePath = ($file instanceof UploadedFile) ? $file->getClientOriginalName()...
[ "public static function bindToObject(TelegramResponse $data, LoggerInterface $logger): TelegramTypes\n {\n return new File($data->getResult(), $logger);\n }" ]
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }
// IsValid determines if the port range is valid.
[ "func (p PortRange) Validate() error {\n\tproto := strings.ToLower(p.Protocol)\n\tif proto != \"tcp\" && proto != \"udp\" && proto != \"icmp\" {\n\t\treturn errors.Errorf(`invalid protocol %q, expected \"tcp\", \"udp\", or \"icmp\"`, proto)\n\t}\n\tif proto == \"icmp\" {\n\t\tif p.FromPort == p.ToPort && p.FromPort...
[ "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:" }
Format the useragent string to be used in the remote requests made by the class during the update process. @return string the formatted user agent
[ "protected function _getUserAgent()\n {\n $ua = str_replace('%v', self::VERSION, $this->userAgent);\n $ua = str_replace('%m', $this->_getUpdateMethod(), $ua);\n\n return $ua;\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 post about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Marshall the given parameter object.
[ "public void marshall(User user, ProtocolMarshaller protocolMarshaller) {\n\n if (user == null) {\n throw new SdkClientException(\"Invalid argument passed to marshall(...)\");\n }\n\n try {\n protocolMarshaller.marshall(user.getId(), ID_BINDING);\n protocolMarsh...
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the instruction about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Reads a n lines from f with an offset of offset lines.
[ "def tail_of_file(filename, n, ansi2html=False):\n \n avg_line_length = 74\n to_read = n\n\n with open(filename) as f:\n while 1:\n try:\n f.seek(-(avg_line_length * to_read), 2)\n except IOError:\n # woops. apparently file is smaller than what...
[ "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:" }
HelloWorldServer starts a jetty server that responds to http request sent by {@link HelloWorldClient}. The server uses http servlet which is instrumented with opencensus to enable tracing and monitoring stats.
[ "public static void main(String[] args) throws Exception {\n initTracing();\n initStatsExporter();\n\n Server server = new Server(8080);\n ServletContextHandler contextHandler =\n new ServletContextHandler(ServletContextHandler.SESSIONS);\n contextHandler.setContextPath(\"/helloworld\");\n ...
[ "func NewHTTPCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command {\n\tcom, err := cobrafy.Command(http.NewMain())\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tcom.Use = `http`\n\tcom.Short = `listens for and indexes arbitrary JSON data in Pilosa`\n\tcom.Long = `\npdk http listens for and indexes arbitra...
codesearchnet
{ "query": "Represent the Github text about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code about Programming:" }
Create instance of pusher driver. @param mixed[] $config @return \Nuwave\Lighthouse\Subscriptions\Broadcasters\PusherBroadcaster @throws \Pusher\PusherException
[ "protected function createPusherDriver(array $config): PusherBroadcaster\n {\n $connection = $config['connection'] ?? 'pusher';\n $driverConfig = config(\"broadcasting.connections.{$connection}\");\n\n if (empty($driverConfig) || $driverConfig['driver'] !== 'pusher') {\n throw new...
[ "private function registerLaravelSocialiteService()\n {\n $this->app->bind(\\Acacha\\LaravelSocial\\Services\\LaravelSocialiteService::class, function ($app) {\n return new LaravelSocialiteService(\n new \\Acacha\\Filesystem\\Compiler\\StubFileCompiler(),\n new \\A...
codesearchnet
{ "query": "Represent the instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
微信路由地址 @Author Sean Yan @DateTime 2018-08-09 @param string $url [description] @return [type] [description]
[ "public function wechatURL($url = '') {\n $weixin = array('system', 'wechat');\n $string = trim($_SERVER['REQUEST_URI'], \"/\");\n #判断是否是微信链接-内部跳转链接\n if (strstr($string, md5('wechat') . \"_wechat\")) {\n $weixin[] = 'userAuthorization';\n #获取自定义数据 4910_wechat/type/...
[ "def _build_msg_content(self, msgtype='text', **kwargs):\n \n data = {'msgtype': msgtype}\n if msgtype == 'text':\n data[msgtype] = {'content': kwargs.get('content')}\n elif msgtype == 'image' or msgtype == 'voice' or msgtype == 'file':\n data[msgtype] = {'media_id'...
codesearchnet
{ "query": "Represent the Github summarization about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Performs full login data validation @param array $submitted @param array $options @return array|boolean
[ "public function login(array &$submitted, array $options = array())\n {\n $this->options = $options;\n $this->submitted = &$submitted;\n\n $this->validateEmail();\n $this->validatePasswordUser();\n\n return $this->getResult();\n }" ]
[ "private function processAuthenticate(Session $session, AuthenticateMessage $msg)\n {\n $session->abort(new \\stdClass(), 'thruway.error.internal');\n Logger::error($this, 'Authenticate sent to realm without auth manager.');\n }" ]
codesearchnet
{ "query": "Represent the Github sentence about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about Programming:" }
// instantiate applies the pre-instantiation state to the newly // instantiated s.scale and clears the state in s.
[ "func (s *defaultScale) instantiate() {\n\tif s.r != nil {\n\t\ts.scale.Ranger(s.r)\n\t\ts.r = nil\n\t}\n\tif s.formatter != nil {\n\t\ts.scale.SetFormatter(s.formatter)\n\t\ts.formatter = nil\n\t}\n}" ]
[ "function transformer (selection) {\n const type = quantum.isSelection(selection) ? selection.type() : undefined\n const entityTransform = transformMap[type] || defaultTransform\n return entityTransform(selection, transformer, meta) // bootstrap to itself to make the transformer accessible to children\n ...
codesearchnet
{ "query": "Represent the Github post about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code:" }
Check if is over 32 @param bool $force @return bool
[ "public function isOver32(bool $force = false): bool\n {\n // value 0xFFFFFFFF already needs a Zip64 header\n return $force ||\n max(array_slice($this->bytes, 4, 4)) > 0 ||\n min(array_slice($this->bytes, 0, 4)) === 0xFF;\n }" ]
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github text about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Performs a PUT request
[ "function put($url = \"\",$options = array()){\n\t\tif(is_array($url)){\n\t\t\t$options = $url;\n\t\t\t$url = \"\";\n\t\t}\n\t\t$options[\"request_method\"] = \"PUT\";\n\t\treturn $this->fetchContent($url,$options);\n\t}" ]
[ "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 description about Web development:", "pos": "Represent the Github code about Web development:", "neg": "Represent the Github code about Software development:" }
// SetSegmentationMarkers sets the SegmentationMarkers field's value.
[ "func (s *M2tsSettings) SetSegmentationMarkers(v string) *M2tsSettings {\n\ts.SegmentationMarkers = &v\n\treturn s\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 description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Sets the value of the specified key in the current ValueMap to the given value.
[ "public ValueMap withNumberSet(String key, BigDecimal ... val) {\n super.put(key, new LinkedHashSet<BigDecimal>(Arrays.asList(val)));\n return this;\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 description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Recursive copy for directories. @param $source The name of the source directory @param $dest The name of the destination directory
[ "public static function copyRecDir($source, $dest) {\n if (!is_dir($dest)) {\n self::mkdirRec($dest);\n }\n $dir = opendir($source);\n while ($file = readdir($dir)) {\n if ($file == \".\" || $file == \"..\") {\n continue;\n }\n self::copyRec(\"$source/$file\", \"$dest/$file\")...
[ "def is_multifile_object_without_children(self, location: str) -> bool:\n \n # (1) Find the base directory and base name\n if isdir(location): # special case: parent location is the root folder where all the files are.\n return len(self.find_multifile_object_children(location)) == 0...
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Renders a Twitter post item @return void
[ "protected function renderTwitter()\n {\n if (isset($this->feedData->message)) {\n $this->addError($this->feedData->message);\n return;\n }\n\n foreach ($this->feedData as $item) {\n $date = new \\DateTime($item->created_at);\n $timeZone = new \\Da...
[ "function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }" ]
codesearchnet
{ "query": "Represent the Github post about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
// You should always use this function to get a new ListNetworkACLsParams instance, // as then you are sure you have configured all required params
[ "func (s *NetworkACLService) NewListNetworkACLsParams() *ListNetworkACLsParams {\n\tp := &ListNetworkACLsParams{}\n\tp.p = make(map[string]interface{})\n\treturn p\n}" ]
[ "function (err, collection) {\n if (err) {\n return callback(err);\n }\n\n // ensure that the collection option is present before starting a run\n if (!_.isObject(collection)) {\n return callback(new Error(COLLECTION_L...
codesearchnet
{ "query": "Represent the Github post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Add the requested post parameters to the Request. @param request Request to add post params to
[ "private void addPostParams(final Request request) {\n if (friendlyName != null) {\n request.addPostParam(\"FriendlyName\", friendlyName);\n }\n\n if (defaultServiceRoleSid != null) {\n request.addPostParam(\"DefaultServiceRoleSid\", defaultServiceRoleSid);\n }\n\n ...
[ "@Route(method= HttpMethod.GET, uri=\"/{id}\")\n public Result get(@Parameter(\"id\") String id) {\n // The value of id is computed from the {id} url fragment.\n return ok(id);\n }" ]
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Programming:" }
Gets the width/height of an embedded asset. Attempts to extract missing dimensional properties from the embed code. @param EmbeddedAsset $embeddedAsset @return array
[ "private function _getDimensions(EmbeddedAsset $embeddedAsset): array\n\t{\n\t\t$width = $embeddedAsset->width;\n\t\t$height = $embeddedAsset->height;\n\n\t\tif (!$width || !$height)\n\t\t{\n\t\t\t$dom = $this->getEmbedCode($embeddedAsset);\n\n\t\t\tif ($dom)\n\t\t\t{\n\t\t\t\t$iframeElement = $dom->getElementsByTa...
[ "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 Github post about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about Software development:" }
// SetNFSFileShareDefaults sets the NFSFileShareDefaults field's value.
[ "func (s *CreateNFSFileShareInput) SetNFSFileShareDefaults(v *NFSFileShareDefaults) *CreateNFSFileShareInput {\n\ts.NFSFileShareDefaults = 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 summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Returns the values of all parameter methods of this workplace class instance.<p> @return the values of all parameter methods of this workplace class instance
[ "protected Map<String, Object> allParamValues() {\n\n List<Method> methods = paramGetMethods();\n Map<String, Object> map = new HashMap<String, Object>(methods.size());\n Iterator<Method> i = methods.iterator();\n while (i.hasNext()) {\n Method m = i.next();\n Objec...
[ "function () {\n __objCount++;\n /**\n * Counter to be used as an index in each map. Is incremented each time a new entry is added to the object.\n * @protected\n * @type Number\n */\n this._nextIndex = 0;\n /**\n ...
codesearchnet
{ "query": "Represent the sentence about Workspace management:", "pos": "Represent the code about Workspace management:", "neg": "Represent the code:" }
indexed setter for firstIds - sets an indexed value - A list of string ids to identify the first occurrence @generated @param i index in the array to set @param v value to set into the array
[ "public void setFirstIds(int i, String v) { \n if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_firstIds == null)\n jcasType.jcas.throwFeatMissing(\"firstIds\", \"ch.epfl.bbp.uima.types.Cooccurrence\");\n jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Cooccu...
[ "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 description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Take action once the proccessing of an object completes.
[ "def after_object(eng, objects, obj):\n \"\"\"\"\"\"\n # We save each object once it is fully run through\n super(InvenioProcessingFactory, InvenioProcessingFactory)\\\n .after_object(eng, objects, obj)\n obj.save(\n status=obj.known_statuses.COMPLETED,\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 comment:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenConfig.
[ "func (in *TokenConfig) DeepCopy() *TokenConfig {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(TokenConfig)\n\tin.DeepCopyInto(out)\n\treturn out\n}" ]
[ "func ExternalCAsEqualStable(a, b []*api.ExternalCA) bool {\n\t// because DeepEqual will treat an empty list and a nil list differently, we want to manually check this first\n\tif len(a) == 0 && len(b) == 0 {\n\t\treturn true\n\t}\n\t// The assumption is that each individual api.ExternalCA within both lists are cre...
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Register a fetcher. :param name: Fetcher name. :param fetcher: The new fetcher.
[ "def register_fetcher(self, name, fetcher):\n \n assert name not in self.fetchers\n self.fetchers[name] = fetcher" ]
[ "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 Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Get all tv channels.
[ "def get_channels(self):\n \"\"\"\"\"\"\n self.request(EP_GET_TV_CHANNELS)\n return {} if self.last_response is None else self.last_response.get('payload').get('channelList')" ]
[ "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 instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
borrowed from jquery $(elem).is(':visible') implementation
[ "function isVisible(elem) {\n return elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);\n}" ]
[ "def single(self):\n \n return 'display: none;' not in self._looking_for_xpb.li(id='ajax_single').\\\n one_(self._profile.profile_tree).attrib['style']" ]
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
Set the field options. @param array|Collection|Arrayable $options @return $this|Field
[ "public function options($options = [])\n {\n if (!$this->keyAsValue) {\n return parent::options($options);\n }\n\n if ($options instanceof Collection) {\n $options = $options->pluck($this->visibleColumn, $this->key)->toArray();\n }\n\n if ($options instan...
[ "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:" }
Update the toolbar menu - e.g., called when a new subplot or axes are added
[ "def update(self):\n \n DEBUG_MSG(\"update()\", 1, self)\n self._axes = self.canvas.figure.get_axes()\n self._menu.updateAxes(len(self._axes))" ]
[ "def set_form form\n raise \"Form is nil in set_form\" if form.nil?\n @form = form\n @id = form.add_widget(self) if !form.nil? and form.respond_to? :add_widget\n # 2009-10-29 15:04 use form.window, unless buffer created\n # should not use form.window so explicitly everywhere.\n # added...
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code:" }
/* check the two Ipv6 addresses and return false if they are both non global address types, but not the same. (ie. one is sitelocal and the other linklocal) return true otherwise.
[ "private boolean differentLocalAddressTypes(Inet6Address other) {\n\n if (isLinkLocalAddress() && !other.isLinkLocalAddress()) {\n return false;\n }\n if (isSiteLocalAddress() && !other.isSiteLocalAddress()) {\n return false;\n }\n return true;\n }" ]
[ "def sanitize(self):\n '''\n \n '''\n # Priority: each RLOC is assigned a unicast priority. Lower values\n # are more preferable. When multiple RLOCs have the same priority,\n # they MAY be used in a load-split fashion. A value of 255 means\n # the RLOC MUST NOT ...
codesearchnet
{ "query": "Represent the post about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code:" }
for 'file' backend
[ "public static function _getFileNameForCacheId($cacheId)\n {\n $cacheId = str_replace('/', '_', base64_encode($cacheId));\n if (strlen($cacheId) > 50) {\n $cacheId = substr($cacheId, 0, 50).md5($cacheId);\n }\n return \"cache/simple/\".$cacheId;\n }" ]
[ "def star_sep_check(self, original, loc, tokens):\n \"\"\"\"\"\"\n return self.check_py(\"3\", \"keyword-only argument separator (add 'match' to front to produce universal code)\", original, loc, tokens)" ]
codesearchnet
{ "query": "Represent the sentence about File management:", "pos": "Represent the code about File management:", "neg": "Represent the code:" }
Start specified instance
[ "def do_startInstance(self,args):\n \"\"\"\"\"\"\n parser = CommandArgumentParser(\"startInstance\")\n parser.add_argument(dest='instance',help='instance index or name');\n args = vars(parser.parse_args(args))\n\n instanceId = args['instance']\n force = args['force']\n ...
[ "@Override\n\tpublic void validateSetup(Server server, Query query) throws ValidationException {\n\t\tlogger.info(\"Starting Stackdriver writer connected to '{}', proxy {} ...\", gatewayUrl, proxy);\n\t}" ]
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Programming:" }
Authenticate request with a JWT. @param \Illuminate\Http\Request $request @param \Dingo\Api\Routing\Route $route @return mixed
[ "public function authenticate(Request $request, Route $route)\n {\n try {\n if (! $user = JWTAuth::parseToken()->authenticate()) {\n throw new UnauthorizedHttpException('JWTAuth', 'Unable to authenticate with invalid token.');\n }\n } catch (JWTException $except...
[ "public function register()\n {\n // Set API Transformer Adapter & properties\n $this->app['Dingo\\Api\\Transformer\\Factory']->setAdapter(function ($app) {\n return new \\Dingo\\Api\\Transformer\\Adapter\\Fractal(new \\League\\Fractal\\Manager, 'include', ',');\n });\n\n /...
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Software development:" }
Checks an 'A' command.
[ "private void checkA() throws DatatypeException, IOException {\n if (context.length() == 0) {\n appendToContext(current);\n }\n current = reader.read();\n appendToContext(current);\n skipSpaces();\n boolean expectNumber = true;\n\n for (;;) {\n ...
[ "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 instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
/*[deutsch] <p>Bestimmt die Jahresdifferenz zwischen den angegebenen Kalenderjahren. </p> @param y1 first calendar year @param y2 second calendar year @return year difference
[ "public static Years<CalendarUnit> between(CalendarYear y1, CalendarYear y2) {\n\n return Years.ofGregorian(y2.getValue() - y1.getValue());\n\n }" ]
[ "public static String getIBANForKonto(Konto k) {\n String konto = k.number;\n\n // Die Unterkonto-Nummer muss mit eingerechnet werden.\n // Aber nur, wenn sie numerisch ist. Bei irgendeiner Bank wurde\n // \"EUR\" als Unterkontonummer verwendet. Das geht natuerlich nicht,\n // wei...
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// Decode decodes a bech32 encoded string, returning the human-readable // part and the data part excluding the checksum.
[ "func Decode(bech string) (string, []byte, error) {\n\t// The maximum allowed length for a bech32 string is 90. It must also\n\t// be at least 8 characters, since it needs a non-empty HRP, a\n\t// separator, and a 6 character checksum.\n\tif len(bech) < 8 || len(bech) > 90 {\n\t\treturn \"\", nil, fmt.Errorf(\"inva...
[ "@Override\n public Message deserialize(ByteBuffer in) throws ProtocolException, IOException {\n // A Bitcoin protocol message has the following format.\n //\n // - 4 byte magic number: 0xfabfb5da for the testnet or\n // 0xf9beb4d9 for production\n //...
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Programming:" }
Adds a new deserializer to the registry. @param type Type of the data. @param contentType Content type like "application/xml" or "application/json" (without parameters - Only base type). @param deserializer Deserializer.
[ "public final void addDeserializer(@NotNull final SerializedDataType type, final String contentType,\r\n @NotNull final Deserializer deserializer) {\r\n\r\n Contract.requireArgNotNull(\"type\", type);\r\n Contract.requireArgNotNull(\"contentType\", contentType);\r\n Contract.requireA...
[ "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 Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
returns null if no failure
[ "private RunFailure getRunFailure(RootMethodRunResult runResult) {\n if (runResult == null || runResult.getRunFailures().size() == 0) {\n return null; // no failure\n }\n\n // multiple run failures in one test method are not supported yet\n return runResult.getRunFailures().ge...
[ "@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:" }
Gets a vrep collisions handle.
[ "def get_collision_handle(self, collision):\n \n if collision not in self._object_handles:\n h = self._get_collision_handle(collision)\n self._object_handles[collision] = h\n\n return self._object_handles[collision]" ]
[ "def build(self):\n \"\"\"\"\"\"\n from ambry.orm.config import BuildConfigGroupAccessor\n\n # It is a lightweight object, so no need to cache\n return BuildConfigGroupAccessor(self.dataset, 'buildstate', self._session)" ]
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Read `size` number of bytes from `conn`, retrying as needed.
[ "def read_tcp_size(conn, size):\n \"\"\"\"\"\"\n chunks = []\n bytes_read = 0\n while bytes_read < size:\n chunk = conn.recv(size - bytes_read)\n if not chunk:\n if bytes_read > 0:\n logging.warning(\"Incomplete read: %s of %s.\", bytes_read, size)\n return\n chunks.append(chunk)\n ...
[ "function onChunk(count) {\n // If chunk read has no bytes than there is nothing left, so end a\n // collection.\n if (count === 0) return next(end)\n\n // Move a offset `position` with `count` towards the end unless\n // position was a `null` in which case we just keep it (`null` means\n ...
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about File management:" }
Called after the control has been rendered. @method postRender
[ "function () {\n var self = this;\n\n self.aria('haspopup', true);\n\n self.on('click', function (e) {\n if (e.control === self) {\n if (self.panel && self.panel.visible()) {\n self.hidePanel();\n } else {\n self.showPanel();\n ...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
@param $value @return array
[ "protected function findEntity($value)\n {\n $result = $this->finder->{$this->findMethod}($value);\n\n if ($result === null) {\n return [];\n }\n\n return (array) $result;\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 summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
工厂方法,支持的contentType有application/x-www-form-urlencoded,application/json(默认)
[ "public static TokenRequest create(FullHttpRequest httpRequest) {\n if (httpRequest.headers() != null && httpRequest.headers().get(HttpHeaderNames.CONTENT_TYPE) != null\n && httpRequest.headers().get(HttpHeaderNames.CONTENT_TYPE).contains(HttpHeaderValues.APPLICATION_X_WWW_FORM_URLENCODED)) {\...
[ "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 summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Get a specific WordPress parameter. IMPORTANT: this only sets the variable for the current Context! Each Context exists independently. @param string $name Parameter name. @return mixed
[ "public function getWordpressParameter(string $name)\n {\n return ! empty($this->wordpress_parameters[$name]) ? $this->wordpress_parameters[$name] : null;\n }" ]
[ "public static function current()\n {\n if (static::$_current === null) {\n if ($token = AuthToken::current()) {\n //\n // TODO: (known bug)\n // When accessing $token->auth inside an observer other than `auth`,\n // the table name of ...
codesearchnet
{ "query": "Represent the summarization about PHP programming:", "pos": "Represent the code about PHP programming:", "neg": "Represent the code about Software development:" }
// SetMaxResults sets the MaxResults field's value.
[ "func (s *ListModelsInput) SetMaxResults(v int64) *ListModelsInput {\n\ts.MaxResults = &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 Github post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
From the elevation filename, we can figure out and load the data and done arrays.
[ "def set_neighbor_data(self, elev_fn, dem_proc, interp=None):\n \n if interp is None:\n interp = self.build_interpolator(dem_proc)\n opp = {'top': 'bottom', 'left': 'right'}\n for key in self.neighbors[elev_fn].keys():\n tile = self.neighbors[elev_fn][key]\n ...
[ "def handle_dims(opts):\n '''\n \n '''\n use,res = [],[];\n if opts['--X']:\n use.append('x');\n res.append(int(opts['--xres']));\n if opts['--Y']:\n use.append('y');\n res.append(int(opts['--yres']));\n if opts['--Z']:\n use.append('z');\n res.append(i...
codesearchnet
{ "query": "Represent the sentence about Database management:", "pos": "Represent the code about Database management:", "neg": "Represent the code:" }
<p>withFinder.</p> @param server a {@link java.lang.String} object. @param <ID> a ID object. @return a {@link ameba.db.model.Finder} object. @param <T> a T object.
[ "public static <ID, T extends Model> Finder<ID, T> withFinder(String server) {\n Finder<ID, T> finder = _getFinder(server);\n if (finder == null) {\n throw new NotFinderFindException();\n }\n return finder;\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 sentence about text processing:", "pos": "Represent the Github code about text processing:", "neg": "Represent the Github code:" }
Lists out command names and descriptions @return void
[ "public function listCommands()\n {\n $commands = $this->library->getAll();\n\n foreach ($commands as $name => $details) {\n $this->output->writeln(ucwords($name));\n $this->output->hr(strlen($details['description']), '-');\n $this->output->writeln($details['descrip...
[ "@Override\n\tpublic void showHelp(final Terminal terminal) {\n\t\tterminal.writer().println(\"\\t\" + this.toString() + \": generate sql to access the table.\");\n\t\tterminal.writer().println(\n\t\t\t\t\"\\t\\tex) generate [select/insert/update/delete] [table name]<Enter> : Show sql to access tables according to ...
codesearchnet
{ "query": "Represent the Github post about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code:" }
// GetSegmentMLModels returns all models for the account // https://www.getlytics.com/developers/rest-api#segment-m-l
[ "func (l *Client) GetSegmentMLModels() ([]SegmentML, error) {\n\tres := ApiResp{}\n\tdata := []SegmentML{}\n\n\t// make the request\n\terr := l.Get(segmentMLListEndpoint, nil, nil, &res, &data)\n\tif err != nil {\n\t\treturn data, err\n\t}\n\n\treturn data, nil\n}" ]
[ "def cli(verbose):\n \n floyd.floyd_host = floyd.floyd_web_host = \"https://dev.floydhub.com\"\n floyd.tus_server_endpoint = \"https://upload-v2-dev.floydhub.com/api/v1/upload/\"\n configure_logger(verbose)\n check_cli_version()" ]
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code:" }
Return `True` if the registry has been installed in current applications.
[ "def installed(self, app=None):\n \"\"\"\"\"\"\n if app is None:\n app = current_app\n return self.__EXTENSION_NAME in app.extensions" ]
[ "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 comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Fires pre process event @param string|null $name Optional override for name @param string|null $resource Optional override for resource
[ "protected function firePreProcessEvent($name = null, $resource = null)\n {\n if (empty($name)) {\n $name = $this->getEventName();\n }\n if (empty($resource)) {\n $resource = $this->getEventResource();\n }\n $event = new PreProcessApiEvent($name, $this->re...
[ "public function listen($uri, EventHandler $handler, $overRideYamlKey) {\n //CP-2 added this while working on calling listeners during core/components/render call\n //no need to add handlers that will never match our request\n //CP-265 - $overRideYamlKey - render component is the main __YML_KEY...
codesearchnet
{ "query": "Represent the Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Returns the comment the given DOCX4J run is commented with. @param run the DOCX4J run whose comment to retrieve. @param document the document that contains the run. @return the comment, if found, null otherwise.
[ "public static Comments.Comment getCommentAround(R run,\n\t\t\tWordprocessingMLPackage document) {\n\t\ttry {\n\t\t\tif (run instanceof Child) {\n\t\t\t\tChild child = (Child) run;\n\t\t\t\tContentAccessor parent = (ContentAccessor) child.getParent();\n\t\t\t\tif (parent == null)\n\t\t\t\t\treturn null;\n\t\t\t\tCo...
[ "function Rule(rules) {\n this.rules = rules;\n // Identifies individual rule\n this.name = \"\";\n // Identifies the grammar that this rule belongs to \n this.grammarName = \"\";\n // Identifies types of rules. Rules can have \"types\" that are diff...
codesearchnet
{ "query": "Represent the Github description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
// SetChecksum sets the Checksum field's value.
[ "func (s *PutBotOutput) SetChecksum(v string) *PutBotOutput {\n\ts.Checksum = &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 Github text about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
Internal function to return a new chart for a specific date using properties from old chart.
[ "def _computeChart(chart, date):\n \n pos = chart.pos\n hsys = chart.hsys\n IDs = [obj.id for obj in chart.objects]\n return Chart(date, pos, IDs=IDs, hsys=hsys)" ]
[ "@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:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Handle body to stream object. @param string $body The body data. @return StreamInterface Converted to stream object.
[ "protected function handleBody($body)\n {\n if ($body instanceof AbstractView) {\n $this->view = $body;\n }\n\n return parent::handleBody((string) $body);\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 comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
定休日をコンパイルします @param {String} value @return {Object} regular
[ "function compileRegularHoliday(value) {\n if (typeof value === 'function') {\n return value;\n\n } else if (typeof value === 'string') {\n return stringToRegularHolidays(value);\n\n } else if (typeof value === 'number' && 1 <= value && value <= 31) {\n var regular = {week: {}, day: {}, xweek:{}};\n ...
[ "function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }" ]
codesearchnet
{ "query": "Represent the comment about text processing:", "pos": "Represent the code about text processing:", "neg": "Represent the code:" }
Use this API to delete snmptrap of given name.
[ "public static base_response delete(nitro_service client, String trapclass) throws Exception {\n\t\tsnmptrap deleteresource = new snmptrap();\n\t\tdeleteresource.trapclass = trapclass;\n\t\treturn deleteresource.delete_resource(client);\n\t}" ]
[ "func New(*SmartSampleConfig, log.Logger, dtsink) (*SmartSampler, error) {\n\treturn nil, errors.New(\"you are attempting to configure a regular SignalFx Gateway with the config of a Smart Gateway. This is an unsupported configuration\")\n}" ]
codesearchnet
{ "query": "Represent the Github summarization about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Fuzzy matching helpers
[ "function getMatcher(f) {\n if (!isPrimitive(f)) {\n var className = classToString(f);\n if (isRegExp(f, className)) {\n return regexMatcher(f);\n } else if (isDate(f, className)) {\n return dateMatcher(f);\n } else if (isFunction(f, className)) {\n return functionMatcher(f);\n } else...
[ "public FunctionHandle resolveFunction(Session session, QualifiedName name, List<TypeSignatureProvider> parameterTypes)\n {\n // TODO Actually use session\n // Session will be used to provide information about the order of function namespaces to through resolving the function.\n // This is l...
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
This is the watcher callback to verify the file actually changed @param dir @returns {Function}
[ "function getWatcher(dir) {\n return function (event, fileName) {\n if (event === \"rename\") {\n verifyWatches();\n if (fileName) {\n if (!fs.existsSync(dir + fileName)) { return; }\n var dirStat;\n try {\n dirStat = fs...
[ "def _enter(self):\n \"\"\"\"\"\"\n command = self.command\n logger.log(5, \"Snippet keystroke `Enter`.\")\n # NOTE: we need to set back the actions (mode_off) before running\n # the command.\n self.mode_off()\n self.run(command)" ]
codesearchnet
{ "query": "Represent the Github text about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Take 1st version string found. :param found: possible version string :return:
[ "def version_to_write(self, found): # type: (str) -> Version\n \n first = False\n if self.version is None:\n first = True\n try:\n self.current_version, self.version, self.schema = version_object_and_next(\n found.strip(\" \")\n ...
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the instruction about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Set property. @param synset the synset @param name the name @param property the property
[ "protected final void setProperty(Synset synset, PropertyName name, Property property) {\n Cast.as(synset, SynsetImpl.class).setProperty(name, property);\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 text about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Гео-кодирование по координатам @see http://api.yandex.ru/maps/doc/geocoder/desc/concepts/input_params.xml#geocode-format @param float $longitude Долгота в градусах @param float $latitude Широта в градусах @return self
[ "public function setPoint($longitude, $latitude)\n {\n $longitude = (float)$longitude;\n $latitude = (float)$latitude;\n $this->_filters['geocode'] = sprintf('%F,%F', $longitude, $latitude);\n return $this;\n }" ]
[ "final protected function v($name = null) {return dfak($this, function() {\n\t\t$result = dfa($this->_data, 'value', []);\n\t\t/**\n\t\t * 2016-06-29\n\t\t * Что интересно, при смене области действия настроек с глобальной на другую (сайт или магазин)\n\t\t * поле «value» может почему-то содержать не массив,\n\t\t *...
codesearchnet
{ "query": "Represent the summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Write the low eight (all) bytes of a value to the stream in big endian order. @param n the value to use.
[ "public void write8BE(final long n) {\n write((byte) (n >> 56 & 0xff));\n write((byte) (n >> 48 & 0xff));\n write((byte) (n >> 40 & 0xff));\n write((byte) (n >> 32 & 0xff));\n write((byte) (n >> 24 & 0xff));\n write((byte) (n >> 16 & 0xff));\n write((byte) (n >> 8 & ...
[ "def read_plain_boolean(file_obj, count):\n \"\"\"\"\"\"\n # for bit packed, the count is stored shifted up. But we want to pass in a count,\n # so we shift up.\n # bit width is 1 for a single-bit boolean.\n return read_bitpacked(file_obj, count << 1, 1, logger.isEnabledFor(logging.DEBUG))" ]
codesearchnet
{ "query": "Represent the description about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code about programming:" }
// FindTelegrafConfigByID returns a single telegraf config by ID.
[ "func (s *TelegrafConfigStore) FindTelegrafConfigByID(ctx context.Context, id platform.ID) (*platform.TelegrafConfig, error) {\n\treturn s.FindTelegrafConfigByIDF(ctx, id)\n}" ]
[ "func (e *environ) AdoptResources(ctx context.ProviderCallContext, controllerUUID string, fromVersion version.Number) error {\n\t// This provider doesn't track instance -> controller.\n\treturn nil\n}" ]
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Returns a snake cased version of a string. :param a_string: any :class:`str` object. Usage: >>> snake_case('FooBar') "foo_bar"
[ "def snake_case(a_string):\n \n\n partial = re.sub('(.)([A-Z][a-z]+)', r'\\1_\\2', a_string)\n return re.sub('([a-z0-9])([A-Z])', r'\\1_\\2', partial).lower()" ]
[ "def normalize_id(string):\n \n if not isinstance(string, basestring):\n fail(\"Type of argument must be string, found '{}'\"\n .format(type(string)))\n # get the id nomalizer utility\n normalizer = getUtility(IIDNormalizer).normalize\n return normalizer(string)" ]
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
// Free releases a memory of a lattice.
[ "func (la *Lattice) Free() {\n\tla.Input = \"\"\n\tla.Output = la.Output[:0]\n\tfor i := range la.list {\n\t\tfor j := range la.list[i] {\n\t\t\tnodePool.Put(la.list[i][j])\n\t\t}\n\t\tla.list[i] = la.list[i][:0]\n\t}\n\tla.list = la.list[:0]\n\tla.udic = nil\n\tlatticePool.Put(la)\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 comment about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code about programming:" }
constructor :param v: things used to constrcut date :type v: timestamp in float, datetime.date object, or ISO-8601 in str
[ "def apply_with(self, _, v, ctx):\n \n self.v = None\n if isinstance(v, float):\n self.v = datetime.date.fromtimestamp(v)\n elif isinstance(v, datetime.date):\n self.v = v\n elif isinstance(v, six.string_types):\n self.v = from_iso8601(v).date()\n ...
[ "def _parse_filter_word(self, word):\n \n if isinstance(word, str):\n word = \"'{}'\".format(word)\n elif isinstance(word, dt.date):\n if isinstance(word, dt.datetime):\n if word.tzinfo is None:\n # if it's a naive datetime, localize the d...
codesearchnet
{ "query": "Represent the text about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Error handling during requests.
[ "def handle_exception!(boom)\n if error_params = @env['sinatra.error.params']\n @params = @params.merge(error_params)\n end\n @env['sinatra.error'] = boom\n\n if boom.respond_to? :http_status\n status(boom.http_status)\n elsif settings.use_code? and boom.respond_to? :code and ...
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the instruction about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
Last n product orders. @Template()
[ "public function mostRecentOrdersAction($max = 20)\n {\n $em = $this->getDoctrine()->getManager();\n\n /** @var ProductOrderRepository $productOrderRepo */\n $productOrderRepo = $em->getRepository('AmulenShopBundle:ProductOrder');\n $orders = $productOrderRepo->recentOrders($max);\n\n...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// WithRoles adds roles to the HTTP JSON response for a user
[ "func (u *sourceUserResponse) WithRoles(srcID int, roles []chronograf.Role) *sourceUserResponse {\n\tu.hasRoles = true\n\trr := make([]sourceRoleResponse, len(roles))\n\tfor i, role := range roles {\n\t\trr[i] = newSourceRoleResponse(srcID, &role)\n\t}\n\tu.Roles = rr\n\treturn u\n}" ]
[ "public FunctionHandle resolveFunction(Session session, QualifiedName name, List<TypeSignatureProvider> parameterTypes)\n {\n // TODO Actually use session\n // Session will be used to provide information about the order of function namespaces to through resolving the function.\n // This is l...
codesearchnet
{ "query": "Represent the Github comment about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about Software development:" }
Get single-source __version__.
[ "def get_version():\n \"\"\"\"\"\"\n pkg_dir = get_package_dir()\n with open(os.path.join(pkg_dir, 'nestcheck/_version.py')) as ver_file:\n string = ver_file.read()\n return string.strip().replace('__version__ = ', '').replace('\\'', '')" ]
[ "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 post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Main program entry point. @mitogen.main() is just a helper to handle reliable setup/destruction of Broker, Router and the logging package.
[ "def main(router):\n \n argv = sys.argv[1:]\n if not len(argv):\n print('mitop: Need a list of SSH hosts to connect to.')\n sys.exit(1)\n\n delay = 2.0\n select = mitogen.select.Select(oneshot=False)\n hosts = []\n\n # For each hostname on the command line, create a Host instance,...
[ "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 about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
The interception method. It just returns a {@code REDIRECT} result to the computed URI. @param route the route @param context the filter context @return the result @throws Exception if anything bad happen
[ "@Override\n public Result call(final Route route, final RequestContext context) throws Exception {\n URI redirectedURI = rewriteURI(context.request());\n logger.debug(\"Redirecting request - rewriting {} to {}\", context.request().uri(), redirectedURI);\n if (redirectedURI == null) {\n ...
[ "@Override\n public void setAttributes(final Map<String, List<Object>> attrs) {\n for (final Entry<String, List<Object>> attrEntry : attrs.entrySet()) {\n final String key = attrEntry.getKey();\n final List<Object> value = attrEntry.getValue();\n setAttribute(key, value);\...
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:" }
Change map type to topic type.
[ "private String changeclassValue(final String classValue) {\n final DitaClass cls = new DitaClass(classValue);\n if (cls.equals(MAP_LINKTEXT)) {\n return TOPIC_LINKTEXT.toString();\n } else if (cls.equals(MAP_SEARCHTITLE)) {\n return TOPIC_SEARCHTITLE.toString();\n ...
[ "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 summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
Returns the constant predicate that always returns {@code b}.
[ "public static <T> Predicate<T> constant(final boolean b) {\n return b\n ? Predicates.<Object, T>narrow(TRUE)\n : Predicates.<Object, T>narrow(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 post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Decodes a signed Byte object from exactly 1 or 2 bytes. If null is returned, then 1 byte was read. @param src source of encoded bytes @param srcOffset offset into source array @return signed Byte object or null
[ "public static Byte decodeByteObj(byte[] src, int srcOffset)\r\n throws CorruptEncodingException\r\n {\r\n try {\r\n int b = src[srcOffset];\r\n if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {\r\n return null;\r\n }\r\n return decodeByte(s...
[ "def create_response_pdu(self, data):\n \n log.debug('Create single bit response pdu {0}.'.format(data))\n bytes_ = [data[i:i + 8] for i in range(0, len(data), 8)]\n\n # Reduce each all bits per byte to a number. Byte\n # [0, 0, 0, 0, 0, 1, 1, 1] is intepreted as binary en is deci...
codesearchnet
{ "query": "Represent the comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Software development:" }
Use this method if you want to access LanguageTool's otherwise internal analysis of the text. For actual text checking, use the {@code check...} methods instead. @param text The text to be analyzed @since 2.5
[ "public List<AnalyzedSentence> analyzeText(String text) throws IOException {\n List<String> sentences = sentenceTokenize(text);\n return analyzeSentences(sentences);\n }" ]
[ "function Rule(rules) {\n this.rules = rules;\n // Identifies individual rule\n this.name = \"\";\n // Identifies the grammar that this rule belongs to \n this.grammarName = \"\";\n // Identifies types of rules. Rules can have \"types\" that are diff...
codesearchnet
{ "query": "Represent the Github text about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Write some bytes into the connection. @param string $content @return int The written bytes
[ "public function write($content)\n {\n\n $bytes = $this->stream()->write($content);\n $this->didWrite = true;\n return $bytes;\n }" ]
[ "def _make_read_lob_request(self, readoffset, readlength):\n \n self._connection._check_closed()\n\n request = RequestMessage.new(\n self._connection,\n RequestSegment(\n message_types.READLOB,\n (ReadLobRequest(self._lob_header.locator_id, re...
codesearchnet
{ "query": "Represent the sentence about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about software development:" }
convert module id to filename
[ "function getFilename(id, options, next) {\n\tvar Path = require('path'),\n\t\troot = options.root || exports.defaults.root,\n\t\tmap = options.map || {},\n\t\tforbid = (options.forbid || []).map(function(forbid) {\n\t\t\treturn forbid.test ? forbid : Path.resolve(root, forbid);\n\t\t}),\n\t\tfilename;\n\n\tfunctio...
[ "function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }" ]
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }