query
stringlengths
16
255
pos
list
neg
list
task
stringclasses
1 value
instruction
dict
@return array @codeCoverageIgnore @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
[ "protected function aspectConfiguration(): array\n {\n $map = [];\n $file = $this->configure['cache_dir'] . \"/{$this->mapFile}\";\n if ($this->configure['cache']) {\n if ($this->filesystem->exists($file)) {\n foreach ($this->modules as $module) {\n ...
[ "protected function isConvertEmptyStringsToNullRegistered()\n {\n $kernal = $this->getLaravel()->make(\\App\\Http\\Kernel::class);\n\n return $kernal->hasMiddleware(\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull::class);\n }" ]
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Change account notification settings. @return \Illuminate\Http\RedirectResponse
[ "public function changeNotifications(Request $request)\n {\n $this->validate(\n $request,\n [\n 'notifications' => 'required|array',\n ]\n );\n\n foreach ($request->input('notifications') as $notification => $enable) {\n Auth::user()...
[ "public function register()\n {\n $this->registerFileConfig();\n $this->registerDatabaseConfig();\n\n // Bind the concrete types\n $this->app->bind('Concrete\\Core\\Config\\Repository\\Repository', 'config');\n $this->app->bind('Illuminate\\Config\\Repository', 'Concrete\\Core\...
codesearchnet
{ "query": "Represent the Github sentence about Laravel:", "pos": "Represent the Github code about Laravel:", "neg": "Represent the Github code:" }
For landscape orientation, the click listener is attached to the instruction text layout and the constraints are adjusted before animating
[ "private void initializeLandscapeListListener() {\n instructionLayoutText.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View instructionLayoutText) {\n boolean instructionsVisible = instructionListLayout.getVisibility() == VISIBLE;\n if (!instructionsVisible...
[ "@Override\n public void onGestureBegin(TransformGestureDetector detector) {\n FLog.v(TAG, \"onGestureBegin\");\n mPreviousTransform.set(mActiveTransform);\n onTransformBegin();\n // We only received a touch down event so far, and so we don't know yet in which direction a\n // future move event will...
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// Sadly, the binder lookups can not be declared initialized -- that results in // an "initialization loop" compile error.
[ "func init() {\n\tKindBinders[reflect.Int] = IntBinder\n\tKindBinders[reflect.Int8] = IntBinder\n\tKindBinders[reflect.Int16] = IntBinder\n\tKindBinders[reflect.Int32] = IntBinder\n\tKindBinders[reflect.Int64] = IntBinder\n\n\tKindBinders[reflect.Uint] = UintBinder\n\tKindBinders[reflect.Uint8] = UintBinder\n\tKind...
[ "void appendGoogRequiresTo(StringBuilder sb) {\n for (GoogRequire require : googRequires.values()) {\n // TODO(lukes): we need some namespace management here... though really we need namespace\n // management with all declarations... The problem is that a require could introduce a name\n // alias ...
codesearchnet
{ "query": "Represent the comment about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code:" }
insertion function for parameters to toolbar
[ "function addParams(name,command,key,tag,emphasis)\r\n\t\t{\r\n\t\t\tvar thisCssNo = buttons.length+1;\r\n\t\t\treturn buttons.push({name:name, cls:thisCssNo, command:command, key:key, tag:tag, emphasis:emphasis});\r\n\t\t}" ]
[ "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 instruction:", "pos": "Represent the code:", "neg": "Represent the code:" }
Gets all of the column names for a result meta data @param rsmd Resultset metadata @return Array of column names @throws Exception exception
[ "private String[] getColumnNames(ResultSetMetaData rsmd) throws Exception {\n ArrayList<String> names = new ArrayList<String>();\n\n // Get result set meta data\n int numColumns = rsmd.getColumnCount();\n\n // Get the column names; column indices start from 1\n for (int i = 1; i <...
[ "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 summarization about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Create a new visitor if is unknown. @return bool
[ "private function createVisitorIfIsUnknown()\n {\n $model = $this->getModel();\n\n /** @var \\Arcanedev\\LaravelTracker\\Models\\Visitor $visitor */\n if ($this->isVisitorKnown()) {\n $visitor = $model->newQuery()->find($id = $this->getVisitorData($model->getKeyName()));\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 instruction about NLP:", "pos": "Represent the code about NLP:", "neg": "Represent the code about File management:" }
// RegisterTLSConfig registers a custom tls.Config to be used with sql.Open.
[ "func RegisterTLSConfig(key string, config *tls.Config) error {\n\ttlsConfigLock.Lock()\n\tif tlsConfigRegistry == nil {\n\t\ttlsConfigRegistry = make(map[string]*tls.Config)\n\t}\n\n\ttlsConfigRegistry[key] = config\n\ttlsConfigLock.Unlock()\n\treturn nil\n}" ]
[ "func WithNamespace(ctx context.Context, namespace string) context.Context {\n\tctx = context.WithValue(ctx, namespaceKey{}, namespace) // set our key for namespace\n\n\t// also store on the grpc headers so it gets picked up by any clients that\n\t// are using this.\n\treturn withGRPCNamespaceHeader(ctx, namespace)...
codesearchnet
{ "query": "Represent the Github comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about consul address:" }
Return the stanza-id element of a message. @param message message @return stanza-id element of a jid, or null if absent.
[ "public static StanzaIdElement getStanzaId(Message message) {\n return message.getExtension(StanzaIdElement.ELEMENT, StableUniqueStanzaIdManager.NAMESPACE);\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 Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
Format credit or debit accountside @param string $value @return string formatted language string @throws Exception if sign other than C,D given
[ "public static function formatAccountside($value) {\n if ($value === StaticEb::$accountsideDebitSign) {\n return \\Yii::t('common/staticeb', 'Debit');\n } else if ($value === StaticEb::$accountsideCreditSign) {\n return \\Yii::t('common/staticeb', 'Credit');\n } else {\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 post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
将 参数数组 变回 字符串形式的参数格式 @param array $array_query @return string
[ "public static function getUrlQuery(array $array_query)\n {\n $tmp = [];\n foreach ($array_query as $name => $value) {\n if (is_array($value)) {\n foreach ($value as $k => $v) {\n $tmp[] = \"{$name}[{$k}]={$v}\";\n }\n } else {\...
[ "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 post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
This method gets the {@link NlsMessageFactory} used to create instances of {@link net.sf.mmm.util.nls.api.NlsMessage}. @return the factory instance.
[ "public static NlsMessageFactory getFactory() {\n\n if (factory == null) {\n synchronized (NlsAccess.class) {\n if (factory == null) {\n NlsMessageFactoryImpl factoryImpl = new NlsMessageFactoryImpl();\n factoryImpl.initialize();\n factory = factoryImpl;\n }\n }...
[ "public ControlBeanContext instantiate(ControlBean controlBean) {\n if(!(controlBean instanceof org.apache.beehive.controls.runtime.bean.ControlBean))\n throw new IllegalArgumentException(\"The ControlBean of type \\\"\" +\n controlBean.getClass().getName() +\n \"\\\"...
codesearchnet
{ "query": "Represent the Github comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
@param mixed $offset @param mixed $data @return mixed
[ "public function offsetSet($offset, $data)\n {\n if ($this->items === null) {\n $this->fillItems();\n }\n\n return $this->items[$offset] = $data;\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 instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Processes the expectation. @return mixed
[ "protected function _processDelegated()\n {\n $exception = null;\n\n try {\n call_user_func($this->_handler);\n } catch (Throwable $e) {\n $exception = $e;\n } catch (Exception $e) {\n $exception = $e;\n }\n\n if (!$exception) {\n ...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Bound to a game instance, will add a single entity.
[ "function(entity) {\n // Bind to start event right away.\n var boundStart = entity.start.bind(entity);\n this.on('start', boundStart);\n // Bind to preloadComplete, but only once.\n var boundPreloadComplete = entity.preloadComplete.bind(entity);\n this.once('preloadComplete', boundPreloadComplete);\n // Only...
[ "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:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Send and parse the request pool @return \StdClass
[ "public function send()\n {\n $responses = new \\StdClass();\n\n foreach ($this->resources as $key => $promise) {\n $response = $promise->wait();\n $responses->{$key} = $this->parse($response->getBody());\n }\n\n return $responses;\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 sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Adds stock levels to the given product in the database. @param string $productid ID of the product item where the stock levels should be associated to @param array $data Two dimensional associative list of product stock data
[ "protected function _addProductStock( $productid, array $data )\n\t{\n\t\t$manager = MShop_Factory::createManager( $this->_getContext(), 'product/stock/warehouse' );\n\n\t\t$warehouses = array();\n\t\tforeach( $manager->searchItems( $manager->createSearch() ) as $id => $item ) {\n\t\t\t$warehouses[ $item->getCode()...
[ "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 Github description about Aimeos:", "pos": "Represent the Github code about Aimeos:", "neg": "Represent the Github code about programming:" }
// SetVideoDescriptionName sets the VideoDescriptionName field's value.
[ "func (s *Output) SetVideoDescriptionName(v string) *Output {\n\ts.VideoDescriptionName = &v\n\treturn s\n}" ]
[ "private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n GetField fields = in.readFields();\n beginDefaultContext = fields.get(BEGIN_DEFAULT, true);\n\n // Note that further processing is required in JEEMetadataContextProviderImpl.deserializeThreadCo...
codesearchnet
{ "query": "Represent the Github comment about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
SQLパラメータの解析 @param sql 解析対象SQL @return SQLを解析して取得したパラメータキーのセット
[ "public static Set<String> getSqlParams(final String sql) {\n\t\tSqlParser parser = new SqlParserImpl(sql);\n\t\tContextTransformer transformer = parser.parse();\n\t\tNode rootNode = transformer.getRoot();\n\n\t\tSet<String> params = new LinkedHashSet<>();\n\t\ttraverseNode(rootNode, params);\n\t\tparams.removeIf(s...
[ "func (m *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\t// NOTE ucon内部のルーティングは一元的にこの関数から行う\n\t// Handlerを細分化しhttp.ServeMuxに登録すると、OPTIONSのhandleがうまくできなくなる\n\t// このため、Handlerはucon全体で1つとし、OPTIONSも通常のMethodと同じようにHandlerを設定し利用する\n\t// OPTIONSを適切にhandleするため、全てのHandlerに特殊なHookを入れるよりマシである\n\n\tm.router.S...
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Loads the xml file, substitutes params @param string $file @param array $params @return string
[ "protected static function renderXML($file, $params)\n {\n // check if already loaded\n if (empty(static::$xml[$file])) {\n // load if file not loaded\n static::$xml[$file] = file_get_contents(__DIR__ . '/xml/'.$file.'.xml');\n }\n\n // build the search and repla...
[ "public function insertInsertTagMD( $objPage, $objLayout, $objPageRegular)\n {\n // set vary header for browsers to avoid caching in Proxies for different browsers\n header('Vary: User-Agent', false);\n \n // add mobiledetectioncss class to page css class\n $objPage->cssClass = $...
codesearchnet
{ "query": "Represent the text about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
// WithServer allows to customize the underlying http.Server // Note: when using Run() the handler and the address will change
[ "func WithServer(server *http.Server) RouterOption {\n\treturn func(router *Router) {\n\t\trouter.server = server\n\t}\n}" ]
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Given the set of betas it computes a new set of control points and adjust sthe scale using the {@llin #matchScale} function.
[ "private void refine( double betas[] ) {\n\t\tfor( int i = 0; i < numControl; i++ ) {\n\t\t\tdouble x=0,y=0,z=0;\n\n\t\t\tfor( int j = 0; j < numControl; j++ ) {\n\t\t\t\tPoint3D_F64 p = nullPts[j].get(i);\n\t\t\t\tx += betas[j]*p.x;\n\t\t\t\ty += betas[j]*p.y;\n\t\t\t\tz += betas[j]*p.z;\n\t\t\t}\n\n\t\t\ttempPts0...
[ "def transform_cb(self, setting, value):\n \"\"\"\"\"\"\n self.make_callback('transform')\n\n # whence=0 because need to calculate new extents for proper\n # cutout for rotation (TODO: always make extents consider\n # room for rotation)\n whence = 0\n self.redraw(wh...
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Output escaped value. @param value
[ "private void escape(String value) {\n int n = value.length();\n int i = 0;\n for (int j = 0; j < n; ++j) {\n int k = ESCAPED_CHARS.indexOf(value.charAt(j));\n if (k >= 0) {\n if (i < j) {\n append(value, i, j);\n }\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 instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Removes COD settings options. Use this in case you change your mind and want to remove the COD settings you previously set.
[ "public function resetCodSettings(){\n foreach($this->options as $op=>$junk){\n if(preg_match(\"#CODSettings#\",$op)){\n unset($this->options[$op]);\n }\n }\n }" ]
[ "public function postCommit(\n InputInterface $input,\n OutputInterface $output,\n ParameterBagInterface $configuration\n ): void {\n // Yes we can send a notification to slack fx?\n // Then we would just add some configuration with slack channel, username etc etc\n // A...
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Compares two columns given by their names. @param objA The name of the first column @param objB The name of the second column @return @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
[ "public int compare(Object objA, Object objB)\r\n {\r\n String idAStr = _table.getColumn((String)objA).getProperty(\"id\");\r\n String idBStr = _table.getColumn((String)objB).getProperty(\"id\");\r\n int idA;\r\n int idB;\r\n\r\n try {\r\n idA = Integer.parseInt(idAS...
[ "public static <T extends Comparable<? super T>> boolean lessThan(final T object, final T other) {\n\n return JudgeUtils.lessThan(object, other);\n }" ]
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
// ETA returns the estimated time at which the the download will complete, given // the current BytesPerSecond. If the transfer has already completed, the actual // end time will be returned.
[ "func (c *Response) ETA() time.Time {\n\tif c.IsComplete() {\n\t\treturn c.End\n\t}\n\tbt := c.BytesComplete()\n\tbps := c.transfer.BPS()\n\tif bps == 0 {\n\t\treturn time.Time{}\n\t}\n\tsecs := float64(c.Size-bt) / bps\n\treturn time.Now().Add(time.Duration(secs) * time.Second)\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:", "pos": "Represent the code:", "neg": "Represent the code about File management:" }
Returns the commerce order matching the UUID and group. @param uuid the commerce order's UUID @param groupId the primary key of the group @return the matching commerce order, or <code>null</code> if a matching commerce order could not be found
[ "@Override\n\tpublic CommerceOrder fetchCommerceOrderByUuidAndGroupId(String uuid,\n\t\tlong groupId) {\n\t\treturn commerceOrderPersistence.fetchByUUID_G(uuid, groupId);\n\t}" ]
[ "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 comment about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }
// SetWhitePointY sets the WhitePointY field's value.
[ "func (s *Hdr10Metadata) SetWhitePointY(v int64) *Hdr10Metadata {\n\ts.WhitePointY = &v\n\treturn s\n}" ]
[ "function writeImageDesc() {\n\n out.writeByte(0x2c); // image separator\n WriteShort(0); // image position x,y = 0,0\n WriteShort(0);\n WriteShort(width); // image size\n WriteShort(height);\n\n // packed fields\n if (firstFrame) {\n // no LCT - GCT is used for first (or only) frame\n ...
codesearchnet
{ "query": "Represent the post about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Make a confidence report and save it to disk.
[ "def main(argv=None):\n \n assert len(argv) >= 3\n _name_of_script = argv[0]\n model_filepath = argv[1]\n adv_x_filepaths = argv[2:]\n\n sess = tf.Session()\n with sess.as_default():\n model = serial.load(model_filepath)\n\n factory = model.dataset_factory\n factory.kwargs['train_start'] = FLAGS.train_s...
[ "protected function addSynchronizationInformation()\n {\n $this->html->pInfo($this->_(\n 'Check source for new surveys, changes in survey status and survey deletion. Can also perform maintenance on some sources, e.g. by changing the number of attributes.'\n ));\n $this...
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Data synchronization:" }
POST /workflows POST /workflows.json
[ "def create\n @workflow = Workflow.new(workflow_params)\n\n\n respond_to do |format|\n if @workflow.save\n format.html {\n if(@workflow.stages.count > 1)\n redirect_to configure_stages_workflow_path(@workflow), notice: 'Workflow was successfully created. Please conf...
[ "def fetch_all_records(self):\n \n \"\"\"\n api = self.doapi_manager\n return map(self._record, api.paginate(self.record_url, 'domain_records'))" ]
codesearchnet
{ "query": "Represent the comment:", "pos": "Represent the code:", "neg": "Represent the code about AWS Route 53:" }
Returns an array of available kinds, including their group
[ "function(includeClusterScoped) {\n var kinds = [];\n var rejectedKinds = _.map(Constants.AVAILABLE_KINDS_BLACKLIST, function(kind) {\n return _.isString(kind) ?\n { kind: kind, group: '' } :\n kind;\n });\n\n // ignore the legacy openshift kinds, these have been migrated ...
[ "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:" }
Create a new instance of a given class @param string $className The class to create @return object The new class
[ "public function createNew($className)\n {\n $constructArguments = func_get_args();\n $object = $this->_createNew( ...$constructArguments);\n \n $traits = class_uses($object);\n\n if (isset($traits[Framework::class]) == true) {\n $object->setContainer($this->containe...
[ "private function _init()\n {\n // TODO: check if self::$instance is required here or if we can only set\n // decorated object\n\n // initialize and store the instance of template engine for further access\n self::$instance = Doozr_Loader_Serviceloader::load($this->library, $this->res...
codesearchnet
{ "query": "Represent the sentence about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code:" }
Operation deleteBraintreeGatewayByIdAsyncWithHttpInfo Delete BraintreeGateway @param string $braintree_gateway_id ID of braintreeGateway to delete. (required) @throws \InvalidArgumentException @return \GuzzleHttp\Promise\PromiseInterface
[ "protected static function deleteBraintreeGatewayByIdAsyncWithHttpInfo($braintree_gateway_id) \n {\n $returnType = ''; \n $request = self::deleteBraintreeGatewayByIdRequest($braintree_gateway_id); \n\n return self::getHttpClient()\n ->sendAsync($request, self::createHttpClientOpt...
[ "public function createSecureLink($subscriptionId)\n {\n $requestData = new CreateSecureLink\\RequestData($subscriptionId);\n $request = new CreateSecureLink\\Request($requestData);\n\n return $this->sendRequest($request, CreateSecureLink\\ApiResponse::class);\n }" ]
codesearchnet
{ "query": "Represent the sentence about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about programming:" }
// WriteClientText is the same as WriteClientMessage with // ws.OpText.
[ "func WriteClientText(w io.Writer, p []byte) error {\n\treturn WriteClientMessage(w, ws.OpText, p)\n}" ]
[ "def getKeySequenceCounter(self):\n \"\"\"\"\"\"\n print '%s call getKeySequenceCounter' % self.port\n keySequence = ''\n keySequence = self.__sendCommand(WPANCTL_CMD + 'getprop -v Network:KeyIndex')[0]\n return keySequence" ]
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code:" }
Parse the diff of one file Parse the unified diff for one file, which may consists of a finitie amount of diff chunks. @param \Arbit\VCSWrapper\Diff\Collection $diff @param array $lines @return void
[ "protected function parseFileDiff(\\Arbit\\VCSWrapper\\Diff\\Collection $diff, array $lines)\n {\n $chunks = array();\n while (count($lines)) {\n // Skip lines until we hit a range specification\n while (!preg_match('(^@@\\\\s+-(?P<start>\\\\d+)(?:,\\\\s*(?P<startrange>\\\\d+)...
[ "def requests(self):\n ''''''\n path = pathjoin(self.path, self.name, Request.path)\n response = self.service.send(SRequest('GET', path))\n # a bin behaves as a push-down store --- better to return the requests\n # in order of appearance\n return list(reversed(Request.from_...
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Load the NetUI framework's implicit objects into the request. @param request the request @param response the response @param servletContext the servlet context @param currentPageFlow the current page flow
[ "public static void loadImplicitObjects(HttpServletRequest request,\n HttpServletResponse response,\n ServletContext servletContext,\n PageFlowController currentPageFlow) {\n // @todo...
[ "@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 instruction about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Delete a file @param int|array $file @return bool
[ "protected function deleteFile($file)\n {\n if ($this->getParam('disk')) {\n return $this->file->deleteAll($file);\n }\n\n if (isset($file['file_id'])) {\n $file = $file['file_id'];\n }\n\n return $this->file->delete($file);\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 instruction about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about programming:" }
Change cache implementation. The contents of the old cache will be transferred to the new one. :param cache_impl: Name of cache implementation, must exist in AVAILABLE_CACHES
[ "def set_cache_impl(self, cache_impl, maxsize, **kwargs):\n \n new_cache = self._get_cache_impl(cache_impl, maxsize, **kwargs)\n self._populate_new_cache(new_cache)\n self.cache = new_cache" ]
[ "def get_instance(cls, dependencies=None):\n \n assert cls is not ContractBase, 'ContractBase is not meant to be used directly.'\n assert cls.CONTRACT_NAME, 'CONTRACT_NAME must be set to a valid keeper contract name.'\n return cls(cls.CONTRACT_NAME, dependencies)" ]
codesearchnet
{ "query": "Represent the Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
List of child TreeViewColumns including this item as the first column
[ "def _get_columns(self):\n \n return [self] + [c for c in self.children\n if isinstance(c, TreeViewColumn)]" ]
[ "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:" }
Simply rewrites extensions file from scratch. @param Event $event
[ "public function onPostAutoloadDump(Event $event)\n {\n $this->io->writeError('<info>Generating extensions files</info>');\n foreach ($this->getPackages() as $package) {\n if ($package instanceof \\Composer\\Package\\CompletePackageInterface) {\n $this->processPackage($pac...
[ "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 about getstream.io:", "pos": "Represent the Github code about getstream.io:", "neg": "Represent the Github code about Software development:" }
Returns the bean instance that matches the given token. @param token the token @return an instance of the bean
[ "protected Object getBean(Token token) {\n Object value;\n if (token.getAlternativeValue() != null) {\n if (token.getDirectiveType() == TokenDirectiveType.FIELD) {\n Field field = (Field)token.getAlternativeValue();\n if (Modifier.isStatic(field.getModifiers())...
[ "@SuppressWarnings(\"unchecked\")\n public <T> Param<T> get(int index) {\n // TODO: Provide a more type safe API. E.g. make index a pojo typed on T which is aligned with the Param<T>\n return (Param<T>) params[index];\n }" ]
codesearchnet
{ "query": "Represent the Github description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Returns an array index for a specific level from the metadata from a flattened json tree. @param meta @param level @return
[ "static Integer getArrayIndex(Map<String,String> meta, int level) {\n return Integer.parseInt(meta.get(level + ARRAY_IDX_SUFFIX));\n }" ]
[ "def requests(self):\n ''''''\n path = pathjoin(self.path, self.name, Request.path)\n response = self.service.send(SRequest('GET', path))\n # a bin behaves as a push-down store --- better to return the requests\n # in order of appearance\n return list(reversed(Request.from_...
codesearchnet
{ "query": "Represent the sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Returns a unique ID for this widget. Useful in creating HTML markup. @param string $suffix An extra string to append to the ID. @return string A unique identifier.
[ "public function getId($suffix = null)\n {\n $id = class_basename(get_called_class());\n\n if ($this->alias != $this->defaultAlias) {\n $id .= '-' . $this->alias;\n }\n\n if ($suffix !== null) {\n $id .= '-' . $suffix;\n }\n\n return HtmlHelper::nam...
[ "function WidgetDef(config, endFunc, out) {\n this.type = config.type; // The widget module type name that is passed to the factory\n this.id = config.id; // The unique ID of the widget\n this.config = config.config; // Widget config object (may be null)\n this.state = config.state; // Widget state obje...
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Device properties retrieved from pickle
[ "def read_dev_prop(self, device_name):\n \n with open(\"{}.bin\".format(device_name), \"rb\") as file:\n return pickle.load(file)[\"device\"]" ]
[ "def build(self):\n \"\"\"\"\"\"\n from ambry.orm.config import BuildConfigGroupAccessor\n\n # It is a lightweight object, so no need to cache\n return BuildConfigGroupAccessor(self.dataset, 'buildstate', self._session)" ]
codesearchnet
{ "query": "Represent the Github sentence about Data processing:", "pos": "Represent the Github code about Data processing:", "neg": "Represent the Github code:" }
Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file.
[ "def schemaNewMemParserCtxt(buffer, size):\n \n ret = libxml2mod.xmlSchemaNewMemParserCtxt(buffer, size)\n if ret is None:raise parserError('xmlSchemaNewMemParserCtxt() failed')\n return SchemaParserCtxt(_obj=ret)" ]
[ "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 comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Helper method to serialize a callback. @param mixed $callback the callback string or array @return string the serialized callback
[ "private function _serializeCallback( $callback )\n {\n $retVal = $callback;\n\n if ( is_array( $callback ) && 2 === count( $callback ) )\n {\n $retVal = get_class( $callback[ 0 ] ) . '/' . $callback[ 1 ];\n }\n\n return $retVal;\n }" ]
[ "public function body($payload, $mimeType = null)\n {\n $this->mime($mimeType);\n $this->payload = $payload;\n // Iserntentially don't call _serializePayload yet. Wait until\n // we actually send off the request to convert payload to string.\n // At that time, the `serialized_...
codesearchnet
{ "query": "Represent the Github post about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about Programming:" }
Strips the port from an IPv4 or IPv6 address, returns a unicode object.
[ "def strip_ip_port(ip_address):\n \n\n # IPv4 with or without port\n if '.' in ip_address:\n cleaned_ip = ip_address.split(':')[0]\n\n # IPv6 with port\n elif ']:' in ip_address:\n # Remove the port following last ':', and then strip first and last chars for [].\n cleaned_ip = ip...
[ "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:" }
Reads data for an event. @param [String => Mixed] $opts @return [String => Mixed] @override Event
[ "public function read(array $opts) {\n return array_merge(parent::read($opts), [\n 'object' => $this->readModule($opts),\n 'context' => [\n 'contextActivities' => [\n 'grouping' => [\n $this->readCourse($opts),\n ...
[ "func (m *Strings) ToRawInfo() interface{} {\n\tinfo := yaml.MapSlice{}\n\tif m == nil {\n\t\treturn info\n\t}\n\t// &{Name:additionalProperties Type:NamedString StringEnumValues:[] MapType:string Repeated:true Pattern: Implicit:true Description:}\n\treturn info\n}" ]
codesearchnet
{ "query": "Represent the Github comment about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
// InternalMaskableErrorf creates an instance of InternalError and MaskableError
[ "func InternalMaskableErrorf(format string, params ...interface{}) error {\n\treturn maskInternal(fmt.Sprintf(format, params...))\n}" ]
[ "func init() {\n\t// take an output from a print function\n\toutput := pio.Wrap(logrus.Errorf)\n\t// register a new printer with name \"logrus\"\n\t// which will be able to read text and print as string.\n\tpio.Register(\"logrus\", output).Marshal(pio.Text)\n\n\t// p := pio.Register(\"logrus\", output).Marshal(pio....
codesearchnet
{ "query": "Represent the description about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code about Software development:" }
TODO move to ixa-pipe-ml
[ "private static List<String> buildSegmentedSentences(final BufferedReader breader) {\n String line;\n List<String> sentences = new ArrayList<>();\n try {\n while ((line = breader.readLine()) != null) {\n sentences.add(line);\n }\n } catch (final IOException e) {\n LOG.error(\"IOExc...
[ "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:" }
used to fetch the resource path of the given name. <name> must match a name of defined resource in metadata.yaml returns either a path or False if resource not available
[ "def resource_get(name):\n \n if not name:\n return False\n\n cmd = ['resource-get', name]\n try:\n return subprocess.check_output(cmd).decode('UTF-8')\n except subprocess.CalledProcessError:\n return False" ]
[ "def fix_config(self, options):\n \n options = super(Trigger, self).fix_config(options)\n\n opt = \"condition\"\n if opt not in options:\n options[opt] = \"True\"\n if opt not in self.help:\n self.help[opt] = \"The (optional) condition for teeing off the toke...
codesearchnet
{ "query": "Represent the comment about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
Convenience method for {@link #decode(CharSequence, OutputStream)}.
[ "public static byte[] decodeToBytes(CharSequence in) throws IOException{\n\t\tif(in == null) return null;\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream(in.length());\n\t\tdecode(in, baos);\n\t\treturn baos.toByteArray();\n\t}" ]
[ "public static Object[] parse(Reader reader, Class<?>[] types,\n Converter<Object, Map<String, Object>> mc) throws IOException,\n ParseException {\n return (Object[]) parse(reader, new JSONVisitor(types,\n new JSONValue(mc)), JSONToken.LSQUARE);\n ...
codesearchnet
{ "query": "Represent the Github text about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "@SuppressWarnings(\"unchecked\")\r\n\tpublic EList<IfcAddress> getAddresses() {\r\n\t\treturn (EList<IfcAddress>) eGet(Ifc2x3tc1Package.Literals.IFC_PERSON__ADDRESSES, true);\r\n\t}" ]
[ "protected function _init($definition=null)\n {\n\n if (!is_null($definition)) {\n $this->_packageXml = simplexml_load_string($definition);\n } else {\n $packageXmlStub = <<<END\n<?xml version=\"1.0\"?>\n<package>\n <name />\n <version />\n <stability />\n <license...
codesearchnet
{ "query": "Represent the Github description about Text generation:", "pos": "Represent the Github code about Text generation:", "neg": "Represent the Github code:" }
Registers client script
[ "public function registerClientScript()\n {\n /* publish assets dir */\n $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';\n $assetsUrl = $this->getAssetsUrl($path);\n\n /* @var $cs CClientScript */\n $cs = Yii::app()->getClientScript();\n\n $cs->registerCssFil...
[ "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 comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// appendExtensions marshals a XXX_InternalExtensions field to the end of byte slice b.
[ "func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) {\n\tm, mu := ext.extensionsRead()\n\tif m == nil {\n\t\treturn b, nil\n\t}\n\tmu.Lock()\n\tdefer mu.Unlock()\n\n\tvar err error\n\tvar nerr nonFatal\n\n\t// Fast-path for common cases: zero or one ext...
[ "@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 programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
/* (non-Javadoc) @see com.impetus.kundera.client.ClientBase#onPersist(com.impetus.kundera.metadata .model.EntityMetadata, java.lang.Object, java.lang.Object, java.util.List)
[ "@Override\n protected void onPersist(EntityMetadata metadata, Object entity, Object id, List<RelationHolder> rlHolders)\n {\n\n if (!isOpen())\n {\n throw new PersistenceException(\"PelopsClient is closed.\");\n }\n\n // check for counter column\n if (isUpdate &&...
[ "@Override\n public void serialize(List<org.audit4j.core.dto.Field> auditFields, Object object,\n String objectName, DeIdentify deidentify) {\n visited.clear();\n String text = toString(object, deidentify);\n auditFields.add(new org.audit4j.core.dto.Field(objectName, text, object....
codesearchnet
{ "query": "Represent the Github sentence about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code about programming:" }
Normalize the cache key. @param mixed $item @param string|null $key
[ "protected function normalizeKey($item, $key = null)\n {\n // If the user wants to provide their own cache\n // key, we'll opt for that.\n if (is_string($item) || is_string($key)) {\n return is_string($item) ? $item : $key;\n }\n \n // Otherwise we'll try to u...
[ "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 Github sentence about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
Updates the cache :param course: a Course object :param taskid: a (valid) task id :raise InvalidNameException, TaskNotFoundException, TaskUnreadableException
[ "def _update_cache(self, course, taskid):\n \n if not id_checker(taskid):\n raise InvalidNameException(\"Task with invalid name: \" + taskid)\n\n task_fs = self.get_task_fs(course.get_id(), taskid)\n last_modif, translation_fs, task_content = self._get_last_updates(course, tas...
[ "def create(parser: Parser, obj: PersistedObject = None):\n \n if obj is not None:\n return _InvalidParserException('Error ' + str(obj) + ' cannot be parsed using ' + str(parser) + ' since '\n + ' this parser does not support ' + obj.get_pretty_file...
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }
HTML to be embedded into the GridField. @param GridField $gridField @return array
[ "public function getHTMLFragments($gridField)\n {\n // permission check\n if (!singleton($gridField->getModelClass())->canEdit()) {\n return array();\n }\n\n // get uploadField\n $uploadField = $this->bulkUploadField($gridField);\n\n $data = ArrayData::create(...
[ "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 instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Unregister an existing child that is no longer to be owned by the current instance. :param child: The child instance.
[ "def unregister_child(self, child):\n \n self._children.remove(child)\n child.on_closed.disconnect(self.unregister_child)" ]
[ "def connectTo(self, remoteRouteName):\n \n self.remoteRouteName = remoteRouteName\n # This route must not be started before its router is started. If\n # sender is None, then the router is not started. When the router is\n # started, it will start this route.\n if self.r...
codesearchnet
{ "query": "Represent the Github comment about Technical Support:", "pos": "Represent the Github code about Technical Support:", "neg": "Represent the Github code:" }
Set session cookie parameters, this method should call before session started. @return void @since 2.0
[ "protected function setCookieParams()\n {\n $cookie = $this->getCookieParams();\n\n if ($this->getOption('force_ssl')) {\n $cookie['secure'] = true;\n }\n\n if ($this->getOption('cookie_domain')) {\n $cookie['domain'] = $this->getOption('cookie_domain');\n ...
[ "public void setHeader(String name, String s) {\n if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15\n logger.logp(Level.FINE, CLASS_NAME,\"setHeader\", \" name --> \" + name + \" value --> \" + PasswordNullifier.nullifyParams(s), \"[\"+this+\"...
codesearchnet
{ "query": "Represent the Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Programming:" }
clean @param string $text @return string
[ "public function clean($text)\n {\n $len = $this->utf8 ? mb_strlen($text) : strlen($text);\n\n if ($len <= $this->max) {\n return $text;\n }\n\n return $this->utf8 ? mb_substr($text, 0, $this->max) : substr($text, 0, $this->max);\n }" ]
[ "final static function f($op) {return dfcf(function(OP $op) {\n\t\t$c = df_con_hier($m = df_ar(dfpm($op), M::class), __CLASS__); /** @var string $c */ /** @var M $m */\n\t\treturn new $c($m);\n\t}, [dfp($op)]);}" ]
codesearchnet
{ "query": "Represent the summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
// SetCloudWatchLogsDestination sets the CloudWatchLogsDestination field's value.
[ "func (s *EventDestinationDefinition) SetCloudWatchLogsDestination(v *CloudWatchLogsDestination) *EventDestinationDefinition {\n\ts.CloudWatchLogsDestination = v\n\treturn s\n}" ]
[ "@NotNull\n @ApiModelProperty(required = true, value = \"Key-value pairs to add as custom property into alert. You can refer here for example values\")\n public Map<String, String> getDetails() {\n return details;\n }" ]
codesearchnet
{ "query": "Represent the sentence about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Software development:" }
Gets the size of an image @param mixed Imagine Image object or string of a file name @return array first value is width, second height @see Imagine\Image\ImageInterface::getSize()
[ "public function getImageSize($Image = null) {\n\t\t$Image = $this->_getImage($Image);\n\t\t$BoxInterface = $Image->getSize($Image);\n\t\treturn [\n\t\t\t$BoxInterface->getWidth(),\n\t\t\t$BoxInterface->getHeight(),\n\t\t\t'x' => $BoxInterface->getWidth(),\n\t\t\t'y' => $BoxInterface->getHeight()\n\t\t];\n\t}" ]
[ "public static Image newImage (String path, String... styles)\n {\n return setStyleNames(new Image(path), styles);\n }" ]
codesearchnet
{ "query": "Represent the comment about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
// GetAllAWSKinesisAnalyticsApplicationReferenceDataSourceResources retrieves all AWSKinesisAnalyticsApplicationReferenceDataSource items from an AWS CloudFormation template
[ "func (t *Template) GetAllAWSKinesisAnalyticsApplicationReferenceDataSourceResources() map[string]*resources.AWSKinesisAnalyticsApplicationReferenceDataSource {\n\tresults := map[string]*resources.AWSKinesisAnalyticsApplicationReferenceDataSource{}\n\tfor name, untyped := range t.Resources {\n\t\tswitch resource :=...
[ "private static void updateDeliveryStream() {\n DeliveryStreamDescription deliveryStreamDescription = describeDeliveryStream(deliveryStreamName);\n \n LOG.info(\"Updating DeliveryStream Destination: \" + deliveryStreamName + \" with new configuration options\");\n // get(0) -> DeliverySt...
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Get a configuration as size in bytes (parses special strings like "1Mb"). Return {@code null} if missing, wrong type or bad value. @param config @param path @return
[ "public static Optional<Long> getBytesOptional(Config config, String path) {\n return Optional.ofNullable(getBytes(config, path));\n }" ]
[ "public void setLog(String log) throws ApplicationException {\n\tif (StringUtil.isEmpty(log, true)) return;\n\tthis.log = log.trim();\n\t// throw new ApplicationException(\"invalid value for attribute log [\"+log+\"]\",\"valid values are\n\t// [application, scheduler,console]\");\n }" ]
codesearchnet
{ "query": "Represent the Github sentence about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code about Software development:" }
// OnCDOTAUserMsg_XPAlert registers a callback for EDotaUserMessages_DOTA_UM_XPAlert
[ "func (c *Callbacks) OnCDOTAUserMsg_XPAlert(fn func(*dota.CDOTAUserMsg_XPAlert) error) {\n\tc.onCDOTAUserMsg_XPAlert = append(c.onCDOTAUserMsg_XPAlert, fn)\n}" ]
[ "def getKeySequenceCounter(self):\n \"\"\"\"\"\"\n print '%s call getKeySequenceCounter' % self.port\n keySequence = ''\n keySequence = self.__sendCommand(WPANCTL_CMD + 'getprop -v Network:KeyIndex')[0]\n return keySequence" ]
codesearchnet
{ "query": "Represent the Github sentence about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code:" }
Shut down the engine for the given SSL connection link. @param connLink @param isServer @param isConnected
[ "public static void shutDownSSLEngine(SSLConnectionLink connLink, boolean isServer, boolean isConnected) {\n if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {\n Tr.entry(tc, \"shutDownSSLEngine: isServer: \" + isServer\n + \" isConnected: \" + isConnected +...
[ "public H2StreamProcessor startNewInboundSession(Integer streamID) {\n H2StreamProcessor h2s = null;\n h2s = muxLink.createNewInboundLink(streamID);\n return h2s;\n // call the stream processor with the data it needs to then call \"ready\" are the underlying HttpInboundLink\n // (...
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
insert_string(data) Insert the resources entries in the string DATA into the database.
[ "def insert_string(self, data):\n \n\n # First split string into lines\n lines = data.split('\\n')\n\n while lines:\n line = lines[0]\n del lines[0]\n\n # Skip empty line\n if not line:\n continue\n\n # Skip comments\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 instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Reconnects to the controller if we have been previously disconnected.
[ "def _maybe_reconnect(self):\n \"\"\"\"\"\"\n with self._lock:\n if not self._connected: \n _LOGGER.info(\"Connecting\")\n self._do_login_locked()\n self._connected = True\n self._connect_cond.notify_all()\n _LOGGER.info(\"Connected\")" ]
[ "def connectTo(self, remoteRouteName):\n \n self.remoteRouteName = remoteRouteName\n # This route must not be started before its router is started. If\n # sender is None, then the router is not started. When the router is\n # started, it will start this route.\n if self.r...
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Retrieve the controller name @return string
[ "public function getControllerName()\n {\n if (null === $this->_controller) {\n $this->_controller = $this->getParam($this->getControllerKey());\n }\n\n return $this->_controller;\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 post about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Programming:" }
\ Searches backwards from the current file position for a line terminator and seeks to the charachter after it.
[ "def seek_line(self):\n \n pos = end_pos = self.file.tell()\n\n read_size = self.read_size\n if pos > read_size:\n pos -= read_size\n else:\n pos = 0\n read_size = end_pos\n\n self.seek(pos)\n\n bytes_read, read_str = self.read(read_s...
[ "def _find_end_token(self, end_token, operation):\n \n ibuffer, icache = operation.state\n length = operation.buffered[ibuffer][2]\n result = None\n\n for i in range(len(operation.buffered) - ibuffer - 1):\n linenum, statement, charlength = operation.buffered[i + ibuffe...
codesearchnet
{ "query": "Represent the Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
makes the current client under the profile active @param model @param profileId @param clientUUID @return @throws Exception
[ "@RequestMapping(value = \"api/edit/activate\", method = RequestMethod.POST)\n public\n @ResponseBody\n String activateProfile(Model model,\n @RequestParam int profileId,\n @RequestParam(defaultValue = Constants.PROFILE_CLIENT_DEFAULT_ID) String clientUUI...
[ "def syncItems(self):\n \n if 'sync-target' not in self.provides:\n raise BadRequest('Requested syncList for device which do not provides sync-target')\n\n return self._server.syncItems(client=self)" ]
codesearchnet
{ "query": "Represent the summarization about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Base::createLink @param string $label @param string|null $href @return Item
[ "public function createLink($label, $href = null)\n {\n $link = new Link($label, $href);\n $link->attributes->addAttributeClass('nav-link');\n\n return $this->createList($link);\n }" ]
[ "static function init() {return dfcf(function() {\n\t\t$appId = S::s()->appId(); /** @var string|null $appId */\n\t\treturn !$appId ? '' : df_block_output(__CLASS__, 'init', ['appId' => $appId]);\n\t});}" ]
codesearchnet
{ "query": "Represent the sentence about text processing:", "pos": "Represent the code about text processing:", "neg": "Represent the code about programming:" }
Generates content for a single row of the table. @since 2.3.0 @param object $network The current network item.
[ "public function single_row( $network ) {\n\t\t$class = (int) get_current_site()->id === (int) $network->id ? 'current' : 'not-current';\n\n\t\techo '<tr class=\"' . esc_attr( $class ) . '\">';\n\t\t$this->single_row_columns( $network );\n\t\techo '</tr>';\n\t}" ]
[ "@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 post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Programming:" }
// SetGPU sets the GPU object
[ "func (o *Compute) SetGPU(v *GPU) *Compute {\n\tif o.GPU = v; o.GPU == nil {\n\t\to.nullFields = append(o.nullFields, \"GPU\")\n\t}\n\treturn o\n}" ]
[ "def surface(self, canvas, X, Y, Z, color=None, label=None, **kwargs):\n \n raise NotImplementedError(\"Implement all plot functions in AbstractPlottingLibrary in order to use your own plotting library\")" ]
codesearchnet
{ "query": "Represent the Github post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
An identity-keyed inter-process lock for safeguarding lifecycle and other operations.
[ "def lifecycle_lock(self):\n \"\"\"\"\"\"\n safe_mkdir(self._metadata_base_dir)\n return OwnerPrintingInterProcessFileLock(\n # N.B. This lock can't key into the actual named metadata dir (e.g. `.pids/pantsd/lock`\n # via `ProcessMetadataManager._get_metadata_dir_by_name()`) because of a need to ...
[ "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:" }
// Options returns the options available to configure this Bee.
[ "func (factory *FacebookBeeFactory) Options() []bees.BeeOptionDescriptor {\n\tconf := &oauth2.Config{\n\t\tClientID: \"__client_id__\",\n\t\tClientSecret: \"__client_secret__\",\n\t\tRedirectURL: api.CanonicalURL().String() + \"/\" + path.Join(\"oauth2\", factory.ID(), \"__client_id__\", \"__client_secret__\")...
[ "@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 summarization about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Ustawia błąd, jaki wystąpił podczas odbierania pliku @param integer $code @param string $message @return \CmsAdmin\Model\PluploadHandler
[ "private function _setError($code, $message = \"\")\n {\n if (isset(self::$_errors[$code])) {\n $this->_errorCode = $code;\n $this->_errorMessage = self::$_errors[$code];\n } else {\n $this->_errorCode = PLUPLOAD_UNKNOWN_ERR;\n $this->_errorMessage = self...
[ "public function beforeSend(\\Mmi\\Http\\Request $request)\n {\n //pobranie odpowiedzi\n $response = \\Mmi\\App\\FrontController::getInstance()->getResponse();\n //zmiana contentu\n $response->setContent((new \\Cms\\Model\\ContentFilter($response->getContent()))->getFilteredContent())...
codesearchnet
{ "query": "Represent the sentence about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Programming:" }
Processes the payload POST data and sets up the array of requests. @param string $service The service being requested. @param string $verb The HTTP verb being used. @param array|object $post The raw POST data.
[ "private function processPayload($service, $verb, $post)\n {\n $this->batch = is_array($post);\n if (false === $this->batch) {\n $post = array($post);\n }\n $this->requests = array_map(function ($payload) use ($service, $verb) {\n return new JsonRpcRequest($servi...
[ "public function setRequestHeader($name, $value) {\n $header = array();\n $header[$name] = $value;\n //TODO: as a limitation of the driver it self, we will send permanent for the moment\n $this->browser->addHeader($header, true);\n }" ]
codesearchnet
{ "query": "Represent the comment about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Performs query operations (Read) against the server. Typically this returns an array of record instances, except in the case of count queries @raise [ServiceError] if there is an error when talking to the service
[ "def execute\n begin\n @response = OData::Resource.new(build_query_uri, @rest_options).get\n rescue Exception => e\n handle_exception(e)\n end\n return Integer(@response.body) if @response.body =~ /\\A\\d+\\z/\n handle_collection_result(@response.body)\n end" ]
[ "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 text:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
// First returns the start position on c.
[ "func (c *Cursor) First() *Position {\n\treturn &Position{IP: c.ps[0].IP, Prefix: c.ps[0]}\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 post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Signal handlers can't be standard class methods because the signal callback does not include the object reference (self). To work around this we use a closure the carry the object reference.
[ "def legion_create_handler(obj):\n \n def _handler(sig, frame):\n obj._sig_handler(sig, frame)\n\n if '_sig_handler' not in dir(obj): # pragma: no cover\n raise Excecption(\"Object instance has no _sig_handler method\")\n return _han...
[ "def _get_from_c_api():\n \n from ctypes import pythonapi, py_object\n\n PyDictProxy_New = pythonapi.PyDictProxy_New\n PyDictProxy_New.argtypes = (py_object,)\n PyDictProxy_New.restype = py_object\n\n # To actually create new dictproxy instances, we need a class that calls\n # the above C API f...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
// NetworkingV1 retrieves the NetworkingV1Client
[ "func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface {\n\treturn &fakenetworkingv1.FakeNetworkingV1{Fake: &c.Fake}\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 Github instruction about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code:" }
Creates a GraphViz Edge between two nodes. @param Graph $graph @param string $from_name @param string|ClassDescriptor|InterfaceDescriptor|TraitDescriptor $to @return Edge|null
[ "protected function createEdge($graph, $from_name, $to)\n {\n $to_name = (string) ($to instanceof DescriptorAbstract ? $to->getFullyQualifiedStructuralElementName() : $to);\n\n if (!isset($this->nodeCache[$from_name])) {\n $namespaceParts = explode('\\\\', $from_name);\n $this...
[ "public function objectFromIndex(IObjectSetWithIdentityByIndex $objects) : ObjectFieldBuilder\n {\n return new ObjectFieldBuilder(\n $this->type(new ObjectIdType(new ObjectIndexOptions($objects), $loadAsObjects = true))\n );\n }" ]
codesearchnet
{ "query": "Represent the Github description about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code about Software development:" }
Converts a Hash of object data into a concrete SObject
[ "def record_from_hash(data)\n attributes = data.delete('attributes')\n new_record = find_or_materialize(attributes[\"type\"]).new\n data.each do |name, value|\n field = new_record.description['fields'].find do |field|\n key_from_label(field[\"label\"]) == name || field[\"name\"] == na...
[ "@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 text:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
@param string $name @return null|\TakaakiMizuno\MWBParser\Elements\Table
[ "protected function findTableFromName($name)\n {\n foreach ($this->tables as $table) {\n if ($table->getName() === $name) {\n return $table;\n }\n }\n\n return null;\n }" ]
[ "public function logBanner($additions = null)\n {\n $this->addStatusMessage('FlexiBee '.str_replace('://',\n '://'.$this->user.'@', $this->getApiUrl()).' FlexiPeeHP v'.self::$libVersion.' (FlexiBee '.EvidenceList::$version.') EasePHP Framework v'.\\Ease\\Atom::$frameworkVersion.' '.$additio...
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Register a new queue worker. This allows us to capture heartbeats of the queue actually working. We need to take the Laravel version into account, because <=5.2 uses a different worker construct compared to >=5.3. @return void
[ "protected function registerQueueWorker()\n {\n $this->app->singleton('queue.worker', function () {\n if ($this->eye->laravelVersionIs('>=', '5.3.0')) {\n return new Worker($this->app['queue'], $this->app['events'], $this->app[ExceptionHandler::class]);\n } else {\n ...
[ "protected function setProcessors(OptionsInterface $options, ProfileInterface $profile)\n {\n if (isset($options->prefix) && $profile instanceof RedisProfile) {\n // NOTE: directly using __get('prefix') is actually a workaround for\n // HHVM 2.3.0. It's correct and respects the optio...
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:" }
// // Blocks stack // // pushBlock pushes new block statement to stack
[ "func (v *evalVisitor) pushBlock(block *ast.BlockStatement) {\n\tv.blocks = append(v.blocks, block)\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 text:", "pos": "Represent the code:", "neg": "Represent the code:" }
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "public GCBOXRES createGCBOXRESFromString(EDataType eDataType, String initialValue) {\n\t\tGCBOXRES result = GCBOXRES.get(initialValue);\n\t\tif (result == null) throw new IllegalArgumentException(\"The value '\" + initialValue + \"' is not a valid enumerator of '\" + eDataType.getName() + \"'\");\n\t\treturn resul...
[ "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 summarization about Text generation:", "pos": "Represent the code about Text generation:", "neg": "Represent the code:" }
Finish the computation and sends the result to the Recorder.
[ "def on_epoch_end(self, last_metrics, **kwargs):\n \"\"\n if not self.nums: return\n metrics = [self.metrics[name]/self.nums for name in self.names]\n return {'last_metrics': last_metrics+metrics}" ]
[ "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:" }
判断是否为绝对路径 @param $path @return bool
[ "public static function isAbsolute($path)\n {\n if (($position = strpos($path, './')) !== false && $position <= 2) {\n return false;\n }\n if (strpos($path, ':') !== false) {\n return true;\n }\n if (substr($path, 0, 1) === '/') {\n return true;...
[ "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 Github text about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
// EqualOrGreaterControllerAccessThan returns true if the current access is // equal or greater than the passed in access level.
[ "func (a Access) EqualOrGreaterControllerAccessThan(access Access) bool {\n\tv1, v2 := a.controllerValue(), access.controllerValue()\n\tif v1 < 0 || v2 < 0 {\n\t\treturn false\n\t}\n\treturn v1 >= v2\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 summarization about Access control:", "pos": "Represent the Github code about Access control:", "neg": "Represent the Github code:" }
Return script tag. @param string $name @return string|null @throws InvalidArgumentException
[ "protected function getContextTypeClass($name)\n {\n // Check for custom context type\n if (class_exists($name)) {\n return $name;\n }\n\n // Create local context type class\n $class = ucwords(str_replace(['-', '_'], ' ', $name));\n $class = '\\\\JsonLd\\\\Con...
[ "static function init() {return dfcf(function() {\n\t\t$appId = S::s()->appId(); /** @var string|null $appId */\n\t\treturn !$appId ? '' : df_block_output(__CLASS__, 'init', ['appId' => $appId]);\n\t});}" ]
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
Sets default attributes @param array $attributes @param array $default @return array
[ "private static function setDefaultAttributes(array $attributes, array $default): array\n {\n foreach ($default as $name => $value) {\n if (!\\array_key_exists($name, $attributes)) {\n $attributes[$name] = $value;\n }\n }\n return $attributes;\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 Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Render the `nocache` blocks of the content and return the whole html
[ "def render_nocache(self):\n \n tmpl = template.Template(''.join([\n # start by loading the cache library\n template.BLOCK_TAG_START,\n 'load %s' % self.get_templatetag_module(),\n template.BLOCK_TAG_END,\n # and surround the cached template by \"...
[ "def list_nodes(self):\n \"\"\"\"\"\"\n self.add_environment_file(user='stack', filename='stackrc')\n ret, _ = self.run(\"ironic node-list --fields uuid|awk '/-.*-/ {print $2}'\", user='stack')\n # NOTE(Gonéri): the good new is, the order of the nodes is preserved and follow the one from...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about Technology:" }
Generate a migration preview from given entity definitions. @param array|\Asgard\Entity\Definition $definitions @param string $migrationName @return string name of migration
[ "public function previewMigration($definitions, $migrationName) {\n\t\tif(!is_array($definitions))\n\t\t\t$definitions = [$definitions];\n\t\t$entitiesSchema = $this->getEntitiesSchemas($definitions);\n\t\t$sqlSchema = $this->getSQLSchemas();\n\t\t$up = $this->buildMigration($entitiesSchema, $sqlSchema, false);\n\t...
[ "public function insert(): self\n {\n /** @var self $data */\n $data = $this;\n\n if(!$this->validate(\"post\", $missing))\n {\n throw new \\Exception(\"[MVQN\\REST\\Endpoints\\Endpoint] Annotations for the '\".get_class($this).\"' class require valid values be set \".\n ...
codesearchnet
{ "query": "Represent the Github instruction about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about Software development:" }
A generator of all keys and values.
[ "def ListFiles(self, ext_attrs=None):\n \"\"\"\"\"\"\n del ext_attrs # Unused.\n\n if not self.IsDirectory():\n return\n\n if self.hive is None:\n for name in dir(winreg):\n if name.startswith(\"HKEY_\"):\n response = rdf_client_fs.StatEntry(st_mode=stat.S_IFDIR)\n re...
[ "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 programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Permission to query balance through the ACCOUNTS endpoint. @param bool $retrieve_financial_info @throws \Moip\Exceptions\InvalidArgumentException @return \Moip\Auth\Connect $this
[ "public function setRetrieveFinancialInfo($retrieve_financial_info)\n {\n if (!is_bool($retrieve_financial_info)) {\n throw new InvalidArgumentException('$retrieve_financial_info deve ser boolean, foi passado '.gettype($retrieve_financial_info));\n }\n\n if ($retrieve_financial_in...
[ "public function getAll(){\n $rest = $this->getService( self::API_VPN_CLIENT_CONFIG);\n $rest->GET();\n\n return $rest->getResultAsArray( models\\VPN\\Client\\Config\\ClientConfig::class);\n }" ]
codesearchnet
{ "query": "Represent the Github text about Access control:", "pos": "Represent the Github code about Access control:", "neg": "Represent the Github code about programming:" }
Set the room configurations. @param customConfigs @throws NoResponseException @throws XMPPErrorException @throws NotConnectedException @throws InterruptedException
[ "public void setRoomConfigs(HashMap<String, String> customConfigs)\n throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {\n setRoomConfigs(null, customConfigs);\n }" ]
[ "public List<FormField> retrieveFormFields() throws NoResponseException, XMPPErrorException, NotConnectedException,\n InterruptedException, NotLoggedInException {\n return retrieveFormFields(null);\n }" ]
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }