query
stringlengths
16
255
pos
list
neg
list
task
stringclasses
1 value
instruction
dict
// SetItems sets the Items field's value.
[ "func (s *PublicKeyList) SetItems(v []*PublicKeySummary) *PublicKeyList {\n\ts.Items = 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 Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
// PgOpclassByOid retrieves a row from 'pg_catalog.pg_opclass' as a PgOpclass. // // Generated from index 'pg_opclass_oid_index'.
[ "func PgOpclassByOid(db XODB, oid pgtypes.Oid) (*PgOpclass, error) {\n\tvar err error\n\n\t// sql query\n\tconst sqlstr = `SELECT ` +\n\t\t`tableoid, cmax, xmax, cmin, xmin, oid, ctid, opcmethod, opcname, opcnamespace, opcowner, opcfamily, opcintype, opcdefault, opckeytype ` +\n\t\t`FROM pg_catalog.pg_opclass ` +\n...
[ "func PgExtensionConfigDump(db XODB, v0 pgtypes.Regclass, v1 string) error {\n\tvar err error\n\n\t// sql query\n\tconst sqlstr = `SELECT pg_catalog.pg_extension_config_dump($1, $2)`\n\n\t// run query\n\tXOLog(sqlstr)\n\t_, err = db.Exec(sqlstr)\n\treturn err\n}" ]
codesearchnet
{ "query": "Represent the description about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code:" }
Deletes a key from the default family, specifying write options.F @param writeOptions @param key @throws RocksDBException
[ "public void delete(WriteOptions writeOptions, String key) throws RocksDbException {\n delete(DEFAULT_COLUMN_FAMILY, writeOptions, key);\n }" ]
[ "@Help(help = \"Create the object of type {#}\")\n public T create(final T object) throws SDKException {\n return (T) requestPost(object);\n }" ]
codesearchnet
{ "query": "Represent the Github description about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code:" }
// checkAuth is used by NewClient to check if the current credentials are // valid. If the response is 401 Unauthorized then the error will be discarded.
[ "func checkAuth(client *Client) (bool, error) {\n\t_, response, err := client.Accounts.GetAccount(\"self\")\n\tswitch err {\n\tcase ErrWWWAuthenticateHeaderMissing:\n\t\treturn false, nil\n\tcase ErrWWWAuthenticateHeaderNotDigest:\n\t\treturn false, nil\n\tdefault:\n\t\t// Response could be nil if the connection ou...
[ "function authenticateAccount() {\n\n var authcRequest = {\n username: accountEmail, //we could've entered the username instead\n password: 'Changeme1!'\n };\n\n return application.authenticateAccount(authcRequest, function(err, result) {\n if (err) throw err;\n\n return result.getAccount(function(er...
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Sets the response context. @param responseContext the response context @return the parallel task builder
[ "public ParallelTaskBuilder setResponseContext(\n Map<String, Object> responseContext) {\n if (responseContext != null)\n this.responseContext = responseContext;\n else\n logger.error(\"context cannot be null. skip set.\");\n return this;\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 text about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
[ "func (in *AuditConfig) DeepCopyInto(out *AuditConfig) {\n\t*out = *in\n\tif in.PolicyConfiguration != nil {\n\t\tout.PolicyConfiguration = in.PolicyConfiguration.DeepCopyObject()\n\t}\n\treturn\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 Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Retrieve indexes for the table @param string $table @return array
[ "public function getIndexes($table): ?array\n\t{\n\t\treturn $this->driverQuery($this->getSql()->indexList($this->prefixTable($table)), FALSE);\n\t}" ]
[ "@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 description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
### function append(plates, data, map) #### @plates {String} Template or path/id of the template #### @data {Object|String} data for the appended template #### @map {Plates.Map} mapping for the data
[ "function append(plates, data, map) {\n var l = last.call(this);\n\n if (data instanceof Mapper) {\n map = data;\n data = undefined;\n }\n\n // If the supplied plates template doesn't contain any HTML it's most\n // likely that we need to import it. To improve performance we w...
[ "function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }" ]
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
@throws \Exception @return string
[ "public function generate()\n {\n if (count($this->functions) === 0) {\n throw new \\Exception('function list empty');\n }\n\n $parts = [];\n foreach ($this->functions as $function) {\n $args = [];\n if ($function['args']) {\n $args = $t...
[ "@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 summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
// RangeHeader parses the Range header and returns an headerutil.Range.
[ "func RangeHeader(r *http.Request) (headerutil.Range, error) {\n\theader := r.Header.Get(\"Range\")\n\tif header == \"\" {\n\t\treturn headerutil.Range{}, nil\n\t}\n\n\trangeHeader, err := headerutil.ParseRange(header)\n\tif err != nil {\n\t\treturn headerutil.Range{}, err\n\t}\n\treturn *rangeHeader, nil\n}" ]
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the Github text about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
<p> Information about the authentication method used by the Client VPN endpoint. </p> @return Information about the authentication method used by the Client VPN endpoint.
[ "public java.util.List<ClientVpnAuthentication> getAuthenticationOptions() {\n if (authenticationOptions == null) {\n authenticationOptions = new com.amazonaws.internal.SdkInternalList<ClientVpnAuthentication>();\n }\n return authenticationOptions;\n }" ]
[ "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 Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value.
[ "func (s *CreateDocumentClassifierInput) SetVolumeKmsKeyId(v string) *CreateDocumentClassifierInput {\n\ts.VolumeKmsKeyId = &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 Github comment about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about Software development:" }
// SetVpcId sets the VpcId field's value.
[ "func (s *SubnetGroup) SetVpcId(v string) *SubnetGroup {\n\ts.VpcId = &v\n\treturn s\n}" ]
[ "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 sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Software development:" }
// DeserializeTLFWriterKeyBundleV3 deserializes a TLFWriterKeyBundleV3 // from the given path and returns it.
[ "func DeserializeTLFWriterKeyBundleV3(codec kbfscodec.Codec, path string) (\n\tTLFWriterKeyBundleV3, error) {\n\tvar wkb TLFWriterKeyBundleV3\n\terr := kbfscodec.DeserializeFromFile(codec, path, &wkb)\n\tif err != nil {\n\t\treturn TLFWriterKeyBundleV3{}, err\n\t}\n\tif len(wkb.Keys) == 0 {\n\t\treturn TLFWriterKey...
[ "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 post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Return result values by class and metric name. e.g. ``` $variant->getMetricValues(ComputedResult::class, 'z_value'); ``` @return mixed[]
[ "public function getMetricValues($resultClass, $metricName)\n {\n $values = [];\n\n foreach ($this->iterations as $iteration) {\n if ($iteration->hasResult($resultClass)) {\n $values[] = $iteration->getMetric($resultClass, $metricName);\n }\n }\n\n ...
[ "public static function getDomainAuthority($url = false)\n {\n $data = static::getCols('68719476736', Helper\\Url::parseHost($url));\n return (parent::noDataDefaultValue() == $data) ? $data :\n $data['pda'];\n }" ]
codesearchnet
{ "query": "Represent the Github sentence about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
Evaluate master function if master type is 'func' and save it result in opts['master']
[ "def eval_master_func(opts):\n '''\n \n '''\n if '__master_func_evaluated' not in opts:\n # split module and function and try loading the module\n mod_fun = opts['master']\n mod, fun = mod_fun.split('.')\n try:\n master_mod = salt.loader.raw_mod(opts, mod, fun)\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:", "pos": "Represent the code:", "neg": "Represent the code:" }
Rotate the dataframe and return it in an array. i.e. rows become columns and columns become rows. @return array
[ "public function columns() : array\n {\n if ($this->numRows() > 1) {\n return array_map(null, ...$this->samples);\n }\n\n $n = $this->numColumns();\n\n $columns = [];\n\n for ($i = 0; $i < $n; $i++) {\n $columns[] = array_column($this->samples, $i);\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 summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
Create from subdirectory info object.
[ "def from_subdir(cls, container, info_obj):\n \"\"\"\"\"\"\n return cls(container,\n info_obj['subdir'],\n obj_type=cls.type_cls.SUBDIR)" ]
[ "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 summarization:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
// Ceil - Vector CEIL
[ "func Ceil(inReal []float64) []float64 {\n\toutReal := make([]float64, len(inReal))\n\tfor i := 0; i < len(inReal); i++ {\n\t\toutReal[i] = math.Ceil(inReal[i])\n\t}\n\treturn outReal\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 comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
This is messaged from JTree whenever it needs to get the size of the component or it wants to draw it. This attempts to set the font based on value, which will be a TreeNode.
[ "public Component getTreeCellRendererComponent(JTree tree, Object value,\n boolean selected, boolean expanded,\n boolean leaf, int row,\n boolean hasFocus) {\n String stringValue = tree.convertValueToText(value, selected, expanded, leaf, row,...
[ "public String getHeader()\n {\n if (this.header == null)\n {\n if (this.headerKeys == null)\n {\n this.headerKeys = new String[2];\n this.headerKeys[0] = getPropertyName() + \".header\";\n this.headerKeys[1] = getPropertyName();\n ...
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Shared implementation for parseFile() & parseContents(). @param array $tokens The result of a token_get_all() @param Context $parseContext @return Analysis
[ "protected function fromTokens($tokens, $parseContext)\n {\n $analyser = new Analyser();\n $analysis = new Analysis();\n reset($tokens);\n $token = '';\n $imports = Analyser::$defaultImports; // Use @OA\\* for swagger-php annotations (unless overwritten by a use statement)\n\n ...
[ "protected function parseExpressionHtmlLine( Line$line ):self\n\t{\n\t\t$content= $line->slice(1);\n\n\t\treturn $this->openNode(new StringNode($this,$line))->appendLine(\"<?$content?>\");\n\t}" ]
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Sets the log writer for any segments that are configured with a {@code DataSource} for connections. @param writer The writer.
[ "void setDataSourceLogWriter(PrintWriter writer) throws SQLException {\n for(ConnectionPoolSegment segment : segments) {\n if(segment.dbConnection.datasource != null) {\n segment.dbConnection.datasource.setLogWriter(writer);\n }\n }\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 instruction about writing:", "pos": "Represent the code about writing:", "neg": "Represent the code:" }
Run @param param param eg: "/system/bin/ping -c 4 -s 100 www.qiujuer.net"
[ "protected static CommandExecutor create(int timeout, String param) {\n String[] params = param.split(\" \");\n CommandExecutor processModel = null;\n synchronized (PRC) {\n try {\n Process process = PRC.command(params)\n .redirectErrorStream(tru...
[ "def block(self):\n '''\n \n '''\n st,output = _runcmd(\"/sbin/pfctl -aswitchyard -f -\", self._rules)\n log_debug(\"Installing rules: {}\".format(output))" ]
codesearchnet
{ "query": "Represent the comment:", "pos": "Represent the code:", "neg": "Represent the code:" }
// NewDatabase returns a new Database object.
[ "func NewDatabase(opts ...Option) *Database {\n\tdb := &Database{\n\t\tendpoint: \"http://localhost:8529\",\n\t\tdbName: \"_system\",\n\t\t// These Transport parameters are derived from github.com/hashicorp/go-cleanhttp which is under Mozilla Public License.\n\t\tcli: &http.Client{\n\t\t\tTransport: &http.Transpo...
[ "@Override\n public void generatePluginConfig(String serverName, File writeDirectory) {\n // Pass true to utilityRequest since this method will be called from the pluginUtility\n // or by the GeneratePluginConfigListener not by a call to the mbean.\n generatePluginConfig(null,serverName,true...
codesearchnet
{ "query": "Represent the comment about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about programming:" }
// XXX_OneofFuncs is for the internal use of the proto package.
[ "func (*VolumeContentSource) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {\n\treturn _VolumeContentSource_OneofMarshaler, _VolumeContentSource_OneofUnmarshaler, _VolumeContent...
[ "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 description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Software development:" }
For measuring time, this will start a timer @api @return float
[ "public static function start_timer() {\n\t\t$time = microtime();\n\t\t$time = explode(' ', $time);\n\t\t$time = $time[1] + $time[0];\n\t\treturn $time;\n\t}" ]
[ "def postloop(self):\n \n cmd.Cmd.postloop(self) # Clean up command completion\n d1_cli.impl.util.print_info(\"Exiting...\")" ]
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Software development:" }
Middleware function to check whether a user is logged on. @param Request $request @param Application $app @param string $roleRoute @return null|\Symfony\Component\HttpFoundation\RedirectResponse
[ "public function before(Request $request, Application $app, $roleRoute = null)\n {\n return parent::before($request, $app, 'extensions');\n }" ]
[ "function newService()\n {\n ### Attain Login Continue If Has\n /** @var iHttpRequest $request */\n $request = \\IOC::GetIoC()->get('/HttpRequest');\n $tokenAuthIdentifier = new IdentifierHttpToken;\n $tokenAuthIdentifier\n ->setRequest($request)\n ->setT...
codesearchnet
{ "query": "Represent the Github text about Symfony:", "pos": "Represent the Github code about Symfony:", "neg": "Represent the Github code:" }
Process intra-site links to documentation of other parts of the program.
[ "def make_links(self, project):\n \n self.doc = ford.utils.sub_links(self.doc,project)\n if 'summary' in self.meta:\n self.meta['summary'] = ford.utils.sub_links(self.meta['summary'],project)\n\n # Create links in the project\n for item in self.iterator('variables', 'ty...
[ "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 instruction:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
// WithLogLevel sets a config LogLevel value returning a Config pointer for // chaining.
[ "func (c *Config) WithLogLevel(level LogLevelType) *Config {\n\tc.LogLevel = &level\n\treturn c\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 sentence about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
// Create transforms a LocalRAR into an ClusterRAR that is requesting a namespace. That collapses the code paths. // LocalResourceAccessReview exists to allow clean expression of policy.
[ "func (r *REST) Create(ctx context.Context, obj runtime.Object, _ rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) {\n\tlocalRAR, ok := obj.(*authorizationapi.LocalResourceAccessReview)\n\tif !ok {\n\t\treturn nil, kapierrors.NewBadRequest(fmt.Sprintf(\"not a localResourceAccessReview...
[ "@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 API documentation:", "pos": "Represent the code about API documentation:", "neg": "Represent the code:" }
// SetResolver sets the Resolver field's value.
[ "func (s *CreateResolverOutput) SetResolver(v *Resolver) *CreateResolverOutput {\n\ts.Resolver = v\n\treturn s\n}" ]
[ "function(loader) {\n // public\n this.maxRecursion = 5;\n this.loader = (typeof loader === 'function') ? loader : null;\n\n // internal\n this._schemaRegistry = new SchemaRegistry();\n this._customFormatHandlers = {};\n\n // _refsRequested is an object where the key is the normalized ID\n // of the schema ...
codesearchnet
{ "query": "Represent the post about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
// EvalDataForInstanceKey constructs a suitable InstanceKeyEvalData for // evaluating in a context that has the given instance key.
[ "func EvalDataForInstanceKey(key addrs.InstanceKey) InstanceKeyEvalData {\n\t// At the moment we don't actually implement for_each, so we only\n\t// ever populate CountIndex.\n\t// (When we implement for_each later we may need to reorganize this some,\n\t// so that we can resolve the ambiguity that an int key may e...
[ "@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 text about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
// Use a custom error spec to derive an error. // spec can be none // Copies over the error code if none is specified.
[ "func replaceCustomError(m metaContext, state scriptState, spec *errorT, err1 libkb.ProofError) libkb.ProofError {\n\tif err1 == nil {\n\t\treturn err1\n\t}\n\n\t// Don't rewrite invalid_pvl errors\n\tif err1.GetProofStatus() == keybase1.ProofStatus_INVALID_PVL {\n\t\treturn err1\n\t}\n\n\tif spec == nil {\n\t\tret...
[ "def path(self, path):\n \"\"\"\"\"\"\n\n # pylint: disable=attribute-defined-outside-init\n self._path = copy_.copy(path)\n\n # The provided path is shallow copied; it does not have any attributes\n # with mutable types.\n\n # We perform this check after the initialization...
codesearchnet
{ "query": "Represent the Github summarization about Natural Language Processing:", "pos": "Represent the Github code about Natural Language Processing:", "neg": "Represent the Github code:" }
Init the monitored folder list. The list is defined in the Glances configuration file.
[ "def __set_folder_list(self, section):\n \n for l in range(1, self.__folder_list_max_size + 1):\n value = {}\n key = 'folder_' + str(l) + '_'\n\n # Path is mandatory\n value['indice'] = str(l)\n value['path'] = self.config.get_value(section, key +...
[ "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 Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Technology:" }
Natural logarithm
[ "def log(x):\n \n if isinstance(x, UncertainFunction):\n mcpts = np.log(x._mcpts)\n return UncertainFunction(mcpts)\n else:\n return np.log(x)" ]
[ "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 summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Natural Language Processing:" }
End a log message with a status defined by log
[ "def log_end_message(log):\n \n if not log in MESSAGE_LOG.keys():\n log = -1\n\n res = colors.color_text(*MESSAGE_LOG[log][1])\n\n sys.stdout.write(\"\\r[\" + res + \"] \" + MESSAGE + \"\\n\")" ]
[ "function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }" ]
codesearchnet
{ "query": "Represent the instruction about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Execute the registered Request objects in parallel Analogous to curl_multi_exec @return int the result of curl_multi_exec @throws CurlErrorException
[ "public function execute() {\n if($this->blocking) {\n return $this->executeBlocking();\n } else {\n return $this->errorCheck(\n curl_multi_exec($this->handle,$active)\n );\n }\n }" ]
[ "def makeKVPost(request_message, server_url):\n \n # XXX: TESTME\n resp = fetchers.fetch(server_url, body=request_message.toURLEncoded())\n\n # Process response in separate function that can be shared by async code.\n return _httpResponseToMessage(resp, server_url)" ]
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
Decorate a method that receives a key id and returns a secret key
[ "def secret_loader(self, callback):\n \n if not callback or not callable(callback):\n raise Exception(\"Please pass in a callable that loads secret keys\")\n self.secret_loader_callback = callback\n return callback" ]
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the Github post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "public void createPackageContents()\n\t{\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\txAnnotationEClass = createEClass(XANNOTATION);\n\t\tcreateEReference(xAnnotationEClass, XANNOTATION__ELEMENT_VALUE_PAIRS);\n\t\tcreateEReference(xAnnotationEClass, XANNOTATIO...
[ "private void addModifier(ProgramElementDoc member, Content code) {\n if (member.isProtected()) {\n code.addContent(\"protected \");\n } else if (member.isPrivate()) {\n code.addContent(\"private \");\n } else if (!member.isPublic()) { // Package private\n code....
codesearchnet
{ "query": "Represent the text about Text generation:", "pos": "Represent the code about Text generation:", "neg": "Represent the code about programming:" }
// Convert_v1alpha1_ImageReviewStatus_To_imagepolicy_ImageReviewStatus is an autogenerated conversion function.
[ "func Convert_v1alpha1_ImageReviewStatus_To_imagepolicy_ImageReviewStatus(in *v1alpha1.ImageReviewStatus, out *imagepolicy.ImageReviewStatus, s conversion.Scope) error {\n\treturn autoConvert_v1alpha1_ImageReviewStatus_To_imagepolicy_ImageReviewStatus(in, out, s)\n}" ]
[ "func Convert_build_CommonSpec_To_v1_CommonSpec(in *build.CommonSpec, out *v1.CommonSpec, s conversion.Scope) error {\n\treturn autoConvert_build_CommonSpec_To_v1_CommonSpec(in, out, s)\n}" ]
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
// SetLastModifiedBy sets the LastModifiedBy field's value.
[ "func (s *BaiduChannelResponse) SetLastModifiedBy(v string) *BaiduChannelResponse {\n\ts.LastModifiedBy = &v\n\treturn s\n}" ]
[ "private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n GetField fields = in.readFields();\n beginDefaultContext = fields.get(BEGIN_DEFAULT, true);\n\n // Note that further processing is required in JEEMetadataContextProviderImpl.deserializeThreadCo...
codesearchnet
{ "query": "Represent the sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Create and return a new range tree from the specified ranges. @param <C> range endpoint type @param ranges ranges, must not be null @return a new range tree from the specified ranges
[ "public static <C extends Comparable> RangeTree<C> create(final Iterable<Range<C>> ranges) {\n return new CenteredRangeTree<C>(ranges);\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 comment about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Get a path relative from the current directory's path. @param string $path @return string
[ "public function getPathRelativeToDirectory($path)\n {\n // Get the last segment of the directory as asset paths will be relative to this\n // path. We can then replace this segment with nothing in the assets path.\n $directoryLastSegment = substr($this->path, strrpos($this->path, '/') + 1);...
[ "public function reduceFilePath($varValue, \\DataContainer $dc)\n {\n $doc = $dc->activeRecord;\n\n $path = \\FilesModel::findByUuid($varValue)->path;\n\n $arrFileNameParts = \\Document::splitFileName(substr($path, strlen(\\DmsConfig::getBaseDirectory(true))));\n\n // TODO (#33): reset the new fileType...
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "@Override\n\tpublic boolean eIsSet(int featureID) {\n\t\tswitch (featureID) {\n\t\t\tcase BpsimPackage.PRIORITY_PARAMETERS__INTERRUPTIBLE:\n\t\t\t\treturn interruptible != null;\n\t\t\tcase BpsimPackage.PRIORITY_PARAMETERS__PRIORITY:\n\t\t\t\treturn priority != null;\n\t\t}\n\t\treturn super.eIsSet(featureID);\n\t...
[ "protected function _init($definition=null)\n {\n\n if (!is_null($definition)) {\n $this->_packageXml = simplexml_load_string($definition);\n } else {\n $packageXmlStub = <<<END\n<?xml version=\"1.0\"?>\n<package>\n <name />\n <version />\n <stability />\n <license...
codesearchnet
{ "query": "Represent the Github summarization about Text generation:", "pos": "Represent the Github code about Text generation:", "neg": "Represent the Github code:" }
Returns the callback that will be called when an error is handled Uses the currently running environment when none is given. @param string|null $env Name of the environment @return callable
[ "public function getCallback($env = null)\n {\n $env = $env ?: $this->running_env;\n return isset($this->callbacks[$env]) ? $this->callbacks[$env] : 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 Github post about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about Software development:" }
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "public void setSIZE2(Integer newSIZE2) {\n\t\tInteger oldSIZE2 = size2;\n\t\tsize2 = newSIZE2;\n\t\tif (eNotificationRequired())\n\t\t\teNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.IDE_STRUCTURE__SIZE2, oldSIZE2, size2));\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 description about Text generation:", "pos": "Represent the code about Text generation:", "neg": "Represent the code:" }
Determine if this log record took longer than the specified amount.
[ "function isSlowerThan(amount) {\n // always logging\n var diff = process.hrtime(this._start)\n , micro = Math.round(((diff[0] * 1e9) + diff[1]) / 1e3);\n if(amount === 0) return micro;\n if(micro > amount) {\n return micro;\n }\n return -1;\n}" ]
[ "def setupJobAfterFailure(self, config):\n \n self.remainingRetryCount = max(0, self.remainingRetryCount - 1)\n logger.warn(\"Due to failure we are reducing the remaining retry count of job %s with ID %s to %s\",\n self, self.jobStoreID, self.remainingRetryCount)\n # S...
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code:" }
this function has to be written without recursion or it blows the stack in case of sync stream
[ "function next () {\n let doNext = true\n let decoded = false\n\n const decodeCb = (err, msg) => {\n decoded = true\n if (err) {\n p.end(err)\n doNext = false\n } else {\n p.push(msg)\n if (!doNext) {\n next()\n }\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:" }
// UnmarshalBinary unmarshals data into e.
[ "func (e *MeasurementBlockElem) UnmarshalBinary(data []byte) error {\n\tstart := len(data)\n\n\t// Parse flag data.\n\te.flag, data = data[0], data[1:]\n\n\t// Parse tag block offset.\n\te.tagBlock.offset, data = int64(binary.BigEndian.Uint64(data)), data[8:]\n\te.tagBlock.size, data = int64(binary.BigEndian.Uint64...
[ "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:" }
Return an openstack_cloud
[ "def get_openstack_cloud(auth=None):\n '''\n \n '''\n if auth is None:\n auth = __salt__['config.option']('keystone', {})\n if 'shade_oscloud' in __context__:\n if __context__['shade_oscloud'].auth == auth:\n return __context__['shade_oscloud']\n __context__['shade_oscloud...
[ "def build(self):\n \"\"\"\"\"\"\n from ambry.orm.config import BuildConfigGroupAccessor\n\n # It is a lightweight object, so no need to cache\n return BuildConfigGroupAccessor(self.dataset, 'buildstate', self._session)" ]
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
// GetExternalID returns the ExternalID field if it's non-nil, zero value otherwise.
[ "func (c *CheckRun) GetExternalID() string {\n\tif c == nil || c.ExternalID == nil {\n\t\treturn \"\"\n\t}\n\treturn *c.ExternalID\n}" ]
[ "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 sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Software development:" }
// PutTelegrafConfig put a telegraf config to storage.
[ "func (c *Client) PutTelegrafConfig(ctx context.Context, tc *platform.TelegrafConfig) error {\n\treturn c.db.Update(func(tx *bolt.Tx) (err error) {\n\t\tpErr := c.putTelegrafConfig(ctx, tx, tc)\n\t\tif pErr != nil {\n\t\t\terr = pErr\n\t\t}\n\t\treturn nil\n\t})\n}" ]
[ "def build(self):\n \"\"\"\"\"\"\n from ambry.orm.config import BuildConfigGroupAccessor\n\n # It is a lightweight object, so no need to cache\n return BuildConfigGroupAccessor(self.dataset, 'buildstate', self._session)" ]
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Returns the content locale. @return array
[ "public function getContentData()\n {\n $data = [\n 'locale' => $this->contentLocaleProvider->getCurrentLocale(),\n ];\n if (null !== $page = $this->pageHelper->getCurrent()) {\n $data['id'] = $page->getId();\n }\n\n return $data;\n }" ]
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github instruction about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code:" }
Convert a String to a slug @param value The value to slugify @return The slugified value
[ "public static String slugify(final String value) {\n validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);\n String transliterated = transliterate(collapseWhitespace(value.trim().toLowerCase()));\n return Arrays.stream(words(transliterated.replace(\"&\", \"-and-\"), \"\\\\W+\")).co...
[ "function quoteName (name) {\n // require name to be string\n assert.equal(typeof name, 'string', 'name must be string')\n // do not allow quote symbol in name - all other name validation is\n // left to the database\n assert.ok(!name.match(/`/), 'invalid name')\n // return quoted name\n return...
codesearchnet
{ "query": "Represent the summarization about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Software development:" }
Configure the command options.
[ "protected function configure()\n {\n $command = new ConsoleCommand();\n\n $command->name($this->commandName)\n ->description($this->commandDescription);\n\n if ($this->argument != null) {\n $command->argument([\n 'name' => $this->argument,\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 Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Gets the parameters for a given filter name. @param string $name The name of the filter. @return array|null The filter parameters, or null if it is undefined
[ "public function getFilterParameters($name)\n {\n return isset($this->attributes['filters'][$name])\n ? $this->attributes['filters'][$name]['parameters']\n : null;\n }" ]
[ "private function getColumnFromName($name)\n {\n foreach ($this->columnConfiguration as $i => $col) {\n if ($col->getName() == $name) {\n return $col;\n }\n }\n\n // This exception should never happen. If it does, something is\n // wrong w/ the rel...
codesearchnet
{ "query": "Represent the comment about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Software development:" }
Get a JSON fragment from cache. @param address - a unique address for cahce @param jsonPath - a JSON path expression @param jsonFragment - a JSON fragment in which the path should be searched for @return The JSON fragment
[ "public Object getFragment(String address, String jsonPath, Object jsonFragment) {\n Object jsonFragment2 = null;\n if (!fragmentCache.containsKey(address)) {\n jsonFragment2 = read(jsonPath, jsonFragment);\n fragmentCache.put(address, jsonFragment2);\n } else {\n jsonFragment2 = fragmentCac...
[ "function PbfSplicer(options) {\n // tag which will be auto-removed and auto-injected. Usually 'name'\n this.nameTag = options.nameTag;\n // tag that contains JSON initially, and which works as a prefix for multiple values\n this.multiTag = options.multiTag;\n\n // If options.namePicker is given, this class co...
codesearchnet
{ "query": "Represent the comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
/* (non-Javadoc) @see moa.classifiers.rules.RuleActiveLearningNodeInterface#getPrediction(weka.core.Instance)
[ "public double[] getPrediction(Instance instance) {\r\n int predictionMode = this.getLearnerToUse(instance, this.predictionFunction);\r\n return getPrediction(instance, predictionMode);\r\n }" ]
[ "public static String[] getTabs() {\n String[] result;\n String tabs;\n\n // read and split on comma\n tabs = get(\"Tabs\", \"moa.gui.ClassificationTabPanel,moa.gui.RegressionTabPanel,moa.gui.MultiLabelTabPanel,moa.gui.MultiTargetTabPanel,moa.gui.clustertab.ClusteringTabPanel,moa.gui.out...
codesearchnet
{ "query": "Represent the sentence about Deep Learning:", "pos": "Represent the code about Deep Learning:", "neg": "Represent the code about Programming:" }
The envs for this app.
[ "def config(self):\n \"\"\"\"\"\"\n\n return self._h._get_resource(\n resource=('apps', self.name, 'config_vars'),\n obj=ConfigVars, app=self\n )" ]
[ "def build(self):\n \"\"\"\"\"\"\n from ambry.orm.config import BuildConfigGroupAccessor\n\n # It is a lightweight object, so no need to cache\n return BuildConfigGroupAccessor(self.dataset, 'buildstate', self._session)" ]
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
Asserts the configuration of image styles. @Then exactly the following image styles should exist @throws \Exception
[ "public function assertImageStyles(TableNode $expected) {\n $image_style_info = [];\n foreach ($this->getImageStyles() as $image_style) {\n $image_style_info[] = [\n $image_style->label(),\n $image_style->id(),\n ];\n }\n $actual = new TableNode($image_style_info);\n\n (new Ta...
[ "def check_act_assert_spacing(self) -> typing.Generator[AAAError, None, None]:\n \n yield from self.check_block_spacing(\n LineType.act,\n LineType._assert,\n 'AAA04 expected 1 blank line before Assert block, found {}',\n )" ]
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
/* Implementation to clear the values from the storage engine. @see YAHOO.util.Storage._clear
[ "function() {\n for (var i = this._keys.length - 1; 0 <= i; i -= 1) {\n var key = this._keys[i];\n _engine.callSWF(\"removeItem\", [key]);\n }\n\n this._keys = [];\n this.length = 0;\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 summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
Creates {@code Wgs84Coordinates} based on the charging station coordinates. @param chargingStation charging station @return {@code Wgs84Coordinates} based on the charging station coordinates.
[ "public Wgs84Coordinates getCoordinates(ChargingStation chargingStation) {\n Wgs84Coordinates wgs84Coordinates = new Wgs84Coordinates();\n wgs84Coordinates.setLatitude(chargingStation.getLatitude());\n wgs84Coordinates.setLongitude(chargingStation.getLongitude());\n return wgs84Coordinat...
[ "function (type) {\n /**\n * Type of this object.\n * @type {WKTType}\n */\n this.type = type;\n\n /**\n * It is possible for the WKT object to be displayed not in 2D but in 3D.\n * @type {Boolean}\n * @private\n */\n this._is3d = f...
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
@param WKBBuffer $buffer @param CoordinateSystem $cs @return GeometryCollection
[ "private function readGeometryCollection(WKBBuffer $buffer, CoordinateSystem $cs) : GeometryCollection\n {\n $numGeometries = $buffer->readUnsignedLong();\n $geometries = [];\n\n for ($i = 0; $i < $numGeometries; $i++) {\n $geometries[] = $this->readGeometry($buffer, $cs->SRID());...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github text about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Adds an operator expression to the pipeline. @param mTransaction Transaction to operate with. @param mOperator Operator type.
[ "public void addOperatorExpression(final INodeReadTrx mTransaction, final String mOperator) {\n\n assert getPipeStack().size() >= 1;\n\n final INodeReadTrx rtx = mTransaction;\n\n final AbsAxis mOperand2 = getPipeStack().pop().getExpr();\n\n // the unary operation only has one operator\n...
[ "public LHS toLHS( CallStack callstack, Interpreter interpreter)\n throws EvalError\n {\n // loosely typed map expression new {a=1, b=2} are treated\n // as non assignment (LHS) to retrieve Map.Entry key values\n // then wrapped in a MAP_ENTRY type LHS for value assignment.\n r...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Returns a unique list of every rdf type configured in the search doc spec ['type'] restriction @param string $storeName @param string|null $pod @return array
[ "public function getTypesInSearchSpecifications($storeName, $pod = null)\n {\n return array_unique($this->getSpecificationTypes($this->getSearchDocumentSpecifications($storeName), $pod));\n }" ]
[ "def build(self):\n \"\"\"\"\"\"\n from ambry.orm.config import BuildConfigGroupAccessor\n\n # It is a lightweight object, so no need to cache\n return BuildConfigGroupAccessor(self.dataset, 'buildstate', self._session)" ]
codesearchnet
{ "query": "Represent the Github post about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code:" }
Insert data sets into the database. @param dataSets Data sets for insertion. @see #insert(DataSet) @see #delete(DataSet...) @see #update(DataSet...) @see #populate(DataSet...) @see #populateIfChanged(DataSet...) @since 1.2
[ "@SafeVarargs\n public static void insert(DataSet... dataSets) {\n foreach(dataSets, DBSetup::insert, CallInfo.create());\n }" ]
[ "static void populate(CallInfo callInfo, DataSet data) {\n Table table = asTable(data.getSource());\n table.setDirtyStatus(true);\n doPopulate(callInfo, table, data);\n\n }" ]
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about Software Development:" }
Inserting data into associated table.
[ "public function execute()\n {\n if (!$this->isEmpty()) {\n $this->table->delete($this->context + $this->where)->run();\n }\n\n parent::execute();\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 post:", "pos": "Represent the code:", "neg": "Represent the code:" }
////////////////////////////////////////////////////////////
[ "public static String generateNumricPassword(final int numberOfChar) {\n\t\tfinal Random randomGenerator = new Random();\n\t\tString password = \"\";\n\t\tfor (int i = 1; i <= numberOfChar; ++i) {\n\t\t\tpassword += randomGenerator.nextInt(10);\n\t\t}\n\t\treturn password;\n\t}" ]
[ "private void readPacket(Results results) throws SQLException {\n Buffer buffer;\n try {\n buffer = reader.getPacket(true);\n } catch (IOException e) {\n throw handleIoException(e);\n }\n\n switch (buffer.getByteAt(0)) {\n\n //***********************************************************...
codesearchnet
{ "query": "Represent the Github description about language and writing:", "pos": "Represent the Github code about language and writing:", "neg": "Represent the Github code:" }
Send an https api request
[ "def exec_request(endpoint, func, raise_for_status=False, **kwargs):\n \n try:\n endpoint = '{0}/api/v1/{1}'.format(settings.SEAT_URL, endpoint)\n headers = {'X-Token': settings.SEAT_XTOKEN, 'Accept': 'application/json'}\n logger.debug(headers)\n logger.debu...
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Retrieve an indexed element and return it as a Boolean. @param index An integer value specifying the offset from the beginning of the array. @return The element as a Boolean, or null if the element is not found.
[ "public Boolean getBoolean (int index) {\r\n String string = getString (index);\r\n return (string != null) ? Boolean.parseBoolean (string) : null;\r\n }" ]
[ "public function containsValue($value): bool {\n\n /**\n * @var string $arrayIndex\n * @var SinglyLinkedList $list\n */\n foreach ($this->bucket as $arrayIndex => $list) {\n /* $list is the first element in the bucket. The bucket\n * can contain max $maxS...
codesearchnet
{ "query": "Represent the Github post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
If statsSync is successfull push plugin and run express server
[ "function (args, config, logger, helper) {\n console.log(chalk.blue('Running server on http://localhost:' + port + '.....PID:' + process.pid))\n\n var express = require('express')\n var expressApp = express()\n\n // require server path and pass express expressApp to it\n require(pathToServe...
[ "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 instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
// RequestIDWithConfig returns a X-Request-ID middleware with config.
[ "func RequestIDWithConfig(config RequestIDConfig) echo.MiddlewareFunc {\n\t// Defaults\n\tif config.Skipper == nil {\n\t\tconfig.Skipper = DefaultRequestIDConfig.Skipper\n\t}\n\tif config.Generator == nil {\n\t\tconfig.Generator = generator\n\t}\n\n\treturn func(next echo.HandlerFunc) echo.HandlerFunc {\n\t\treturn...
[ "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 post about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about consul address:" }
Add a node, connecting it to all the active nodes.
[ "def add_node(self, node):\n \"\"\"\"\"\"\n for predecessor in self._most_recent_predecessors_to(node):\n predecessor.connect(whom=node)" ]
[ "@Override\n public <T> Streamlet<T> applyOperator(IStreamletOperator<R, T> operator) {\n checkNotNull(operator, \"operator cannot be null\");\n\n // By default, NoneStreamGrouping stategy is used. In this stategy, tuples are forwarded\n // from parent component to a ramdon one of all the instances of the...
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code about Programming:" }
Parse the attributes passed to the view from the XML @param a the attributes to parse
[ "private void parseAttributes(TypedArray a) {\n // We transform the default values from DIP to pixels\n DisplayMetrics metrics = getContext().getResources().getDisplayMetrics();\n barWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, barWidth, metrics);\n rimWidth = (int) TypedValue.ap...
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the Github instruction about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
// WriteLong writes a long value.
[ "func (be *BinaryEncoder) WriteLong(x int64) {\n\t_, _ = be.buffer.Write(be.encodeVarint64(x))\n}" ]
[ "public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }" ]
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Recursively deserializes all date values in an object. @param {Backbone.DynamoDB.Model} model @param {Object} json
[ "function deserializeAllDates(model, json) {\n\t_.each(json, function (value, name) {\n\t\tif ( !_.isDate( value ) && !isBackboneInstance( value ) ) {\n\t\t\tif ( _.isString( value ) && model.isSerializedDate( name, value ) ) {\n\t\t\t\tjson[ name ] = model.deserializeDate( name, value );\n\t\t\t} else if ( !isScal...
[ "public <V> Function<Cursor, V> cursorToBean(Class<V> api)\n {\n return (FindDataVault<ID,T,V>) _valueBeans.get(api);\n }" ]
codesearchnet
{ "query": "Represent the text about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
返回一个json字符串,然后终结应用 @param string $message @param array $data @param int $code
[ "public static function output($message, $data = [], $code = 0)\r\n {\r\n header('Content-Type:text/html;Charset=' . APP_CHARSET);\r\n $output = [\r\n 'code' => $code,\r\n 'message' => $message,\r\n 'data' => $data,\r\n ];\r\n if (isset($_GET['e_callba...
[ "function hot(backendTplServer) {\n backendTplServer.app.get('/news/hot', function(request, response) {\n var data = Mock.mock({\n 'news|0-10': [news]\n });\n\n // 如果对象中有方法的定义, 最好不要放在 Mock.mock 中, 因为他会将方法定义变成直接的属性值(方法的返回值)\n data.__helper = __helper;\n\n response.ren...
codesearchnet
{ "query": "Represent the comment about PHP programming:", "pos": "Represent the code about PHP programming:", "neg": "Represent the code:" }
https://developer.zendesk.com/rest_api/docs/core/automations#update-many-automations
[ "def automations_update_many(self, data, **kwargs):\n \"\"\n api_path = \"/api/v2/automations/update_many.json\"\n return self.call(api_path, method=\"PUT\", data=data, **kwargs)" ]
[ "def authorize_proxy_routes\n deny_access unless (authenticate || authenticate_client)\n\n route, params = Engine.routes.router.recognize(request) do |rte, parameters|\n break rte, parameters if rte.name\n end\n\n # route names are defined in routes.rb (:as => :name)\n case route.nam...
codesearchnet
{ "query": "Represent the comment about developer.zendesk.com:", "pos": "Represent the code about developer.zendesk.com:", "neg": "Represent the code:" }
// releaseAllServers is the handler to release the lock on all servers. it's an admin-only handler
[ "func releaseAllServers(w http.ResponseWriter, r *http.Request) {\n\tmx.Lock()\n\tdefer mx.Unlock()\n\tfor _, status := range servers {\n\t\tstatus.Reserved = false\n\t}\n\tif err := json.NewEncoder(w).Encode(servers); err != nil {\n\t\tlog.Printf(\"[JSON Encoding Error] %s\", err)\n\t\thttp.Error(w, err.Error(), h...
[ "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 text about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Determine whether element conforms to etype
[ "def element_conforms(element, etype) -> bool:\n \n from pyjsg.jsglib import Empty\n\n if isinstance(element, etype):\n return True\n # This catches the Optional[] idiom\n if (element is None or element is Empty) and issubclass(etype, type(None)):\n return True\n elif element is Empt...
[ "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 Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Load config. @param servletContext the servlet context @return the configuration
[ "Configuration loadConfig(ServletContext servletContext) {\n String handlers = servletContext.getInitParameter(ContextConfigParams.PARAM_HANDLERS);\n String layout = servletContext.getInitParameter(ContextConfigParams.PARAM_LAYOUT);\n String filters = servletContext.getInitParameter(ContextConf...
[ "@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 comment about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about Programming:" }
Create a concrete instance of an Operator
[ "public Operator createOperator(int op, Selector operand)\n {\n\tOperator operator = new OperatorImpl(op, operand);\n\n\treturn operator; \n }" ]
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
@param string $filePath @return string
[ "public static function readFile($filePath)\n {\n if (false === self::exists($filePath)) {\n throw new RuntimeException(sprintf('unable to find \"%s\"', $filePath));\n }\n if (false === $fileData = file_get_contents($filePath)) {\n throw new RuntimeException(sprintf('un...
[ "final protected function c() {return dfc($this, function() {/** @var int|null $id $id */return\n\t\t!($id = $this->o()->getCustomerId()) ? null : df_customer($id)\n\t;});}" ]
codesearchnet
{ "query": "Represent the post about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
/* (non-Javadoc) @see javax.money.spi.MonetaryAmountFormatProviderSpi#getFormat(javax.money.format.AmountFormatContext)
[ "@Override\n public Collection<MonetaryAmountFormat> getAmountFormats(AmountFormatQuery amountFormatQuery) {\n requireNonNull(amountFormatQuery, \"AmountFormatContext required\");\n if (!amountFormatQuery.getProviderNames().isEmpty() &&\n !amountFormatQuery.getProviderNames().contain...
[ "@Override\n\tpublic void setNameMap(Map<java.util.Locale, String> nameMap,\n\t\tjava.util.Locale defaultLocale) {\n\t\t_commerceTaxMethod.setNameMap(nameMap, defaultLocale);\n\t}" ]
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Present the generated config for download @return $this
[ "public function getConfigAction() {\n $cfgr = Mage::getModel('turpentine/varnish_admin')\n ->getConfigurator();\n if (is_null($cfgr)) {\n $this->_getSession()->addError($this->__('Failed to load configurator'));\n $this->_redirect('*/cache');\n } else {\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 summarization about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about Software development:" }
Returns the latest results from the current manialink page as an array of structs {string Login, int PlayerId, int Result}: - Result == 0 -> no answer - Result > 0 -> answer from the player. @param bool $multicall @return Structures\PlayerAnswer[]
[ "function getManialinkPageAnswers($multicall = false)\n {\n if ($multicall) {\n return $this->execute(ucfirst(__FUNCTION__), array(), $this->structHandler('PlayerAnswer', true));\n }\n return Structures\\PlayerAnswer::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__)));\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 instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
return module name.
[ "def getTypesModuleName(self):\n '''\n '''\n assert self.wsdl is not None, 'initialize, call fromWSDL'\n if self.types_module_name is not None:\n return self.types_module_name\n\n wsm = WriteServiceModule(self.wsdl)\n return wsm.getTypesModuleName()" ]
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the comment:", "pos": "Represent the code:", "neg": "Represent the code:" }
Code adapted from pymc3.stats.calc_min_interval: https://github.com/pymc-devs/pymc3/blob/master/pymc3/stats.py
[ "def _hpd_interval(self, x, width):\n \n\n x = np.sort(x)\n n = len(x)\n\n interval_idx_inc = int(np.floor(width * n))\n n_intervals = n - interval_idx_inc\n interval_width = x[interval_idx_inc:] - x[:n_intervals]\n\n if len(interval_width) == 0:\n raise V...
[ "def get_logits_over_interval(*args, **kwargs):\n \"\"\"\"\"\"\n warnings.warn(\"`get_logits_over_interval` has moved to \"\n \"`cleverhans.plot.pyplot_image`. \"\n \"cleverhans.utils.get_logits_over_interval may be removed on \"\n \"or after 2019-04-24.\")\n # pylint...
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// EvalDecimal implements Expression interface.
[ "func (sf *ScalarFunction) EvalDecimal(ctx sessionctx.Context, row chunk.Row) (*types.MyDecimal, bool, error) {\n\treturn sf.Function.evalDecimal(row)\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 post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
// SetDirectoryLimits sets the DirectoryLimits field's value.
[ "func (s *GetDirectoryLimitsOutput) SetDirectoryLimits(v *DirectoryLimits) *GetDirectoryLimitsOutput {\n\ts.DirectoryLimits = v\n\treturn s\n}" ]
[ "def _GetStat(self):\n \n stat_object = super(VShadowFileEntry, self)._GetStat()\n\n if self._vshadow_store is not None:\n # File data stat information.\n stat_object.size = self._vshadow_store.volume_size\n\n # Ownership and permissions stat information.\n\n # File entry type stat informat...
codesearchnet
{ "query": "Represent the Github description about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about File management:" }
Ping externals URLS when an entry is saved.
[ "def ping_external_urls_handler(sender, **kwargs):\n \n entry = kwargs['instance']\n\n if entry.is_visible and settings.SAVE_PING_EXTERNAL_URLS:\n ExternalUrlsPinger(entry)" ]
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Register the application services.
[ "public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/../config/authentication.php', 'authentication');\n\n $this->app->singleton(PasswordResetRepositoryContract::class, function ($app) {\n return new PasswordResetRepository($app['config']);\n });\n\n $this->...
[ "@Override\n public void generatePluginConfig(String serverName, File writeDirectory) {\n // Pass true to utilityRequest since this method will be called from the pluginUtility\n // or by the GeneratePluginConfigListener not by a call to the mbean.\n generatePluginConfig(null,serverName,true...
codesearchnet
{ "query": "Represent the Github description about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Returns triads built on each step of a scale. Only works for diatonic scales, and should always render the chords using the right enharmonic spellings.
[ "public function getTriads() {\n \tif (!$this->isHeliotonic()) {\n\t\t\treturn null;\n\t\t}\n \t$pitches = $this->getPitches(); // this step already does the proper enharmonization for spelling\n \t$count = count($pitches);\n\n \t// now get the same pitches up an octave\n \t$raised = array();\n \t...
[ "def _calculate_index_of_coincidence(frequency_map, length):\n \n if length <= 1:\n return 0\n # We cannot error here as length can legitimiately be 1.\n # Imagine a ciphertext of length 3 and a key of length 2.\n # Spliting this text up and calculating the index of coincidence res...
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Extracts the exception from given arguments or from :func:`sys.exc_info`. :param \*args: Arguments. :type \*args: \* :return: Extracted exception. :rtype: tuple
[ "def extract_exception(*args):\n \n\n cls, instance, trcback = sys.exc_info()\n\n exceptions = filter(lambda x: issubclass(type(x), BaseException), args)\n trcbacks = filter(lambda x: issubclass(type(x), types.TracebackType), args)\n\n cls, instance = (type(exceptions[0]), exceptions[0]) if exception...
[ "def arg_to_array(func):\n \n def fn(self, arg, *args, **kwargs):\n \"\"\"Function\n\n Parameters\n ----------\n arg : array-like\n Argument to convert.\n *args : tuple\n Arguments.\n **kwargs : dict\n Keyword arguments.\n\n Ret...
codesearchnet
{ "query": "Represent the Github summarization about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
删除客服帐号。 :param account: 客服账号的用户名 :param nickname: 客服账号的昵称 :param password: 客服账号的密码 :return: 返回的 JSON 数据包
[ "def delete_custom_service_account(self, account, nickname, password):\n \n return self.post(\n url=\"https://api.weixin.qq.com/customservice/kfaccount/del\",\n data={\n \"kf_account\": account,\n \"nickname\": nickname,\n \"password\"...
[ "public function info() {\n /**\n * avatar\t用户头像\tString\t如果没有数据的时候不会返回该数据,请做好容错\t可空\thttps://tfsimg.alipay.com/images/partner/T1k0xiXXRnXXXXXXXX\n nick_name\t用户昵称\tString\t如果没有数据的时候不会返回该数据,请做好容错\t可空\t张三\n province\t省份\tString\t用户注册时填写的省份 如果没有数据的时候不会返回该数据,请做好容错\t可空\t浙江省\n city\t城...
codesearchnet
{ "query": "Represent the instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Adds the style to the dom element. @param \DOMElement $element @param string $property @param string $value
[ "static public function addStyle(\\DOMElement $element, $property, $value)\n {\n $s = static::explodeStyles((string)$element->getAttribute('style'));\n\n $s[$property] = $value;\n\n $element->setAttribute('style', static::implodeStyles($s));\n }" ]
[ "function typecastPropertyValue ($name, $v)\n {\n if ($this->isScalar ($name) && $this->isEnum ($name))\n $this->validateEnum ($name, $v);\n\n $type = $this->getTypeOf ($name);\n if ($type && !type::validate ($type, $v))\n throw new ComponentException ($this->component,\n sprintf (\n ...
codesearchnet
{ "query": "Represent the Github instruction about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about Programming:" }
Draw the knob where it is supposed to be relative to the line.
[ "private void drawKnob() {\r\n\t\t// Abort if not attached\r\n\t\tif (!isAttached()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Move the knob to the correct position\r\n\t\tElement knobElement = knobImage.getElement();\r\n\t\tint lineWidth = lineElement.getOffsetWidth();\r\n\t\tint knobWidth = knobElement.getOffsetW...
[ "function touchMove(element, clientX, clientY) {\n\n element[deltaXSymbol] = clientX - element[previousXSymbol];\n element[deltaYSymbol] = clientY - element[previousYSymbol];\n element[previousXSymbol] = clientX;\n element[previousYSymbol] = clientY;\n if (Math.abs(element[deltaXSymbol]) > Math.abs(element[del...
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
init file =========
[ "function(file) {\n var data = file.data = parse(file.relative, {locales: options.locales});\n\n // data.locale\n data.locale || (data.locale = options.defaultLocale);\n\n // data.document\n if (~(options.dataExtensions || []).indexOf(data.extname)) {\n data.document = 'data';\n } else if (fm...
[ "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 sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
Locate the description file @param string $entityClass The class of the entity @return string The definition file path
[ "private function locateDescription($entityClass)\n {\n $entityName = preg_replace('~^.*?(\\w+)$~', '\\1', $entityClass);\n $definitionFile = $entityName . '.xml';\n $filename = $this->locator->findFile($definitionFile);\n\n if (!is_null($filename)) {\n return $fi...
[ "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 description about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Begins the insert query @param string $table Table name @return QueryBuilder Chainability object
[ "public function insert(string $table) : QueryBuilder\n {\n $this->_query[] = \"INSERT INTO\";\n $this->_query[] = \"`\". $this->sanitize($table) .\"`\";\n\n return $this;\n }" ]
[ "@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 instruction about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }