diff --git "a/data/corpora/code_docs/test_pos.jsonl" "b/data/corpora/code_docs/test_pos.jsonl" new file mode 100644--- /dev/null +++ "b/data/corpora/code_docs/test_pos.jsonl" @@ -0,0 +1,294 @@ +{"id": "code_docs_test_pos_0000", "text": "Produce similar fs, hs and ss interface and endpoints descriptors. Should be useful for devices desiring to work in all 3 speeds with maximum endpoint wMaxPacketSize. Reduces data duplication from descriptor declarations. Not intended to cover fancy combinations. interface (dict): Keyword arguments for getDescriptor(USBInterfaceDescriptor, ...) in all speeds. bNumEndpoints must not be provided. endpoint_list (list of dicts) Each dict represents an endpoint, and may contain the following items: - \"endpoint\": required, contains keyword arguments for getDescriptor(USBEndpointDescriptorNoAudio, ...) or getDescriptor(USBEndpointDescriptor, ...) The with-audio variant is picked when its extra fields are assigned a value. wMaxPacketSize may be missing, in which case it will be set to the maximum size for given speed and endpoint type. bmAttributes must be provided. If bEndpointAddress is zero (excluding direction bit) on the first endpoint, endpoints will be assigned their rank in this list, starting at 1. Their direction bit is preserved. If bInterval is present on a INT or ISO endpoint, it must be in millisecond units (but may not be an integer), and will be converted to the nearest integer millisecond for full-speed descriptor, and nearest possible interval for high- and super-speed descriptors. If bInterval is present on a BULK endpoint, it is set to zero on full-speed descriptor and used as provided on high- and super-speed descriptors. - \"superspeed\": optional, contains keyword arguments for getDescriptor(USBSSEPCompDescriptor, ...) - \"superspeed_iso\": optional, contains keyword arguments for getDescriptor(USBSSPIsocEndpointDescriptor, ...) Must be provided and non-empty only when endpoint is isochronous and \"superspeed\" dict has \"bmAttributes\" bit 7 set. class_descriptor (list of descriptors of any type) Descriptors to insert in all speeds between the interface descriptor and endpoint descriptors. Returns a 3-tuple of lists: - fs descriptors - hs descriptors - ss descriptors", "label": 1, "domain": "code", "token_count": 417, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0001", "text": "Like unicode.replace() but accept several substitutions and regexes Args: string: the string to split on. patterns: a string, or an iterable of strings to be replaced. substitutions: a string or an iterable of string to use as a replacement. You can pass either one string, or an iterable containing the same number of sustitutions that you passed as patterns. You can also pass a callable instead of a string. It should expact a match object as a parameter. maxreplace: the max number of replacement to make. 0 is no limit, which is the default. flags: flags you wish to pass if you use regexes. You should pass them as a string containing a combination of: - 'm' for re.MULTILINE - 'x' for re.VERBOSE - 'v' for re.VERBOSE - 's' for re.DOTALL - '.' for re.DOTALL - 'd' for re.DEBUG - 'i' for re.IGNORECASE - 'u' for re.UNICODE - 'l' for re.LOCALE Returns: The string with replaced bits. Raises: ValueError: if you pass the wrong number of substitution. Example: >>> print(multireplace(u'a,b;c/d', (u',', u';', u'/'), u',')) a,b,c,d >>> print(multireplace(u'a1b33c-d', u'\\d+', u',')) a,b,c-d >>> print(multireplace(u'a-1,b-3,3c-d', u',|-', u'', maxreplace=3)) a1b3,3c-d >>> def upper(match): ... return match.group().upper() ... >>> print(multireplace(u'a-1,b-3,3c-d', u'[ab]', upper)) A-1,B-3,3c-d", "label": 1, "domain": "code", "token_count": 376, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0002", "text": "

Perform an XML 1.0 level 1 (only markup-significant chars) escape operation on a Reader input meant to be an XML attribute value, writing results to a Writer.

Level 1 means this method will only escape the five markup-significant characters which are predefined as Character Entity References in XML: <, >, &, " and '.

Besides, being an attribute value also \t, \n and \r will be escaped to avoid white-space normalization from removing line feeds (turning them into white spaces) during future parsing operations.

This method calls {@link #escapeXml10(Reader, Writer, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:

This method is thread-safe.

@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.5", "label": 1, "domain": "code", "token_count": 403, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0003", "text": "/* generateAmortizationTable ----------------------- This function generates an amortization schedule. The schedule is returned as a Javascript object. The function accepts the following arguments: PV (required): the starting principal amount of the loan NPER (required): the number of whole months over which the loan extends rate (required): the annual interest rate of the loan expressed as a percentage, e.g., 10.5 firstPaymentDate (optional): the date the first payment will be made frequency (optional): the payment frequency, which can be any of the following strings: - semimonthly - twice a month - monthly - once each month - bimonthly - every two months - quarterly - every quarter - semiannually - ever 6 months - annually - ever 12 months - none or one - only one payment at the end of the loan - typically don't mix this with balloonDate balloonDate (optional/required): the date a balloon payment will be made. This date will be forced to earliest corresponding payment date. This date will be ignored if it is greater than the term (months) of the loan. The function returns an array with each array element containing the following fields: paymentNumber - the number for a payment principle: the principal balance remaining at the end of the period accumulatedInterest: the interest accumulate from all previous periods through this period payment: the periodic payment the borrower is required to pay paymentToPrinciple: the amount of the payment allocated to paying down the principal paymentToInterest: the amount of the payment allocated to paying interest date: the date of the payment for the period", "label": 1, "domain": "code", "token_count": 323, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0004", "text": "Parse the values stored in the \"ifos\" and \"instruments\" columns found in many tables. This function is mostly for internal use by the .instruments properties of the corresponding row classes. The mapping from input to output is as follows (rules are applied in order): input is None --> output is None input contains \",\" --> output is set of strings split on \",\" with leading and trailing whitespace stripped from each piece and empty strings removed from the set input contains \"+\" --> output is set of strings split on \"+\" with leading and trailing whitespace stripped from each piece and empty strings removed from the set else, after stripping input of leading and trailing whitespace, input has an even length greater than two --> output is set of two-character pieces input is a non-empty string --> output is a set containing input as single value else output is an empty set. NOTE: the complexity of this algorithm is a consequence of there being several conventions in use for encoding a set of instruments into one of these columns; it has been proposed that L.L.W. documents standardize on the comma-delimited variant of the encodings recognized by this function, and for this reason the inverse function, ifos_from_instrument_set(), implements that encoding only. NOTE: to force a string containing an even number of characters to be interpreted as a single instrument name and not to be be split into two-character pieces, add a \",\" or \"+\" character to the end to force the comma- or plus-delimited decoding to be used. ifos_from_instrument_set() does this for you. Example: >>> print instrument_set_from_ifos(None) None >>> instrument_set_from_ifos(u\"\") set([]) >>> instrument_set_from_ifos(u\" , ,,\") set([]) >>> instrument_set_from_ifos(u\"H1\") set([u'H1']) >>> instrument_set_from_ifos(u\"SWIFT\") set([u'SWIFT']) >>> instrument_set_from_ifos(u\"H1L1\") set([u'H1', u'L1']) >>> instrument_set_from_ifos(u\"H1L1,\") set([u'H1L1']) >>> instrument_set_from_ifos(u\"H1,L1\") set([u'H1', u'L1']) >>> instrument_set_from_ifos(u\"H1+L1\") set([u'H1', u'L1'])", "label": 1, "domain": "code", "token_count": 471, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0005", "text": "Returns an implementation of {@link UserAgentStringParser} which checks at regular intervals for new versions of UAS data (also known as database). When newer data available, it automatically loads and updates it. Additionally the loaded data are stored in a cache file.

At initialization time the returned parser will be loaded with the UAS data of the cache file. If the cache file doesn't exist or is empty the data of this module will be loaded. The initialization is started only when this method is called the first time.

The update of the data store runs as background task. With this feature we try to reduce the initialization time of this UserAgentStringParser, because a network connection is involved and the remote system can be not available or slow.

The static class definition {@code CachingAndUpdatingParserHolder} within this factory class is not initialized until the JVM determines that {@code CachingAndUpdatingParserHolder} must be executed. The static class {@code CachingAndUpdatingParserHolder} is only executed when the static method {@code getOnlineUserAgentStringParser} is invoked on the class {@code UADetectorServiceFactory}, and the first time this happens the JVM will load and initialize the {@code CachingAndUpdatingParserHolder} class.

If during the operation the Internet connection gets lost, then this instance continues to work properly (and under correct log level settings you will get an corresponding log messages). @param dataUrl @param versionUrl @param fallbackDataURL @param fallbackVersionURL @return an user agent string parser with updating service", "label": 1, "domain": "code", "token_count": 346, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0006", "text": "Creates buffers for a truncated cone, which is like a cylinder except that it has different top and bottom radii. A truncated cone can also be used to create cylinders and regular cones. The truncated cone will be created centered about the origin, with the y axis as its vertical axis. @param {WebGLRenderingContext} gl The WebGLRenderingContext. @param {number} bottomRadius Bottom radius of truncated cone. @param {number} topRadius Top radius of truncated cone. @param {number} height Height of truncated cone. @param {number} radialSubdivisions The number of subdivisions around the truncated cone. @param {number} verticalSubdivisions The number of subdivisions down the truncated cone. @param {boolean} [opt_topCap] Create top cap. Default = true. @param {boolean} [opt_bottomCap] Create bottom cap. Default = true. @return {Object.} The created cone buffers. @memberOf module:twgl/primitives @function createTruncatedConeBuffers Creates vertices for a truncated cone, which is like a cylinder except that it has different top and bottom radii. A truncated cone can also be used to create cylinders and regular cones. The truncated cone will be created centered about the origin, with the y axis as its vertical axis. . @param {number} bottomRadius Bottom radius of truncated cone. @param {number} topRadius Top radius of truncated cone. @param {number} height Height of truncated cone. @param {number} radialSubdivisions The number of subdivisions around the truncated cone. @param {number} verticalSubdivisions The number of subdivisions down the truncated cone. @param {boolean} [opt_topCap] Create top cap. Default = true. @param {boolean} [opt_bottomCap] Create bottom cap. Default = true. @return {Object.} The created cone vertices. @memberOf module:twgl/primitives", "label": 1, "domain": "code", "token_count": 399, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0007", "text": "Creates a program from 2 script tags. NOTE: There are 4 signatures for this function twgl.createProgramFromScripts(gl, [vs, fs], opt_options); twgl.createProgramFromScripts(gl, [vs, fs], opt_errFunc); twgl.createProgramFromScripts(gl, [vs, fs], opt_attribs, opt_errFunc); twgl.createProgramFromScripts(gl, [vs, fs], opt_attribs, opt_locations, opt_errFunc); @param {WebGLRenderingContext} gl The WebGLRenderingContext to use. @param {string[]} shaderScriptIds Array of ids of the script tags for the shaders. The first is assumed to be the vertex shader, the second the fragment shader. @param {module:twgl.ProgramOptions|string[]|module:twgl.ErrorCallback} [opt_attribs] Options for the program or an array of attribs names or an error callback. Locations will be assigned by index if not passed in @param {number[]} [opt_locations|module:twgl.ErrorCallback] The locations for the. A parallel array to opt_attribs letting you assign locations or an error callback. @param {module:twgl.ErrorCallback} [opt_errorCallback] callback for errors. By default it just prints an error to the console on error. If you want something else pass an callback. It's passed an error message. @return {WebGLProgram?} the created program or null if error. @memberOf module:twgl/programs", "label": 1, "domain": "code", "token_count": 305, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0008", "text": "This method supports bulk insert of files performing other operations such as setting Block and Dataset parentages, setting mapping between OutputConfigModules and File(s) etc. :param qInserts: True means that inserts will be queued instead of done immediately. INSERT QUEUE Manager will perform the inserts, within few minutes. :type qInserts: bool :param logical_file_name (required) : string :param is_file_valid: (optional, default = 1): 1/0 :param block, required: /a/b/c#d :param dataset, required: /a/b/c :param file_type (optional, default = EDM): one of the predefined types, :param check_sum (optional): string :param event_count (optional, default = -1): int :param file_size (optional, default = -1.): float :param adler32 (optional): string :param md5 (optional): string :param auto_cross_section (optional, default = -1.): float :param file_lumi_list (optional, default = []): [{'run_num': 123, 'lumi_section_num': 12},{}....] :param file_parent_list(optional, default = []) :[{'file_parent_lfn': 'mylfn'},{}....] :param file_assoc_list(optional, default = []) :[{'file_parent_lfn': 'mylfn'},{}....] :param file_output_config_list(optional, default = []) : [{'app_name':..., 'release_version':..., 'pset_hash':...., output_module_label':...},{}.....]", "label": 1, "domain": "code", "token_count": 324, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0009", "text": "The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

CallBack Schemas

Review Completion CallBack Sample

{
\"ReviewId\": \"\",
\"ModifiedOn\": \"2016-10-11T22:36:32.9934851Z\",
\"ModifiedBy\": \"\",
\"CallBackType\": \"Review\",
\"ContentId\": \"\",
\"Metadata\": {
\"adultscore\": \"0.xxx\",
\"a\": \"False\",
\"racyscore\": \"0.xxx\",
\"r\": \"True\"
},
\"ReviewerResultTags\": {
\"a\": \"False\",
\"r\": \"True\"
}
}

. @param team_name [String] Your team name. @param review_id [String] Id of the review. @param start_seed [Integer] Time stamp of the frame from where you want to start fetching the frames. @param no_of_records [Integer] Number of frames to fetch. @param filter [String] Get frames filtered by tags. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Frames] operation results.", "label": 1, "domain": "code", "token_count": 341, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0010", "text": " Return a (signature, scheme) tuple, where the signature scheme is 'ed25519' and is always generated by PyNaCl (i.e., 'nacl'). The signature returned conforms to 'securesystemslib.formats.ED25519SIGNATURE_SCHEMA', and has the form: '\\xae\\xd7\\x9f\\xaf\\x95{bP\\x9e\\xa8YO Z\\x86\\x9d...' A signature is a 64-byte string. >>> public, private = generate_public_and_private() >>> data = b'The quick brown fox jumps over the lazy dog' >>> scheme = 'ed25519' >>> signature, scheme = \\ create_signature(public, private, data, scheme) >>> securesystemslib.formats.ED25519SIGNATURE_SCHEMA.matches(signature) True >>> scheme == 'ed25519' True >>> signature, scheme = \\ create_signature(public, private, data, scheme) >>> securesystemslib.formats.ED25519SIGNATURE_SCHEMA.matches(signature) True >>> scheme == 'ed25519' True public: The ed25519 public key, which is a 32-byte string. private: The ed25519 private key, which is a 32-byte string. data: Data object used by create_signature() to generate the signature. scheme: The signature scheme used to generate the signature. securesystemslib.exceptions.FormatError, if the arguments are improperly formatted. securesystemslib.exceptions.CryptoError, if a signature cannot be created. nacl.signing.SigningKey.sign() called to generate the actual signature. A signature dictionary conformat to 'securesystemslib.format.SIGNATURE_SCHEMA'. ed25519 signatures are 64 bytes, however, the hexlified signature is stored in the dictionary returned.", "label": 1, "domain": "code", "token_count": 377, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0011", "text": "Executes a custom SQL query against your database and returns all the results. The results will be returned as an array, with the requested columns encapsulated as attributes of the model you call this method from. For example, if you call Product.find_by_sql, then the results will be returned in a +Product+ object with the attributes you specified in the SQL query. If you call a complicated SQL query which spans multiple tables, the columns specified by the SELECT will be attributes of the model, whether or not they are columns of the corresponding table. The +sql+ parameter is a full SQL query as a string. It will be called as is; there will be no database agnostic conversions performed. This should be a last resort because using database-specific terms will lock you into using that particular database engine, or require you to change your call if you switch engines. # A simple SQL query spanning multiple tables Post.find_by_sql \"SELECT p.title, c.author FROM posts p, comments c WHERE p.id = c.post_id\" # => [#\"Ruby Meetup\", \"first_name\"=>\"Quentin\"}>, ...] You can use the same string replacement techniques as you can with ActiveRecord::QueryMethods#where: Post.find_by_sql [\"SELECT title FROM posts WHERE author = ? AND created > ?\", author_id, start_date] Post.find_by_sql [\"SELECT body FROM comments WHERE author = :user_id OR approved_by = :user_id\", { :user_id => user_id }]", "label": 1, "domain": "code", "token_count": 322, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0012", "text": "https://code.soundsoftware.ac.uk/projects/js-dsp-test/repository/entry/fft/nayuki-obj/fft.js /* Free Fft and convolution (JavaScript) Copyright (c) 2014 Project Nayuki http://www.nayuki.io/page/free-small-fft-in-multiple-languages (MIT License) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - The Software is provided \"as is\", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the Software or the use or other dealings in the Software. Slightly restructured by Chris Cannam, cannam@all-day-breakfast.com @private /* Construct an object for calculating the discrete Fourier transform (DFT) of size n, where n is a power of 2. @private", "label": 1, "domain": "code", "token_count": 312, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0013", "text": "Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

In the foregoing description, the notation sgn(expression) designates the mathematical signum function, which is defined to return one of -1, 0, or 1 according to whether the value of expression is negative, zero or positive.

The implementor must ensure that sgn(compare(x, y)) == -sgn(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that sgn(compare(x, z))==sgn(compare(y, z)) for all z.

It is generally the case, but not strictly required that (compare(x, y)==0) == (x.equals(y)). Generally speaking, any comparator that violates this condition should clearly indicate this fact. The recommended language is \"Note: this comparator imposes orderings that are inconsistent with equals.\" @param l1 the first object to be compared. @param l2 the second object to be compared. @return a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. @throws ClassCastException if the arguments' types prevent them from being compared by this comparator.", "label": 1, "domain": "code", "token_count": 464, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0014", "text": "Method to print tables in an xml file in other formats. Input is an xmldoc, output is a file object containing the tables. @xmldoc: document to convert @output: file object to write output to; if None, will write to stdout @output_format: format to convert to @tableList: only convert the listed tables. Default is to convert all the tables found in the xmldoc. Tables not converted will not be included in the returned file object. @columnList: only print the columns listed, in the order given. This applies to all tables (if a table doesn't have a listed column, it's just skipped). To specify a column in a specific table, use table_name:column_name. Default is to print all columns. @round_floats: If turned on, will smart_round floats to specifed number of places. @format_links: If turned on, will convert any html hyperlinks to specified output_format. @decimal_places: If round_floats turned on, will smart_round to this number of decimal places. @title: Add a title to this set of tables. @unique_rows: If two consecutive rows are exactly the same, will condense into one row. @print_table_names: If set to True, will print the name of each table in the caption section. @row_span_columns: For the columns listed, will concatenate consecutive cells with the same values into one cell that spans those rows. Default is to span no rows. @rspan_break_column: Columns listed will prevent all cells from rowspanning across two rows in which values in the columns are diffrent. Default is to have no break columns.", "label": 1, "domain": "code", "token_count": 341, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0015", "text": "Includes the script (via <script>-tag) into the head for the specified sUrl and optional sId. @param {string|object} vUrl the URL of the script to load or a configuration object @param {string} vUrl.url the URL of the script to load @param {string} [vUrl.id] id that should be used for the script tag @param {object} [vUrl.attributes] map of attributes that should be used for the script tag @param {string|object} [vId] id that should be used for the script tag or map of attributes @param {function} [fnLoadCallback] callback function to get notified once the script has been loaded @param {function} [fnErrorCallback] callback function to get notified once the script loading failed @return {void|Promise} When using the configuration object a Promise will be returned. The documentation for the fnLoadCallback applies to the resolve handler of the Promise and the one for the fnErrorCallback applies to the reject handler of the Promise. @function @public @since 1.58 @SecSink {0|PATH} Parameter is used for future HTTP requests @alias module:sap/ui/dom/includeScript", "label": 1, "domain": "code", "token_count": 300, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0016", "text": "Returns a hash code for the specified value using the options provided. This method is supported for the benefit of hash tables. The general contract of hashCode is:

  • Whenever it is invoked on the same value more than once during an execution of an application, the hashCode method must consistently return the same number, provided no information used to generate the hash code on the value is modified. This number need not remain consistent from one execution of an application to another execution of the same application.
  • If two values are equal, that calling the hashCode method on each of the two values must produce the same number result.
  • It is not required that if two values are unequal, that calling the hashCode method on each of the two values must produce distinct number results. However, the programmer should be aware that producing distinct number results for unequal values may improve the performance of hash tables.
If value is null, this method will always return zero. Otherwise, it will check whether value has a method named \"hashCode\" and, if so, return the result of calling that method. If no \"hashCode\" method exists on value or if the ignoreHashCode option is enabled, it will attempt to generate the hash code internally based on its type. Plain objects are hashed recursively for their properties and collections (e.g. arrays) are also hashed recursively for their elements. @param {*} value - the value whose hash code is to be returned (may be null) @param {Function} [value.hashCode] - the method used to produce the hash code for value, when present @param {Nevis~HashCodeOptions} [options] - the options to be used (may be null) @return {number} A hash code for value. @public", "label": 1, "domain": "code", "token_count": 450, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0017", "text": "Append the given subarray to the target array starting at the given index in the target array. The start of the subarray is inclusive, the end is exclusive. Answers a new target array if it needs to grow, otherwise answers the same target array.
For example:
  1.  target = { 'a', 'b', '0' } index = 2 array = { 'c', 'd' } start = 0 end = 1 => result = { 'a', 'b' , 'c' } 
  2.  target = { 'a', 'b' } index = 2 array = { 'c', 'd' } start = 0 end = 1 => result = { 'a', 'b' , 'c', '0', '0' , '0' } (new array) 
  3.  target = { 'a', 'b', 'c' } index = 1 array = { 'c', 'd', 'e', 'f' } start = 1 end = 4 => result = { 'a', 'd' , 'e', 'f', '0', '0', '0', '0' } (new array) 
@param target the given target @param index the given index @param array the given array @param start the given start index @param end the given end index @return the new array @throws NullPointerException if the target array is null", "label": 1, "domain": "code", "token_count": 339, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0018", "text": "Sends a health report on the Service Fabric partition. Reports health state of the specified Service Fabric partition. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Partition, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetPartitionHealth and check that the report appears in the HealthEvents section. @param partition_id The identity of the partition. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 452, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0019", "text": "Plot the allocations of live points as a function of logX for the input sets of nested sampling runs of the type used in the dynamic nested sampling paper (Higson et al. 2019). Plots also include analytically calculated distributions of relative posterior mass and relative posterior mass remaining. Parameters ---------- method_names: list of strs run_dict: dict of lists of nested sampling runs. Keys of run_dict must be method_names. logx_given_logl: function, optional For mapping points' logl values to logx values. If not specified the logx coordinates for each run are estimated using its numbers of live points. logl_given_logx: function, optional For calculating the relative posterior mass and posterior mass remaining at each logx coordinate. logx_min: float, optional Lower limit of logx axis. If not specified this is set to the lowest logx reached by any of the runs. ymax: bool, optional Maximum value for plot's nlive axis (yaxis). npoints: int, optional Number of points to have in the fgivenx plot grids. figsize: tuple, optional Size of figure in inches. post_mass_norm: str or None, optional Specify method_name for runs use form normalising the analytic posterior mass curve. If None, all runs are used. cum_post_mass_norm: str or None, optional Specify method_name for runs use form normalising the analytic cumulative posterior mass remaining curve. If None, all runs are used. Returns ------- fig: matplotlib figure", "label": 1, "domain": "code", "token_count": 305, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0020", "text": "Gets the health of a Service Fabric stateful service replica or stateless service instance. Gets the health of a Service Fabric replica. Use EventsHealthStateFilter to filter the collection of health events reported on the replica based on the health state. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. - Default - Default value. Matches any HealthState. The value is zero. - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. - Ok - Filter that matches input with HealthState value Ok. The value is 2. - Warning - Filter that matches input with HealthState value Warning. The value is 4. - Error - Filter that matches input with HealthState value Error. The value is 8. - All - Filter that matches input with any HealthState value. The value is 65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 411, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0021", "text": "calculates the next sunset and sunrise for a Maidenhead locator at a give date & time Args: locator1 (string): Maidenhead Locator, either 4 or 6 characters calc_date (datetime, optional): Starting datetime for the calculations (UTC) Returns: dict: Containing datetimes for morning_dawn, sunrise, evening_dawn, sunset Raises: ValueError: When called with wrong or invalid input arg AttributeError: When args are not a string Example: The following calculates the next sunrise & sunset for JN48QM on the 1./Jan/2014 >>> from pyhamtools.locator import calculate_sunrise_sunset >>> from datetime import datetime >>> import pytz >>> UTC = pytz.UTC >>> myDate = datetime(year=2014, month=1, day=1, tzinfo=UTC) >>> calculate_sunrise_sunset(\"JN48QM\", myDate) { 'morning_dawn': datetime.datetime(2014, 1, 1, 6, 36, 51, 710524, tzinfo=), 'sunset': datetime.datetime(2014, 1, 1, 16, 15, 23, 31016, tzinfo=), 'evening_dawn': datetime.datetime(2014, 1, 1, 15, 38, 8, 355315, tzinfo=), 'sunrise': datetime.datetime(2014, 1, 1, 7, 14, 6, 162063, tzinfo=) }", "label": 1, "domain": "code", "token_count": 326, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0022", "text": "Resolves the arguments and create a new instance of Attribute. It tries to find the Attribute type. It it is not possible, it assumes that it is an AssociationAttribute. @memberof module:back4app-entity/models/attributes.Attribute @name resolve @param {!Object} attribute This is the attribute to be resolved. It can be passed as an Object. @param {!string} attribute.name It is the name of the attribute. @param {!string} [attribute.type='Object'] It is the type of the attribute. It is optional and if not passed it will assume 'Object' as the default value. @param {!string} [attribute.multiplicity='1'] It is the multiplicity of the attribute. It is optional and if not passed it will assume '1' as the default value. @param {?(boolean|number|string|Object|function)} [attribute.default] It is the default expression of the attribute. @returns {module:back4app-entity/models/attributes.Attribute} The new Attribute instance. @throws {module:back4app-entity/models/errors.AttributeTypeNotFoundError} @example Attribute.resolve({ name: 'attribute', type: 'String', multiplicity: '0..1', default: null }); Resolves the arguments and create a new instance of Attribute. It tries to find the Attribute type. It it is not possible, it assumes that it is an AssociationAttribute. @memberof module:back4app-entity/models/attributes.Attribute @name resolve @param {!string} name It is the name of the attribute. @param {!string} [type='Object'] It is the type of the attribute. It is optional and if not passed it will assume 'Object' as the default value. @param {!string} [multiplicity='1'] It is the multiplicity of the attribute. It is optional and if not passed it will assume '1' as the default value. @param {?(boolean|number|string|Object|function)} [default] It is the default expression of the attribute. @returns {module:back4app-entity/models/attributes.Attribute} The new Attribute instance. @throws {module:back4app-entity/models/errors.AttributeTypeNotFoundError} @example Attribute.resolve( this, 'attribute', 'String', '0..1', null );", "label": 1, "domain": "code", "token_count": 468, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0023", "text": "Helper function for plotting uncertainties on posterior distributions using bootstrap resamples and the fgivenx module. Used by bs_param_dists and param_logx_diagram. Parameters ---------- run: dict Nested sampling run to plot. fthetas: list of functions Quantities to plot. Each must map a 2d theta array to 1d ftheta array - i.e. map every sample's theta vector (every row) to a scalar quantity. E.g. use lambda x: x[:, 0] to plot the first parameter. axes: list of matplotlib axis objects ftheta_lims: list, optional Plot limits for each ftheta. n_simulate: int, optional Number of bootstrap replications to use for the fgivenx distributions. colormap: matplotlib colormap Colors to plot fgivenx distribution. mean_color: matplotlib color as str Color to plot mean of each parameter. If None (default) means are not plotted. nx: int, optional Size of x-axis grid for fgivenx plots. ny: int, optional Size of y-axis grid for fgivenx plots. cache: str or None Root for fgivenx caching (no caching if None). parallel: bool, optional fgivenx parallel option. rasterize_contours: bool, optional fgivenx rasterize_contours option. smooth: bool, optional fgivenx smooth option. flip_axes: bool, optional Whether or not plot should be rotated 90 degrees anticlockwise onto its side. tqdm_kwargs: dict, optional Keyword arguments to pass to the tqdm progress bar when it is used in fgivenx while plotting contours. Returns ------- cbar: matplotlib colorbar For use in higher order functions.", "label": 1, "domain": "code", "token_count": 341, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0024", "text": "This makes a IndicatorItem element. This contains the actual threat intelligence in the IOC. :param condition: This is the condition of the item ('is', 'contains', 'matches', etc). The following contants in ioc_api may be used: ==================== ===================================================== Constant Meaning ==================== ===================================================== ioc_api.IS Exact String match. ioc_api.CONTAINS Substring match. ioc_api.MATCHES Regex match. ioc_api.STARTS_WITH String match at the beginning of a string. ioc_api.ENDS_WITH String match at the end of a string. ioc_api.GREATER_THAN Integer match indicating a greater than (>) operation. ioc_api.LESS_THAN Integer match indicator a less than (<) operation. ==================== ===================================================== :param document: Denotes the type of document to look for the encoded artifact in. :param search: Specifies what attribute of the document type the encoded value is. :param content_type: This is the display type of the item. This is normally derived from the iocterm for the search value. :param content: The threat intelligence that is being encoded. :param preserve_case: Specifiy that the content should be treated in a case sensitive manner. :param negate: Specifify that the condition is negated. An example of this is: @condition = 'is' & @negate = 'true' would be equal to the @condition = 'isnot' in OpenIOC 1.0. :param context_type: Gives context to the document/search information. :param nid: This is used to provide a GUID for the IndicatorItem. The ID should NOT be specified under normal circumstances. :return: an elementTree Element item", "label": 1, "domain": "code", "token_count": 348, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0025", "text": "Creates a new navigation item. The key is a symbol which uniquely defines your navigation item in the scope of the primary_navigation or the sub_navigation. The name will be displayed in the rendered navigation. This can also be a call to your I18n-framework. The url is the address that the generated item points to. You can also use url_helpers (named routes, restful routes helper, url_for, etc). url is optional - items without URLs should not be rendered as links. The options can be used to specify the following things: * any html_attributes - will be included in the rendered navigation item (e.g. id, class etc.) * :if - Specifies a proc to call to determine if the item should be rendered (e.g. if: Proc.new { current_user.admin? }). The proc should evaluate to a true or false value and is evaluated in the context of the view. * :unless - Specifies a proc to call to determine if the item should not be rendered (e.g. unless: Proc.new { current_user.admin? }). The proc should evaluate to a true or false value and is evaluated in the context of the view. * :method - Specifies the http-method for the generated link - default is :get. * :highlights_on - if autohighlighting is turned off and/or you want to explicitly specify when the item should be highlighted, you can set a regexp which is matched againstthe current URI. The block - if specified - will hold the item's sub_navigation.", "label": 1, "domain": "code", "token_count": 378, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0026", "text": "This is the base model used by every crux model definition to register themselves in the crux sql component @memberof crux.Database.Sql @class Model @param {String} name - the model definition's name @param {String} tableName - the model's table name @example // current model file: models/user.js module.exports = function(user, Seq, Db) { // At this point, the table name is \"user\" but we can change that user.tableName('users'); // The model's name is by default its file name. We can also change that user.name('Users'); user .field('id', Seq.PRIMARY) // primary int(11) auto_incremented .field('name', Seq.STRING) .field('age', Seq.INTEGER, { allowNull: true, defaultValue: null }); // We can also manually decare indexes. user.index('name'); // Having previously declared the model application, we can create a relationship to it user .hasMany('application', { as: 'application', foreignKey: 'application_id' }); // We can also attach a method to our model INSTANCES. user .method('hello', function() { console.log(\"Hello from %s\", this.get('id'); }) // We can also attach a method to the MODEL object (as a static function). // At this point, we need to use the Db (crux.Database.Sql) component to get the model name. .static('read', function ReadUser(id) { return crux.promise(function(resolve, reject) { Db.getModel('user').find(id).then(function(user) { if(!user) return reject(new Error('USER_NOT_FOUND')); // We can also attach custom data to the model instance user.data('someKey', 'someValue'); // And we can later on access it var a = user.data('someKey'); // => \"someValue\" resolve(user); }).error(reject); }); }); };", "label": 1, "domain": "code", "token_count": 392, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0027", "text": "Calculates unit vectors expressing the ion drift coordinate system organized by the geomagnetic field. Unit vectors are expressed in ECEF coordinates. Note ---- The zonal vector is calculated by field-line tracing from the input locations toward the footpoint locations at ref_height. The cross product of these two vectors is taken to define the plane of the magnetic field. This vector is not always orthogonal with the local field-aligned vector (IGRF), thus any component of the zonal vector with the field-aligned direction is removed (optional). The meridional unit vector is defined via the cross product of the zonal and field-aligned directions. Parameters ---------- latitude : array-like of floats (degrees) Latitude of location, degrees, WGS84 longitude : array-like of floats (degrees) Longitude of location, degrees, WGS84 altitude : array-like of floats (km) Altitude of location, height above surface, WGS84 datetimes : array-like of datetimes Time to calculate vectors max_steps : int Maximum number of steps allowed for field line tracing step_size : float Maximum step size (km) allowed when field line tracing ref_height : float Altitude used as cutoff for labeling a field line location a footpoint filter_zonal : bool If True, removes any field aligned component from the calculated zonal unit vector. Resulting coordinate system is not-orthogonal. Returns ------- zon_x, zon_y, zon_z, fa_x, fa_y, fa_z, mer_x, mer_y, mer_z", "label": 1, "domain": "code", "token_count": 303, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0028", "text": "Draw an image to the gl context @name drawImage @memberOf me.WebGLRenderer.prototype @function @param {Image} image An element to draw into the context. The specification permits any canvas image source (CanvasImageSource), specifically, a CSSImageValue, an HTMLImageElement, an SVGImageElement, an HTMLVideoElement, an HTMLCanvasElement, an ImageBitmap, or an OffscreenCanvas. @param {Number} sx The X coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. @param {Number} sy The Y coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. @param {Number} sw The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used. @param {Number} sh The height of the sub-rectangle of the source image to draw into the destination context. @param {Number} dx The X coordinate in the destination canvas at which to place the top-left corner of the source image. @param {Number} dy The Y coordinate in the destination canvas at which to place the top-left corner of the source image. @param {Number} dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn. @param {Number} dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn. @example // Position the image on the canvas: renderer.drawImage(image, dx, dy); // Position the image on the canvas, and specify width and height of the image: renderer.drawImage(image, dx, dy, dWidth, dHeight); // Clip the image and position the clipped part on the canvas: renderer.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight);", "label": 1, "domain": "code", "token_count": 435, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0029", "text": "Constructs a GeoJSON CRS object. Applications typically do not call this constructor. It is called by {@link GeoJSONGeometry}, {@link GeoJSONGeometryCollection}, {@link GeoJSONFeature} or {@link GeoJSONFeatureCollection}. @alias GeoJSONCRS @constructor @classdesc Contains the data associated with a GeoJSON Coordinate Reference System object. The coordinate reference system (CRS) of a GeoJSON object is determined by its \"crs\" member (referred to as the CRS object below). If an object has no crs member, then its parent or grandparent object's crs member may be acquired. If no crs member can be so acquired, the default CRS shall apply to the GeoJSON object. The default CRS is a geographic coordinate reference system, using the WGS84 datum, and with longitude and latitude units of decimal degrees.

There are two types of CRS objects:

  • Named CRS
  • Linked CRS
In this implementation we consider only named CRS. In this case, the value of its \"type\" member must be the string \"name\". The value of its \"properties\" member must be an object containing a \"name\" member. The value of that \"name\" member must be a string identifying a coordinate reference system. OGC CRS URNs such as \"urn:ogc:def:crs:OGC:1.3:CRS84\" shall be preferred over legacy identifiers such as \"EPSG:4326\".

For reprojecton is used Proj4js JavaScript library. @param {String} type A string, indicating the type of CRS object. @param {Object} properties An object containing the properties of CRS object. @throws {ArgumentError} If the specified type or properties are null or undefined.", "label": 1, "domain": "code", "token_count": 379, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0030", "text": "Create an array with all possible model parameter combinations Parameters ---------- tplPngSize : tuple, 2 Pixel dimensions of the visual space (width, height). varNum1 : int, positive Number of x-positions to model varExtXmin : float Extent of visual space from centre in negative x-direction (width) varExtXmax : float Extent of visual space from centre in positive x-direction (width) varNum2 : float, positive Number of y-positions to model. varExtYmin : int Extent of visual space from centre in negative y-direction (height) varExtYmax : float Extent of visual space from centre in positive y-direction (height) varNumPrfSizes : int, positive Number of pRF sizes to model. varPrfStdMin : float, positive Minimum pRF model size (standard deviation of 2D Gaussian) varPrfStdMax : float, positive Maximum pRF model size (standard deviation of 2D Gaussian) kwUnt: str Keyword to set the unit for model parameter combinations; model parameters can be in pixels [\"pix\"] or degrees of visual angles [\"deg\"] kwCrd: str Keyword to set the coordinate system for model parameter combinations; parameters can be in cartesian [\"crt\"] or polar [\"pol\"] coordinates Returns ------- aryMdlParams : 2d numpy array, shape [n_x_pos*n_y_pos*n_sd, 3] Model parameters (x, y, sigma) for all models.", "label": 1, "domain": "code", "token_count": 305, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0031", "text": "Returns a Collection of Certificates that match the specified selector. If no Certificates match the selector, an empty Collection will be returned.

For some CertStore types, the resulting Collection may not contain all of the Certificates that match the selector. For instance, an LDAP CertStore may not search all entries in the directory. Instead, it may just search entries that are likely to contain the Certificates it is looking for.

Some CertStore implementations (especially LDAP CertStores) may throw a CertStoreException unless a non-null CertSelector is provided that includes specific criteria that can be used to find the certificates. Issuer and/or subject names are especially useful criteria. @param selector A CertSelector used to select which Certificates should be returned. Specify null to return all Certificates (if supported). @return A Collection of Certificates that match the specified selector (never null) @throws java.security.cert.CertStoreException if an exception occurs", "label": 1, "domain": "code", "token_count": 311, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0032", "text": "This operation extracts a rich set of visual features based on the image content. Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong. @param url [String] Publicly reachable URL of an image. @param visual_features [Array] A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include: Categories - categorizes image content according to a taxonomy defined in documentation. Tags - tags the image with a detailed list of words related to the image content. Description - describes the image content with a complete English sentence. Faces - detects if faces are present. If present, generate coordinates, gender and age. ImageType - detects if image is clipart or a line drawing. Color - determines the accent color, dominant color, and whether an image is black&white. Adult - detects if the image is pornographic in nature (depicts nudity or a sex act). Sexually suggestive content is also detected. Objects - detects various objects within an image, including the approximate location. The Objects argument is only available in English. Brands - detects various brands within an image, including the approximate location. The Brands argument is only available in English. @param details [Array

] A string indicating which domain-specific details to return. Multiple values should be comma-separated. Valid visual feature types include: Celebrities - identifies celebrities if detected in the image, Landmarks - identifies notable landmarks in the image. @param language [Enum] The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh' @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 482, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0033", "text": "Concatenate data with ticker as sub column index Args: data_kw: key = ticker, value = pd.DataFrame Returns: pd.DataFrame Examples: >>> start = '2018-09-10T10:10:00' >>> tz = 'Australia/Sydney' >>> idx = pd.date_range(start=start, periods=6, freq='min').tz_localize(tz) >>> close_1 = [31.08, 31.10, 31.11, 31.07, 31.04, 31.04] >>> vol_1 = [10166, 69981, 14343, 10096, 11506, 9718] >>> d1 = pd.DataFrame(dict(price=close_1, volume=vol_1), index=idx) >>> close_2 = [70.81, 70.78, 70.85, 70.79, 70.79, 70.79] >>> vol_2 = [4749, 6762, 4908, 2002, 9170, 9791] >>> d2 = pd.DataFrame(dict(price=close_2, volume=vol_2), index=idx) >>> sample = cat_data({'BHP AU': d1, 'RIO AU': d2}) >>> sample.columns MultiIndex(levels=[['BHP AU', 'RIO AU'], ['price', 'volume']], codes=[[0, 0, 1, 1], [0, 1, 0, 1]], names=['ticker', None]) >>> r = sample.transpose().iloc[:, :2] >>> r.index.names = (None, None) >>> r 2018-09-10 10:10:00+10:00 2018-09-10 10:11:00+10:00 BHP AU price 31.08 31.10 volume 10,166.00 69,981.00 RIO AU price 70.81 70.78 volume 4,749.00 6,762.00", "label": 1, "domain": "code", "token_count": 433, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0034", "text": "Start a L-BFGS optimization. @param n The number of variables. @param x The array of variables. A client program can set default values for the optimization and receive the optimization result through this array. This array must be allocated by ::lbfgs_malloc function for libLBFGS built with SSE/SSE2 optimization routine enabled. The library built without SSE/SSE2 optimization does not have such a requirement. @param ptr_fx The pointer to the variable that receives the final value of the objective function for the variables. This argument can be set to \\c null if the final value of the objective function is unnecessary. @param proc_evaluate The callback function to provide function and gradient evaluations given a current values of variables. A client program must implement a callback function compatible with \\ref lbfgs_evaluate_t and pass the pointer to the callback function. @param proc_progress The callback function to receive the progress (the number of iterations, the current value of the objective function) of the minimization process. This argument can be set to \\c null if a progress report is unnecessary. @param instance A user data for the client program. The callback functions will receive the value of this argument. @param param The pointer to a structure representing parameters for L-BFGS optimization. A client program can set this parameter to \\c null to use the default parameters. Call lbfgs_parameter_init() function to fill a structure with the default values. @retval int The status code. This function returns zero if the minimization process terminates without an error. A non-zero value indicates an error.", "label": 1, "domain": "code", "token_count": 325, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0035", "text": "Return a prefixed, wrapped and properly aligned string representation of the given values using function |repr|. >>> from hydpy.core.objecttools import assignrepr_values >>> print(assignrepr_values(range(1, 13), 'test(', 20) + ')') test(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) If no width is given, no wrapping is performed: >>> print(assignrepr_values(range(1, 13), 'test(') + ')') test(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) To circumvent defining too long string representations, make use of the ellipsis option: >>> from hydpy import pub >>> with pub.options.ellipsis(1): ... print(assignrepr_values(range(1, 13), 'test(', 20) + ')') test(1, ...,12) >>> with pub.options.ellipsis(5): ... print(assignrepr_values(range(1, 13), 'test(', 20) + ')') test(1, 2, 3, 4, 5, ...,8, 9, 10, 11, 12) >>> with pub.options.ellipsis(6): ... print(assignrepr_values(range(1, 13), 'test(', 20) + ')') test(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)", "label": 1, "domain": "code", "token_count": 345, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0036", "text": "

Perform a CSS String level 1 (only basic set) escape operation on a Reader input, writing results to a Writer.

Level 1 means this method will only escape the CSS String basic escape set:

  • The Backslash Escapes: \" (U+0022) and \' (U+0027).
  • Two ranges of non-displayable, control characters: U+0000 to U+001F and U+007F to U+009F.

This escape will be performed by using Backslash escapes whenever possible. For escaped characters that do not have an associated Backslash, default to \FF Hexadecimal Escapes.

This method calls {@link #escapeCssString(Reader, Writer, CssStringEscapeType, CssStringEscapeLevel)} with the following preconfigured values:

  • type: {@link CssStringEscapeType#BACKSLASH_ESCAPES_DEFAULT_TO_COMPACT_HEXA}
  • level: {@link CssStringEscapeLevel#LEVEL_1_BASIC_ESCAPE_SET}

This method is thread-safe.

@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 436, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0037", "text": "Returns a callback interface instance for the given map of variables which override currently known variables of the same name in this parent interface or replace them altogether. Each variable name becomes a named model with a corresponding object binding and can be used inside the XML template in the usual way, that is, with a binding expression like \"{var>some/relative/path}\" (see example). Example: Suppose the XML pre-processor knows a variable named \"old\" and a visitor defines a new variable relative to it as follows. Then {@link sap.ui.core.util.XMLPreprocessor.ICallback.getResult getResult} for a binding which refers to the new variable using a relative path (\"{new>relative}\") has the same result as for a binding to the old variable with a compound path (\"{old>prefix/relative}\").
 oInterface.with({\"new\" : oInterface.getContext(\"old>prefix\")}) .getResult(\"{new>relative}\") === oInterface.getResult(\"{old>prefix/relative}\"); // true 
BEWARE: Previous callback interface instances derived from the same parent (this) become invalid (that is, they forget about inherited variables) once a new instance is derived. @param {object} [mVariables={}] Map from variable name (string) to value ({@link sap.ui.model.Context}) @param {boolean} [bReplace=false] Whether only the given variables are known in the new callback interface instance, no inherited ones @returns {sap.ui.core.util.XMLPreprocessor.ICallback} A callback interface instance @function @public @see sap.ui.core.util.XMLPreprocessor.ICallback.getResult @since 1.39.0", "label": 1, "domain": "code", "token_count": 352, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0038", "text": "

Perform am URI fragment identifier escape operation on a Reader input using UTF-8 as encoding, writing results to a Writer.

The following are the only allowed chars in an URI fragment identifier (will not be escaped):

  • A-Z a-z 0-9
  • - . _ ~
  • ! $ & ' ( ) * + , ; =
  • : @
  • / ?

All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.

This method is thread-safe.

@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 313, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0039", "text": "**Lists the metric values for a resource**. @param resource_uri [String] The identifier of the resource. @param timespan [String] The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. @param interval [Duration] The interval (i.e. timegrain) of the query. @param metricnames [String] The names of the metrics (comma separated) to retrieve. @param aggregation [String] The list of aggregation types (comma separated) to retrieve. @param top [Integer] The maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10. @param orderby [String] The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc. @param filter [String] The **$filter** is used to reduce the set of metric data returned.
Example:
Metric contains metadata A, B and C.
- Return all time series of C where A = a1 and B = b1 or b2
**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**
- Invalid variant:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**
This is invalid because the logical or operator cannot separate two different metadata names.
- Return all time series where A = a1, B = b1 and C = c1:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**
- Return all time series where A = a1
**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**. @param result_type [ResultType] Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Possible values include: 'Data', 'Metadata' @param metricnamespace [String] Metric namespace to query metric definitions for. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 496, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0040", "text": "Execute a git command, bypassing any library implementation. cmd - The name of the git command as a Symbol. Underscores are converted to dashes as in :rev_parse => 'rev-parse'. options - Command line option arguments passed to the git command. Single char keys are converted to short options (:a => -a). Multi-char keys are converted to long options (:arg => '--arg'). Underscores in keys are converted to dashes. These special options are used to control command execution and are not passed in command invocation: :timeout - Maximum amount of time the command can run for before being aborted. When true, use Grit::Git.git_timeout; when numeric, use that number of seconds; when false or 0, disable timeout. :base - Set false to avoid passing the --git-dir argument when invoking the git command. :env - Hash of environment variable key/values that are set on the child process. :raise - When set true, commands that exit with a non-zero status raise a CommandFailed exception. This option is available only on platforms that support fork(2). :process_info - By default, a single string with output written to the process's stdout is returned. Setting this option to true results in a [exitstatus, out, err] tuple being returned instead. args - Non-option arguments passed on the command line. Optionally yields to the block an IO object attached to the child process's STDIN. Examples git.native(:rev_list, {:max_count => 10, :header => true}, \"master\") Returns a String with all output written to the child process's stdout when the :process_info option is not set. Returns a [exitstatus, out, err] tuple when the :process_info option is set. The exitstatus is an small integer that was the process's exit status. The out and err elements are the data written to stdout and stderr as Strings. Raises Grit::Git::GitTimeout when the timeout is exceeded or when more than Grit::Git.git_max_size bytes are output. Raises Grit::Git::CommandFailed when the :raise option is set true and the git command exits with a non-zero exit status. The CommandFailed's #command, #exitstatus, and #err attributes can be used to retrieve additional detail about the error.", "label": 1, "domain": "code", "token_count": 470, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0041", "text": "constructor: The BitmapCache is an internal representation of all the cache properties and logic required in order to \"cache\" an object. This information and functionality used to be located on a {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}} method in {{#crossLink \"DisplayObject\"}}{{/crossLink}}, but was moved to its own class. Caching in this context is purely visual, and will render the DisplayObject out into an image to be used instead of the object. The actual cache itself is still stored on the target with the {{#crossLink \"DisplayObject/cacheCanvas:property\"}}{{/crossLink}}. Working with a singular image like a {{#crossLink \"Bitmap\"}}{{/crossLink}} there is little benefit to performing a cache as it is already a single image. Caching is best done on containers containing multiple complex parts that do not move often, so that rendering the image instead will improve overall rendering speed. A cached object will not visually update until explicitly told to do so with a call to update, much like a Stage. If a cache is being updated every frame it is likely not improving rendering performance. Cache are best used when updates will be sparse. Caching is also a co-requisite for applying filters to prevent expensive filters running constantly without need, and to physically enable some effects. The BitmapCache is also responsible for applying filters to objects and reads each {{#crossLink \"Filter\"}}{{/crossLink}} due to this relationship. Real-time Filters are not recommended performance wise when dealing with a Context2D canvas. For best performance and to still allow for some visual effects use a compositeOperation when possible. @class BitmapCache @constructor", "label": 1, "domain": "code", "token_count": 343, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0042", "text": "Gets the list of nodes in the Service Fabric cluster. Gets the list of nodes in the Service Fabric cluster. The response includes the name, status, id, health, uptime, and other details about the node. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param node_status_filter [NodeStatusFilter] Allows filtering the nodes based on the NodeStatus. Only the nodes that are matching the specified filter value will be returned. The filter value can be one of the following. Possible values include: 'default', 'all', 'up', 'down', 'enabling', 'disabling', 'disabled', 'unknown', 'removed' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 303, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0043", "text": "Parse the given inputs to in-memory maps to allow for summarisation. @param input The {@link Reader} containing the inputs to be summarised. @param inputMapper The CsvMapper to use to parse the file into memory @param inputSchema The CsvSchema to use to help the mapper parse the file into memory @param emptyCounts A {@link JDefaultDict} to be populated with empty counts for each field @param nonEmptyCounts A {@link JDefaultDict} to be populated with non-empty counts for each field @param possibleIntegerFields A {@link JDefaultDict} to be populated with false if a non-integer value is detected in a field @param possibleDoubleFields A {@link JDefaultDict} to be populated with false if a non-double value is detected in a field @param valueCounts A {@link JDefaultDict} to be populated with false if a non-integer value is detected in a field @param rowCount An {@link AtomicInteger} used to track the total number of rows processed. @param overrideHeaders Headers to use to override those in the file, or null to rely on the headers from the file @param headerLineCount The number of lines in the file that must be skipped, or 0 to not skip any headers and instead use overrideHeaders @param defaultValues A list that is either empty, signifying there are no default values known, or exactly the same length as each row in the CSV file being parsed. If the values for a field are empty/missing, and a non-null, non-empty value appears in this list, it will be substituted in when calculating the statistics. @return The list of headers that were either overridden or found in the file @throws IOException If there is an error reading from the file @throws CSVStreamException If there is a problem processing the CSV content", "label": 1, "domain": "code", "token_count": 369, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0044", "text": "The SQL adapter component wraps itself over Sequelize to offer standardized model-definition as well as module auto-loading and automatic relationship building.
For now, this component is optimized only for MySQL but in the future it will support all of Sequelize's engines
Note: the SQL scripts path may contain $environment in its path. Should this happen, the component will dynamically parse the path at runtime, replacing $environment with the current environment value.
As an example, if environment=dev and path.sql=app/models/sql/$environment, when in setup mode, it wiill read all .sql files from app/models/sql/dev and execute their statements.
Note: the SQL script content must contain one SQL statement per line @class crux.Database.Sql @extends crux.Component @param {Object} options - default configuration for the Sql component @param {Boolean} [options.debug=true] - should this component start in debug mode. Doing so, it will log every SQL command @param {Boolean} [options.sync=false] - tries and synchronises the newly-added models with create if not exists statements. Should be turned off in production @param {Boolean} [options.setup=false] - WARNING setting this to true will drop all tables in the database and re-create them. This is useful when refactoring model definitions @param {String} [options.host=localhost] - MySQL hostname to connect to @param {String} [options.user=root] - MySQL user to connect to @param {String} [options.password] - MySQL password to connect to @param {String} [options.database=crux] - MySQL database to use @param {Object} [options.path] @param {String} [options.path.models=app/models] - default path to use for model definition placing @param {String} [options.path.sql=app/models/sql] - default path to custom SQL scripts that can be run on database setup. @property {Sequelize} Seq - A reference to the sequelize module @property {Boolean} __configuration=true - By defaullt, this component requires configuration", "label": 1, "domain": "code", "token_count": 458, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0045", "text": " Create public and private ECDSA keys from a private 'pem'. The public and private keys are strings in PEM format: public: '-----BEGIN PUBLIC KEY----- ... -----END PUBLIC KEY-----', private: '-----BEGIN EC PRIVATE KEY----- ... -----END EC PRIVATE KEY-----'}} >>> junk, private = generate_public_and_private() >>> public, private = create_ecdsa_public_and_private_from_pem(private) >>> securesystemslib.formats.PEMECDSA_SCHEMA.matches(public) True >>> securesystemslib.formats.PEMECDSA_SCHEMA.matches(private) True >>> passphrase = 'secret' >>> encrypted_pem = create_ecdsa_encrypted_pem(private, passphrase) >>> public, private = create_ecdsa_public_and_private_from_pem(encrypted_pem, passphrase) >>> securesystemslib.formats.PEMECDSA_SCHEMA.matches(public) True >>> securesystemslib.formats.PEMECDSA_SCHEMA.matches(private) True pem: A string in PEM format. The private key is extracted and returned in an ecdsakey object. password: (optional) The password, or passphrase, to decrypt the private part of the ECDSA key if it is encrypted. 'password' is not used directly as the encryption key, a stronger encryption key is derived from it. securesystemslib.exceptions.FormatError, if the arguments are improperly formatted. securesystemslib.exceptions.UnsupportedAlgorithmError, if the ECDSA key pair could not be extracted, possibly due to an unsupported algorithm. None. A dictionary containing the ECDSA keys and other identifying information. Conforms to 'securesystemslib.formats.ECDSAKEY_SCHEMA'.", "label": 1, "domain": "code", "token_count": 349, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0046", "text": "Adds a new tag to be parsed. You can use this to add custom tags. {@link coddoc} will not do anything with the new tag by default, however you can add functionality to handle the new tag in the template. @example //if a tag is contains a '|' character then each variation will resolve the the same parser function. coddoc.addTagHandler(\"void|VOID|Void\", function(comment, symbol, context){ //do something with the tag or add properties to the symbol. symbol.isVoid = true; symbol.tags.push({tag : \"void\", props : {}}); }); //in the template you can add functionality to handle the new tag. For example: //in the html symbol.tmpl you could add a new label to the name header

{{name}} {{#if isStatic}} Static {{/if}} {{#if isFunction}} Function {{/if}} {{#if isPrivate}} Private {{else}} {{#if isProtected}} Protected {{else}} Public {{/if}} {{/if}} {{#if isVoid}} Void {{/if}}

@memberOf coddoc @param {String} tag the tag to parse, if a tag is contains a '|' character then the string will be split and each variation will resolve to the same parse function. If the tag already exists then the old implementation will be replaced by the new one. @param {Function} parse a parser function to invoke when a tag that matches the name is encountered.", "label": 1, "domain": "code", "token_count": 373, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0047", "text": "@example Request syntax with placeholder values virtualmfadevice = iam.create_virtual_mfa_device({ path: \"pathType\", virtual_mfa_device_name: \"virtualMFADeviceName\", # required }) @param [Hash] options ({}) @option options [String] :path The path for the virtual MFA device. For more information about paths, see [IAM Identifiers][1] in the *IAM User Guide*. This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its [regex pattern][2]) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\\\\u0021) through the DEL character (\\\\u007F), including most punctuation characters, digits, and upper and lowercased letters. [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html [2]: http://wikipedia.org/wiki/regex @option options [required, String] :virtual_mfa_device_name The name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. This parameter allows (through its [regex pattern][1]) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: \\_+=,.@- [1]: http://wikipedia.org/wiki/regex @return [VirtualMfaDevice]", "label": 1, "domain": "code", "token_count": 312, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0048", "text": "Deletes an existing Service Fabric service. Deletes an existing Service Fabric service. A service must be created before it can be deleted. By default, Service Fabric will try to close service replicas in a graceful manner and then delete the service. However, if the service is having issues closing the replica gracefully, the delete operation may take a long time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully delete the service. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the service name is \"fabric:/myapp/app1/svc1\", the service identity would be \"myapp~app1~svc1\" in 6.0+ and \"myapp/app1/svc1\" in previous versions. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 333, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0049", "text": "

Perform am URI path segment escape operation on a String input.

The following are the only allowed chars in an URI path segment (will not be escaped):

  • A-Z a-z 0-9
  • - . _ ~
  • ! $ & ' ( ) * + , ; =
  • : @

All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.

This method is thread-safe.

@param text the String to be escaped. @param encoding the encoding to be used for escaping. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null.", "label": 1, "domain": "code", "token_count": 305, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0050", "text": "LoggerManager objects are EventEmitters that emit two events: \"message\" and \"end\" \"message\" events have a single object as their data. That object has the following properties: source -- the ID of the plugin (or \"core\") from which the log event originated. level -- an integer corresponding to the log level constants defined on this module, time -- a Date object representing the time of the log event, callLocation -- an object containing \"long\" and \"short\" properties that contains long and short string representations of the location in the source where the log event was generated message -- the actual log message, possibly containing formatting caracters (e.g. \"%d\") for a string formatting function to use (he Logger itself doesn't do any string formatting). args -- an array of optional args, possibly used by a string format function \"end\" events do not have any data. An \"end\" event will be emitted at most once, in response to a call to Logger.prototype.end. No \"message\" events will be emitted after an \"end\" event. Log level can be set by assigning an int (corresponding to the log level constants defined in this module) to the property \"level\". Log entries are initiated through Logger objects, which can be created by calling the \"createLogger\" method on a LoggerManager object. Then, users can call the Logger.prototype.error/warn/info/debug/warning/log functions, which are variadic. The first argument is the log message, and any additional arguments are passed along in the \"args\" array.", "label": 1, "domain": "code", "token_count": 317, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0051", "text": "@class Contains locale-specific texts. If you need a locale-specific text within your application, you can use the resource bundle to load the locale-specific file from the server and access the texts of it. Use {@link module:sap/base/i18n/ResourceBundle.create} to create an instance of sap/base/i18n/ResourceBundle (.properties without any locale information, e.g. \"mybundle.properties\"), and optionally a locale. The locale is defined as a string of the language and an optional country code separated by underscore (e.g. \"en_GB\" or \"fr\"). If no locale is passed, the default locale is \"en\" if the SAPUI5 framework is not available. Otherwise the default locale is taken from the SAPUI5 configuration. With the getText() method of the resource bundle, a locale-specific string value for a given key will be returned. With the given locale, the resource bundle requests the locale-specific properties file (e.g. \"mybundle_fr_FR.properties\"). If no file is found for the requested locale or if the file does not contain a text for the given key, a sequence of fall back locales is tried one by one. First, if the locale contains a region information (fr_FR), then the locale without the region is tried (fr). If that also can't be found or doesn't contain the requested text, the English file is used (en - assuming that most development projects contain at least English texts). If that also fails, the file without locale (base URL of the bundle) is tried. If none of the requested files can be found or none of them contains a text for the given key, then the key itself is returned as text. Exception: Fallback for \"zh_HK\" is \"zh_TW\" before zh. @since 1.58 @alias module:sap/base/i18n/ResourceBundle @public @hideconstructor", "label": 1, "domain": "code", "token_count": 384, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0052", "text": "Lists a collection of apis associated with tags. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param filter [String] | Field | Supported operators | Supported functions | |-------------|------------------------|---------------------------------------------| | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | isCurrent | eq | substringof, contains, startswith, endswith | @param top [Integer] Number of records to return. @param skip [Integer] Number of records to skip. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 324, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0053", "text": "Check that the value is a list of values. You can optionally specify the minimum and maximum number of members. It does no check on list members. >>> vtor = Validator() >>> vtor.check('list', ()) [] >>> vtor.check('list', []) [] >>> vtor.check('list', (1, 2)) [1, 2] >>> vtor.check('list', [1, 2]) [1, 2] >>> vtor.check('list(3)', (1, 2)) # doctest: +SKIP Traceback (most recent call last): VdtValueTooShortError: the value \"(1, 2)\" is too short. >>> vtor.check('list(max=5)', (1, 2, 3, 4, 5, 6)) # doctest: +SKIP Traceback (most recent call last): VdtValueTooLongError: the value \"(1, 2, 3, 4, 5, 6)\" is too long. >>> vtor.check('list(min=3, max=5)', (1, 2, 3, 4)) # doctest: +SKIP [1, 2, 3, 4] >>> vtor.check('list', 0) # doctest: +SKIP Traceback (most recent call last): VdtTypeError: the value \"0\" is of the wrong type. >>> vtor.check('list', '12') # doctest: +SKIP Traceback (most recent call last): VdtTypeError: the value \"12\" is of the wrong type.", "label": 1, "domain": "code", "token_count": 335, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0054", "text": "A container to pass data to a d3 chart: a single series of data points. For documentation on the custom tag, see lib/Models/registerCustomComponentTypes.js. @param {Object[]} [points] The array of points. Each point should have the format {x: X, y: Y}. Defaults to []. @param {Object} [parameters] Further parameters. @param {String} [parameters.id] Unique id for this set of points. @param {String} [parameters.categoryName] Name of the category for this set of points., eg. the source catalog item. @param {String} [parameters.name] Name for this set of points. @param {String} [parameters.units] Units of this set of points. @param {String} [parameters.color] CSS color code for this set of points. @param {Number} [parameters.yAxisMin] Minimum value for y axis to display, overriding minimum value in data. @param {Number} [parameters.yAxisMax] Maximum value for y axis to display, overriding maximum value in data. @param {String} [parameters.type] Chart type. If you want these points to be rendered with a certain way. Leave empty for auto detection. @param {Function} [parameters.onClick] Click handler (called with (x, y) in data units) if some special behaviour is required on clicking. @param {Boolean} [parameters.showAll] Request that the chart be scaled so that this series can be shown entirely.", "label": 1, "domain": "code", "token_count": 312, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0055", "text": "Returns an implementation of {@link UserAgentStringParser} which checks at regular intervals for new versions of UAS data (also known as database). When newer data available, it automatically loads and updates it.

At initialization time the returned parser will be loaded with the UAS data of this module (the shipped one within the uadetector-resources JAR) and tries to update it. The initialization is started only when this method is called the first time.

The update of the data store runs as background task. With this feature we try to reduce the initialization time of this UserAgentStringParser, because a network connection is involved and the remote system can be not available or slow.

The static class definition {@code OnlineUpdatingParserHolder} within this factory class is not initialized until the JVM determines that {@code OnlineUpdatingParserHolder} must be executed. The static class {@code OnlineUpdatingParserHolder} is only executed when the static method {@code getOnlineUserAgentStringParser} is invoked on the class {@code UADetectorServiceFactory}, and the first time this happens the JVM will load and initialize the {@code OnlineUpdatingParserHolder} class.

If during the operation the Internet connection gets lost, then this instance continues to work properly (and under correct log level settings you will get an corresponding log messages). @param dataUrl @param versionUrl @param fallbackDataUrl @param fallbackVersionUrl @return an user agent string parser with updating service", "label": 1, "domain": "code", "token_count": 333, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0056", "text": "constructor A loader for JSONP files, which are JSON-formatted text files, wrapped in a callback. To load regular JSON without a callback use the {{#crossLink \"JSONLoader\"}}{{/crossLink}} instead. To load JSON-formatted manifests, use {{#crossLink \"ManifestLoader\"}}{{/crossLink}}, and to load EaselJS SpriteSheets, use {{#crossLink \"SpriteSheetLoader\"}}{{/crossLink}}. JSONP is a format that provides a solution for loading JSON files cross-domain without requiring CORS. JSONP files are loaded as JavaScript, and the \"callback\" is executed once they are loaded. The callback in the JSONP must match the callback passed to the loadItem.

Example JSONP

callbackName({ \"name\": \"value\", \"num\": 3, \"obj\": { \"bool\":true } });

Example

var loadItem = {id:\"json\", type:\"jsonp\", src:\"http://server.com/text.json\", callback:\"callbackName\"} var queue = new createjs.LoadQueue(); queue.on(\"complete\", handleComplete); queue.loadItem(loadItem); function handleComplete(event) } var json = queue.getResult(\"json\"); console.log(json.obj.bool); // true } Note that JSONP files loaded concurrently require a unique callback. To ensure JSONP files are loaded in order, either use the {{#crossLink \"LoadQueue/setMaxConnections\"}}{{/crossLink}} method (set to 1), or set {{#crossLink \"LoadItem/maintainOrder:property\"}}{{/crossLink}} on items with the same callback. @class JSONPLoader @param {LoadItem|Object} loadItem @extends AbstractLoader @constructor", "label": 1, "domain": "code", "token_count": 374, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0057", "text": "General plot function that groups data by subject/list number and performs analysis. Parameters ---------- results : quail.FriedEgg Object containing results subjgroup : list of strings or ints String/int variables indicating how to group over subjects. Must be the length of the number of subjects subjname : string Name of the subject grouping variable listgroup : list of strings or ints String/int variables indicating how to group over list. Must be the length of the number of lists listname : string Name of the list grouping variable subjconds : list List of subject hues (str) to plot listconds : list List of list hues (str) to plot plot_type : string Specifies the type of plot. If list (default), the list groupings (listgroup) will determine the plot grouping. If subject, the subject groupings (subjgroup) will determine the plot grouping. If split (currenty just works for accuracy plots), both listgroup and subjgroup will determine the plot groupings plot_style : string Specifies the style of the plot. This currently works only for accuracy and fingerprint plots. The plot style can be bar (default for accruacy plot), violin (default for fingerprint plots) or swarm. title : string The title of the plot legend : bool If true (default), a legend is plotted. ylim : list of numbers A ymin/max can be specified by a list of the form [ymin, ymax] xlim : list of numbers A xmin/max can be specified by a list of the form [xmin, xmax] save_path : str Path to save out figure. Include the file extension, e.g. save_path='figure.pdf' show : bool If False, do not show figure, but still return ax handle (default True). ax : Matplotlib.Axes object or None A plot object to draw to. If None, a new one is created and returned. Returns ---------- ax : matplotlib.Axes.Axis An axis handle for the figure", "label": 1, "domain": "code", "token_count": 391, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0058", "text": "A |tuple| containing the (sub)device names. Property |NetCDFVariableFlat.subdevicenames| clarifies which row of |NetCDFVariableAgg.array| contains which time series. For 0-dimensional series like |lland_inputs.Nied|, the plain device names are returned >>> from hydpy.core.examples import prepare_io_example_1 >>> nodes, elements = prepare_io_example_1() >>> from hydpy.core.netcdftools import NetCDFVariableFlat >>> ncvar = NetCDFVariableFlat('input_nied', isolate=False, timeaxis=1) >>> for element in elements: ... nied1 = element.model.sequences.inputs.nied ... ncvar.log(nied1, nied1.series) >>> ncvar.subdevicenames ('element1', 'element2', 'element3') For higher dimensional sequences like |lland_fluxes.NKor|, an additional suffix defines the index of the respective subdevice. For example contains the third row of |NetCDFVariableAgg.array| the time series of the first hydrological response unit of the second element: >>> ncvar = NetCDFVariableFlat('flux_nkor', isolate=False, timeaxis=1) >>> for element in elements: ... nkor1 = element.model.sequences.fluxes.nkor ... ncvar.log(nkor1, nkor1.series) >>> ncvar.subdevicenames[1:3] ('element2_0', 'element2_1')", "label": 1, "domain": "code", "token_count": 302, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0059", "text": "Formatter function that is used in a complex binding inside an XML template view. The function is used to interpret OData V4 annotations, supporting the same annotations as {@link #.format format} but with a simplified output aimed at design-time templating with smart controls. In contrast to format, \"14.5.12 Expression edm:Path\" or \"14.5.13 Expression edm:PropertyPath\" is turned into a simple binding path without type or constraint information. In certain cases, a complex binding is required to allow for proper escaping of the path. Example:
 <sfi:SmartField value=\"{path: 'meta>Value', formatter: 'sap.ui.model.odata.AnnotationHelper.simplePath'}\"/> 
@param {sap.ui.core.util.XMLPreprocessor.IContext|sap.ui.model.Context} oInterface the callback interface related to the current formatter call @param {any} [vRawValue] the raw value from the meta model, which is embedded within an entity set or entity type:
  • if this function is used as formatter the value is provided by the framework
  • if this function is called directly, provide the parameter only if it is already calculated
  • if the parameter is omitted, it is calculated automatically through oInterface.getObject(\"\")
@returns {string} the resulting string value to write into the processed XML @public", "label": 1, "domain": "code", "token_count": 306, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0060", "text": "Creates posterior distributions and their bootstrap error functions for input runs and estimators. For a more detailed description and some example use cases, see 'nestcheck: diagnostic tests for nested sampling calculations' (Higson et al. 2019). Parameters ---------- run_list: dict or list of dicts Nested sampling run(s) to plot. fthetas: list of functions, optional Quantities to plot. Each must map a 2d theta array to 1d ftheta array - i.e. map every sample's theta vector (every row) to a scalar quantity. E.g. use lambda x: x[:, 0] to plot the first parameter. labels: list of strs, optional Labels for each ftheta. ftheta_lims: list, optional Plot limits for each ftheta. n_simulate: int, optional Number of bootstrap replications to be used for the fgivenx distributions. random_seed: int, optional Seed to make sure results are consistent and fgivenx caching can be used. figsize: tuple, optional Matplotlib figsize in (inches). nx: int, optional Size of x-axis grid for fgivenx plots. ny: int, optional Size of y-axis grid for fgivenx plots. cache: str or None Root for fgivenx caching (no caching if None). parallel: bool, optional fgivenx parallel option. rasterize_contours: bool, optional fgivenx rasterize_contours option. tqdm_kwargs: dict, optional Keyword arguments to pass to the tqdm progress bar when it is used in fgivenx while plotting contours. Returns ------- fig: matplotlib figure", "label": 1, "domain": "code", "token_count": 329, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0061", "text": "

Work out method's bundle key.

Bundle key resolution

Bundle key is generated as follows:

  • If there are no {@link com.github.rodionmoiseev.c10n.C10NKey} annotations, key is the Class FQDN '.' Method Name. If method has arguments, method name is post-fixed with argument types delimited with '_', e.g. myMethod_String_int
  • If declaring interface or any of the super-interfaces contain {@link com.github.rodionmoiseev.c10n.C10NKey} annotation C then
    • For methods without {@link com.github.rodionmoiseev.c10n.C10NKey} annotation, key becomes C '.' Method Name
    • For methods with {@link com.github.rodionmoiseev.c10n.C10NKey} annotation M, key is C '.' M
    • For methods with {@link com.github.rodionmoiseev.c10n.C10NKey} annotation M, value for which starts with a '.', the key is just M (i.e. key is assumed to be absolute)
  • If no declaring interfaces have {@link com.github.rodionmoiseev.c10n.C10NKey} annotation, but a method contains annotation M, then key is just M.
  • Lastly, if global key prefix is specified, it is always prepended to the final key, delimited by '.'

Looking for c10n key in parent interfaces

The lookup of c10n key in parent interfaces is done breadth-first, starting from the declaring class. That is, if the declaring class does not have c10n key, all interfaces it extends are checked in declaration order first. If no key is found, this check is repeated for each of the super interfaces in the same order. @param keyPrefix global key prefix @param method method to extract the key from @return method c10n bundle key (not null)", "label": 1, "domain": "code", "token_count": 493, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0062", "text": "Works in two unique ways. First: takes a block so it can be used just like Array#select. Model.all.select { |m| m.field == value } This will build an array of objects from the database for the scope, converting them into an array and iterating through them using Array#select. Second: Modifies the SELECT statement for the query so that only certain fields are retrieved: Model.select(:field) # => [#] Although in the above example it looks as though this method returns an array, it actually returns a relation object and can have other query methods appended to it, such as the other methods in ActiveRecord::QueryMethods. The argument to the method can also be an array of fields. Model.select(:field, :other_field, :and_one_more) # => [#] You can also use one or more strings, which will be used unchanged as SELECT fields. Model.select('field AS field_one', 'other_field AS field_two') # => [#] If an alias was specified, it will be accessible from the resulting objects: Model.select('field AS field_one').first.field_one # => \"value\" Accessing attributes of an object that do not have fields retrieved by a select except +id+ will throw ActiveModel::MissingAttributeError: Model.select(:field).first.other_field # => ActiveModel::MissingAttributeError: missing attribute: other_field", "label": 1, "domain": "code", "token_count": 342, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0063", "text": "Loads data using pysat.utils.load_netcdf4 . This routine is called as needed by pysat. It is not intended for direct user interaction. Parameters ---------- fnames : array-like iterable of filename strings, full path, to data files to be loaded. This input is nominally provided by pysat itself. tag : string tag name used to identify particular data set to be loaded. This input is nominally provided by pysat itself. sat_id : string Satellite ID used to identify particular data set to be loaded. This input is nominally provided by pysat itself. **kwargs : extra keywords Passthrough for additional keyword arguments specified when instantiating an Instrument object. These additional keywords are passed through to this routine by pysat. Returns ------- data, metadata Data and Metadata are formatted for pysat. Data is a pandas DataFrame while metadata is a pysat.Meta instance. Note ---- Any additional keyword arguments passed to pysat.Instrument upon instantiation are passed along to this routine and through to the load_netcdf4 call. Examples -------- :: inst = pysat.Instrument('sport', 'ivm') inst.load(2019,1) # create quick Instrument object for a new, random netCDF4 file # define filename template string to identify files # this is normally done by instrument code, but in this case # there is no built in pysat instrument support # presumes files are named default_2019-01-01.NC format_str = 'default_{year:04d}-{month:02d}-{day:02d}.NC' inst = pysat.Instrument('netcdf', 'pandas', custom_kwarg='test' data_path='./', format_str=format_str) inst.load(2019,1)", "label": 1, "domain": "code", "token_count": 353, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0064", "text": "Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes. @param image An image stream. @param return_face_id [Boolean] A value indicating whether the operation should return faceIds of detected faces. @param return_face_landmarks [Boolean] A value indicating whether the operation should return landmarks of the detected faces. @param return_face_attributes [Array] Analyze and return the one or more specified face attributes in the comma-separated string like \"returnFaceAttributes=age,gender\". Supported face attributes include age, gender, headPose, smile, facialHair, glasses and emotion. Note that each face attribute analysis has additional computational and time cost. @param recognition_model [RecognitionModel] Name of recognition model. Recognition model is used when the face features are extracted and associated with detected faceIds, (Large)FaceList or (Large)PersonGroup. A recognition model name can be provided when performing Face - Detect or (Large)FaceList - Create or (Large)PersonGroup - Create. The default value is 'recognition_01', if latest model needed, please explicitly specify the model you need. Possible values include: 'recognition_01', 'recognition_02' @param return_recognition_model [Boolean] A value indicating whether the operation should return 'recognitionModel' in response. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 320, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0065", "text": "Deletes an existing Service Fabric service. Deletes an existing Service Fabric service. A service must be created before it can be deleted. By default, Service Fabric will try to close service replicas in a graceful manner and then delete the service. However, if the service is having issues closing the replica gracefully, the delete operation may take a long time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully delete the service. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the service name is \"fabric:/myapp/app1/svc1\", the service identity would be \"myapp~app1~svc1\" in 6.0+ and \"myapp/app1/svc1\" in previous versions. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.", "label": 1, "domain": "code", "token_count": 318, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0066", "text": "Parse the contents of the file object fileobj, and return the contents as a LIGO Light Weight document tree. The file object does not need to be seekable. If the gz parameter is None (the default) then gzip compressed data will be automatically detected and decompressed, otherwise decompression can be forced on or off by setting gz to True or False respectively. If the optional xmldoc argument is provided and not None, the parsed XML tree will be appended to that document, otherwise a new document will be created. The return value is a tuple, the first element of the tuple is the XML document and the second is a string containing the MD5 digest in hex digits of the bytestream that was parsed. Example: >>> from pycbc_glue.ligolw import ligolw >>> import StringIO >>> f = StringIO.StringIO('\"mass\",0.5,\"velocity\",34
') >>> xmldoc, digest = load_fileobj(f, contenthandler = ligolw.LIGOLWContentHandler) >>> digest '6bdcc4726b892aad913531684024ed8e' The contenthandler argument specifies the SAX content handler to use when parsing the document. The contenthandler is a required argument. See the pycbc_glue.ligolw package documentation for typical parsing scenario involving a custom content handler. See pycbc_glue.ligolw.ligolw.PartialLIGOLWContentHandler and pycbc_glue.ligolw.ligolw.FilteringLIGOLWContentHandler for examples of custom content handlers used to load subsets of documents into memory.", "label": 1, "domain": "code", "token_count": 437, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0067", "text": "Create a new instance based on this one with a new white reference. Parameters: :wref: The whitepoint reference. :labAsRef: If True, the L*a*b* values of the current instance are used as reference for the new color; otherwise, the RGB values are used as reference. Returns: A grapefruit.Color instance. >>> c = Color.from_rgb(1.0, 0.5, 0.0, 1.0, WHITE_REFERENCE['std_D65']) >>> c2 = c.with_white_ref(WHITE_REFERENCE['sup_D50']) >>> c2.rgb (1.0, 0.5, 0.0) >>> '(%g, %g, %g)' % c2.white_ref '(0.967206, 1, 0.81428)' >>> c2 = c.with_white_ref(WHITE_REFERENCE['sup_D50'], labAsRef=True) >>> '(%g, %g, %g)' % c2.rgb '(1.01463, 0.490341, -0.148133)' >>> '(%g, %g, %g)' % c2.white_ref '(0.967206, 1, 0.81428)' >>> '(%g, %g, %g)' % c.lab '(66.9518, 0.430841, 0.739692)' >>> '(%g, %g, %g)' % c2.lab '(66.9518, 0.430841, 0.739693)'", "label": 1, "domain": "code", "token_count": 319, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0068", "text": "Return the time_slide_id corresponding to the offset vector described by offsetdict, a dictionary of instrument/offset pairs. If the optional create_new argument is None (the default), then the table must contain a matching offset vector. The return value is the ID of that vector. If the table does not contain a matching offset vector then KeyError is raised. If the optional create_new argument is set to a Process object (or any other object with a process_id attribute), then if the table does not contain a matching offset vector a new one will be added to the table and marked as having been created by the given process. The return value is the ID of the (possibly newly created) matching offset vector. If the optional superset_ok argument is False (the default) then an offset vector in the table is considered to \"match\" the requested offset vector only if they contain the exact same set of instruments. If the superset_ok argument is True, then an offset vector in the table is considered to match the requested offset vector as long as it provides the same offsets for the same instruments as the requested vector, even if it provides offsets for other instruments as well. More than one offset vector in the table might match the requested vector. If the optional nonunique_ok argument is False (the default), then KeyError will be raised if more than one offset vector in the table is found to match the requested vector. If the optional nonunique_ok is True then the return value is the ID of one of the matching offset vectors selected at random.", "label": 1, "domain": "code", "token_count": 309, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0069", "text": "Creates a new instance of a VerifierFactory for the specified schema language. @param language URI that specifies the schema language.

It is preferable to use the namespace URI of the schema language to designate the schema language. For example,
URI language
http://relaxng.org/ns/structure/0.9 RELAX NG
http://www.xml.gr.jp/xmlns/relaxCore RELAX Core
http://www.xml.gr.jp/xmlns/relaxNamespace RELAX Namespace
http://www.thaiopensource.com/trex TREX
http://www.w3.org/2001/XMLSchema W3C XML Schema
http://www.w3.org/XML/1998/namespace XML DTD
@param classLoader This class loader is used to search the available implementation. @return a non-null valid VerifierFactory instance. @exception VerifierConfigurationException if no implementation is available for the specified language.", "label": 1, "domain": "code", "token_count": 437, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0070", "text": "/*[deutsch]

Konstruiert einen Formatierer für allgemeine Kalenderchronologien mit Hilfe eines CLDR-Formatmusters.

Wenn die angegebene {@code locale} eine Unicode-ca-Erweiterung hat, dann wird Time4J versuchen, eine geeignete Kalenderchronologie zu laden, falls vorhanden. Sonst wird ISO-8601 verwendet bis auf wenige Länder, die andere Kalender bevorzugen. Folgendes Beispiel wird einen Formatierer für den persischen Kalender liefern:

 Locale loc = Locale.forLanguageTag("de-IR-u-ca-persian"); ChronoFormatter<CalendarDate> formatter = ChronoFormatter.ofGenericCalendarPattern("G y MMMM d, EEEE", loc); PersianCalendar jalali = PersianCalendar.of(1393, 1, 10); PlainDate gregorian = jalali.transform(PlainDate.class); assertThat(formatter.format(jalali), is("AP 1393 Farwardin 10, Sonntag")); assertThat(formatter.format(gregorian), is("AP 1393 Farwardin 10, Sonntag")); 

Dieses Beispiel demonstriert auch, daß die Chronologie mit Hilfe von {@code locale} ermittelt wird, statt über das zu formatierende Objekt. Jedoch sollten die meisten Anwendungen die Chronologie aus Gründen der Performance und Klarheit mit anderen Fabrikmethoden explizit setzen. Diese Methode funktioniert nicht für Chronologien, die einen anderen Formatmustertyp als CLDR voraussetzen, zum Beispiel der Maya-Kalender oder der französische Revolutionskalender.

@param pattern format pattern @param locale format locale @return new {@code ChronoFormatter}-instance @throws IllegalArgumentException if resolving of pattern fails or a requested calendar cannot be found @see #ofPattern(String, PatternType, Locale, Chronology) @see #ofGenericCalendarStyle(DisplayMode, Locale) @see #with(Locale) @see PatternType#CLDR @see Locale#forLanguageTag(String) @since 4.27", "label": 1, "domain": "code", "token_count": 498, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0071", "text": "Create a commit @param [Hash] params @input params [String] :message The commit message @input params [String] :tree String of the SHA of the tree object this commit points to @input params [Array[String]] :parents Array of the SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided, for a merge commit, an array of more than one should be provided. Optional Parameters You can provide an additional commiter parameter, which is a hash containing information about the committer. Or, you can provide an author parameter, which is a hash containing information about the author. The committer section is optional and will be filled with the author data if omitted. If the author section is omitted, it will be filled in with the authenticated users information and the current date. Both the author and commiter parameters have the same keys: @input params [String] :name String of the name of the author (or commiter) of the commit @input params [String] :email String of the email of the author (or commiter) of the commit @input params [Timestamp] :date Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. @example github = Github.new github.git_data.commits.create 'user-name', 'repo-name', message: \"my commit message\", author: { name: \"Scott Chacon\", email: \"schacon@gmail.com\", date: \"2008-07-09T16:13:30+12:00\" }, parents: [ \"7d1b31e74ee336d15cbd21741bc88a537ed063a0\" ], tree: \"827efc6d56897b048c772eb4087f854f46256132\"] @api public", "label": 1, "domain": "code", "token_count": 409, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0072", "text": "Raises ValidationException if value is not a URL. Returns the value argument. The \"http\" or \"https\" protocol part of the URL is optional. * value (str): The value being validated as a URL. * blank (bool): If True, a blank string will be accepted. Defaults to False. * strip (bool, str, None): If None, whitespace is stripped from value. If a str, the characters in it are stripped from value. If False, nothing is stripped. * allowlistRegexes (Sequence, None): A sequence of regex str that will explicitly pass validation, even if they aren't numbers. * blocklistRegexes (Sequence, None): A sequence of regex str or (regex_str, response_str) tuples that, if matched, will explicitly fail validation. * excMsg (str): A custom message to use in the raised ValidationException. >>> import pysimplevalidate as pysv >>> pysv.validateURL('https://inventwithpython.com') 'https://inventwithpython.com' >>> pysv.validateURL('inventwithpython.com') 'inventwithpython.com' >>> pysv.validateURL('localhost') 'localhost' >>> pysv.validateURL('mailto:al@inventwithpython.com') 'mailto:al@inventwithpython.com' >>> pysv.validateURL('ftp://example.com') 'example.com' >>> pysv.validateURL('https://inventwithpython.com/blog/2018/02/02/how-to-ask-for-programming-help/') 'https://inventwithpython.com/blog/2018/02/02/how-to-ask-for-programming-help/' >>> pysv.validateURL('blah blah blah') Traceback (most recent call last): ... pysimplevalidate.ValidationException: 'blah blah blah' is not a valid URL.", "label": 1, "domain": "code", "token_count": 374, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0073", "text": "/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See: Helper method for preparing data. @param {Array.} rawData like [ [12,232,443], (raw data set for the first box) [3843,5545,1232], (raw datat set for the second box) ... ] @param {Object} [opt] @param {(number|string)} [opt.boundIQR=1.5] Data less than min bound is outlier. default 1.5, means Q1 - 1.5 * (Q3 - Q1). If 'none'/0 passed, min bound will not be used. @param {(number|string)} [opt.layout='horizontal'] Box plot layout, can be 'horizontal' or 'vertical' @return {Object} { boxData: Array.> outliers: Array.> axisData: Array. }", "label": 1, "domain": "code", "token_count": 372, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0074", "text": "Perform a query by combining all current settings and the information passed into this method. @param db the database to query on @param projectionIn A list of which columns to return. Passing null will return all columns, which is discouraged to prevent reading data from storage that isn't going to be used. @param selection A filter declaring which rows to return, formatted as an SQL WHERE clause (excluding the WHERE itself). Passing null will return all rows for the given URL. @param selectionArgs You may include ?s in selection, which will be replaced by the values from selectionArgs, in order that they appear in the selection. The values will be bound as Strings. @param groupBy A filter declaring how to group rows, formatted as an SQL GROUP BY clause (excluding the GROUP BY itself). Passing null will cause the rows to not be grouped. @param having A filter declare which row groups to include in the cursor, if row grouping is being used, formatted as an SQL HAVING clause (excluding the HAVING itself). Passing null will cause all row groups to be included, and is required when row grouping is not being used. @param sortOrder How to order the rows, formatted as an SQL ORDER BY clause (excluding the ORDER BY itself). Passing null will use the default sort order, which may be unordered. @param limit Limits the number of rows returned by the query, formatted as LIMIT clause. Passing null denotes no LIMIT clause. @param cancellationSignal A signal to cancel the operation in progress, or null if none. If the operation is canceled, then {@link OperationCanceledException} will be thrown when the query is executed. @return a cursor over the result set @see android.content.ContentResolver#query(android.net.Uri, String[], String, String[], String)", "label": 1, "domain": "code", "token_count": 359, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0075", "text": "Main function that looks for a tabstops in provided text and returns a processed version of text with expanded placeholders and list of tabstops found. @param {String} text Text to process @param {Object} options List of processor options:
replaceCarets : Boolean — replace all default caret placeholders (like {%::emmet-caret::%}) with ${0:caret}
escape : Function — function that handle escaped characters (mostly '$'). By default, it returns the character itself to be displayed as is in output, but sometimes you will use extract method as intermediate solution for further processing and want to keep character escaped. Thus, you should override escape method to return escaped symbol (e.g. '\\\\$')
tabstop : Function – a tabstop handler. Receives a single argument – an object describing token: its position, number group, placeholder and token itself. Should return a replacement string that will appear in final output variable : Function – variable handler. Receives a single argument – an object describing token: its position, name and original token itself. Should return a replacement string that will appear in final output @returns {Object} Object with processed text property and array of tabstops found @memberOf tabStops", "label": 1, "domain": "code", "token_count": 344, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0076", "text": "Call up to three different functions for heuristic ensemble clustering (namely CSPA, HGPA and MCLA) then select as the definitive consensus clustering the one with the highest average mutual information score between its vector of consensus labels and the vectors of labels associated to each partition from the ensemble. Parameters ---------- cluster_runs : array of shape (n_partitions, n_samples) Each row of this matrix is such that the i-th entry corresponds to the cluster ID to which the i-th sample of the data-set has been classified by this particular clustering. Samples not selected for clustering in a given round are are tagged by an NaN. hdf5_file_name : file object or string, optional (default = None) The handle or name of an HDF5 file where any array needed for consensus_clustering and too large to fit into memory is to be stored. Created if not specified at input. verbose : Boolean, optional (default = False) Specifies if messages concerning the status of the many functions subsequently called 'cluster_ensembles' will be displayed on the standard output. N_clusters_max : int, optional The number of clusters in which to partition the samples into a consensus clustering. This defaults to the highest number of clusters encountered in the sets of independent clusterings on subsamples of the data-set (i.e. the maximum of the entries in \"cluster_runs\"). Returns ------- cluster_ensemble : array of shape (n_samples,) For the final ensemble clustering, this vector contains the cluster IDs of each sample in the whole data-set. Reference --------- A. Strehl and J. Ghosh, \"Cluster Ensembles - A Knowledge Reuse Framework for Combining Multiple Partitions\". In: Journal of Machine Learning Research, 3, pp. 583-617. 2002", "label": 1, "domain": "code", "token_count": 356, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0077", "text": "Helper function for a template:with instruction that depending on how it is called goes to the entity set with the given name or to the one determined by the last navigation property. Supports the following dynamic expressions:
  • \"14.5.2 Expression edm:AnnotationPath\"
  • \"14.5.11 Expression edm:NavigationPropertyPath\"
  • \"14.5.12 Expression edm:Path\"
  • \"14.5.13 Expression edm:PropertyPath\"
Example:
 <template:with path=\"facet>Target\" helper=\"sap.ui.model.odata.AnnotationHelper.gotoEntitySet\" var=\"entitySet\"/> <template:with path=\"associationSetEnd>entitySet\" helper=\"sap.ui.model.odata.AnnotationHelper.gotoEntitySet\" var=\"entitySet\"/> 
@param {sap.ui.model.Context} oContext a context which must point to a simple string or to an annotation (or annotation property) of type Edm.AnnotationPath, Edm.NavigationPropertyPath, Edm.Path, or Edm.PropertyPath embedded within an entity set or entity type; the context's model must be an {@link sap.ui.model.odata.ODataMetaModel} @returns {string} the path to the entity set, or undefined if no such set is found. In this case, a warning is logged to the console. @public", "label": 1, "domain": "code", "token_count": 328, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0078", "text": "A function that helps to interpret OData V4 annotations. It knows about the syntax of the path value used by the following dynamic expressions:
  • \"14.5.2 Expression edm:AnnotationPath\"
  • \"14.5.11 Expression edm:NavigationPropertyPath\"
  • \"14.5.12 Expression edm:Path\"
  • \"14.5.13 Expression edm:PropertyPath\"
It returns the information whether the given path ends with \"$count\" or with a multi-valued structural or navigation property. Term casts and annotations of navigation properties are ignored. Example:
 <template:if test=\"{facet>Target/$AnnotationPath@@sap.ui.model.odata.v4.AnnotationHelper.isMultiple}\"> 
@param {string} sPath The path value from the meta model, for example \"ToSupplier/@com.sap.vocabularies.Communication.v1.Address\" or \"@com.sap.vocabularies.UI.v1.FieldGroup#Dimensions\" @param {object} oDetails The details object @param {boolean} [oDetails.$$valueAsPromise] Whether a Promise may be returned if the needed metadata is not yet loaded (since 1.57.0) @param {sap.ui.model.Context} oDetails.context Points to the given path, that is oDetails.context.getProperty(\"\") === sPath @param {string} oDetails.schemaChildName The qualified name of the schema child where the computed annotation has been found, for example \"name.space.EntityType\" @returns {boolean|Promise} true if the given path ends with \"$count\" or with a multi-valued structural or navigation property, false otherwise. If oDetails.$$valueAsPromise is true a Promise may be returned resolving with the boolean value. @public @since 1.43.0", "label": 1, "domain": "code", "token_count": 421, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0079", "text": "Assigns name to grib2 message number with name 'unknown'. Names based on NOAA grib2 abbreviations. Args: selected_variable(str): name of selected variable for loading Names: 3: LCDC: Low Cloud Cover 4: MCDC: Medium Cloud Cover 5: HCDC: High Cloud Cover 197: RETOP: Echo Top 198: MAXREF: Hourly Maximum of Simulated Reflectivity at 1 km AGL 199: MXUPHL: Hourly Maximum of Updraft Helicity over Layer 2km to 5 km AGL, and 0km to 3km AGL examples:' MXUPHL_5000' or 'MXUPHL_3000' 200: MNUPHL: Hourly Minimum of Updraft Helicity at same levels of MXUPHL examples:' MNUPHL_5000' or 'MNUPHL_3000' 220: MAXUVV: Hourly Maximum of Upward Vertical Velocity in the lowest 400hPa 221: MAXDVV: Hourly Maximum of Downward Vertical Velocity in the lowest 400hPa 222: MAXUW: U Component of Hourly Maximum 10m Wind Speed 223: MAXVW: V Component of Hourly Maximum 10m Wind Speed Returns: Given an uknown string name of a variable, returns the grib2 message Id and units of the variable, based on the self.unknown_name and self.unknown_units dictonaries above. Allows access of data values of unknown variable name, given the ID.", "label": 1, "domain": "code", "token_count": 320, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0080", "text": "Create a collection of radio inputs for the attribute. Basically this helper will create a radio input associated with a label for each text/value option in the collection, using value_method and text_method to convert these text/value. You can give a symbol or a proc to both value_method and text_method, that will be evaluated for each item in the collection. == Examples form_for @user do |f| f.collection_radio_buttons :options, [[true, 'Yes'] ,[false, 'No']], :first, :last end It is also possible to give a block that should generate the radio + label. To wrap the radio with the label, for instance: form_for @user do |f| f.collection_radio_buttons( :options, [[true, 'Yes'] ,[false, 'No']], :first, :last ) do |b| b.label { b.radio_button + b.text } end end == Options Collection radio accepts some extra options: * checked => the value that should be checked initially. * disabled => the value or values that should be disabled. Accepts a single item or an array of items. * collection_wrapper_tag => the tag to wrap the entire collection. * collection_wrapper_class => the CSS class to use for collection_wrapper_tag * item_wrapper_tag => the tag to wrap each item in the collection. * item_wrapper_class => the CSS class to use for item_wrapper_tag * a block => to generate the label + radio or any other component.", "label": 1, "domain": "code", "token_count": 378, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0081", "text": "Set the payload for the request.
Using this method together with {@link #param(String, Object)} has the effect of body being ignored without notice. The method can be called more than once: the value will be stored and converted to bytes later.
Following types are supported for the body:
  • null clears the body
  • {@link org.json.JSONObject}, HTTP header 'Content-Type' will be set to JSON, if not set
  • {@link org.json.JSONArray}, HTTP header 'Content-Type' will be set to JSON, if not set
  • {@link java.lang.String}, HTTP header 'Content-Type' will be set to TEXT, if not set; Text will be converted to UTF-8 bytes.
  • byte[] the easiest way for DavidWebb - it's just passed through. HTTP header 'Content-Type' will be set to BINARY, if not set.
  • {@link java.io.File}, HTTP header 'Content-Type' will be set to BINARY, if not set; The file gets streamed to the web-server and 'Content-Length' will be set to the number of bytes of the file. There is absolutely no conversion done. So if you want to upload e.g. a text-file and convert it to another encoding than stored on disk, you have to do it by yourself.
  • {@link java.io.InputStream}, HTTP header 'Content-Type' will be set to BINARY, if not set; Similar to File. Content-Length cannot be set (which has some drawbacks compared to knowing the size of the body in advance).
    You have to care for closing the stream!
@param body the payload @return this for method chaining (fluent API)", "label": 1, "domain": "code", "token_count": 416, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0082", "text": "Public: A set of conditions for easily getting started with simple watch scenarios. Keepalive is intended for use by beginners or on processes that do not need very sophisticated monitoring. If events are enabled, it will use the :process_exit event to determine if a process fails. Otherwise it will use the :process_running poll. options - The option Hash. Possible values are: :interval - The Integer number of seconds on which to poll for process status. Affects CPU, memory, and :process_running conditions (if used). Default: 5.seconds. :memory_max - The Integer memory max. A bare integer means kilobytes. You may use Numeric.kilobytes, Numeric#megabytes, and Numeric#gigabytes to makes things more clear. :memory_times - If :memory_max is set, :memory_times can be set to either an Integer or a 2 element Integer Array to specify the number of times the memory condition must fail. Examples: 3 (three times), [3, 5] (three out of any five checks). Default: [3, 5]. :cpu_max - The Integer CPU percentage max. Range is 0 to 100. You may use the Numberic#percent sugar to clarify e.g. 50.percent. :cpu_times - If :cpu_max is set, :cpu_times can be set to either an Integer or a 2 element Integer Array to specify the number of times the memory condition must fail. Examples: 3 (three times), [3, 5] (three out of any five checks). Default: [3, 5].", "label": 1, "domain": "code", "token_count": 329, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0083", "text": "List issues for a repository = Inputs :limit - Optional - Number of issues to retrieve, default 15 :start - Optional - Issue offset, default 0 :search - Optional - A string to search for :sort - Optional - Sorts the output by any of the metadata fields :title - Optional - Contains a filter operation to restrict the list of issues by the issue title :content - Optional - Contains a filter operation to restrict the list of issues by the issue content :version - Optional - Contains an is or ! ( is not) filter to restrict the list of issues by the version :milestone - Optional - Contains an is or ! ( is not) filter to restrict the list of issues by the milestone :component - Optional - Contains an is or ! ( is not) filter to restrict the list of issues by the component :kind - Optional - Contains an is or ! ( is not) filter to restrict the list of issues by the issue kind :status - Optional - Contains an is or ! ( is not) filter to restrict the list of issues by the issue status :responsible - Optional - Contains an is or ! ( is not) filter to restrict the list of issues by the user responsible :reported_by - Optional - Contains a filter operation to restrict the list of issues by the user that reported the issue = Examples bitbucket = BitBucket.new :user => 'user-name', :repo => 'repo-name' bitbucket.issues.list_repo :filter => 'kind=bug&kind=enhancement'", "label": 1, "domain": "code", "token_count": 373, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0084", "text": "Cancels a user-induced fault operation. The following is a list of APIs that start fault operations that may be cancelled using CancelOperation - - StartDataLoss - StartQuorumLoss - StartPartitionRestart - StartNodeTransition If force is false, then the specified user-induced operation will be gracefully stopped and cleaned up. If force is true, the command will be aborted, and some internal state may be left behind. Specifying force as true should be used with care. Calling this API with force set to true is not allowed until this API has already been called on the same test command with force set to false first, or unless the test command already has an OperationState of OperationState.RollingBack. Clarification: OperationState.RollingBack means that the system will/is be cleaning up internal system state caused by executing the command. It will not restore data if the test command was to cause data loss. For example, if you call StartDataLoss then call this API, the system will only clean up internal state from running the command. It will not restore the target partition's data, if the command progressed far enough to cause data loss. Important note: if this API is invoked with force==true, internal state may be left behind. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param force [Boolean] Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.", "label": 1, "domain": "code", "token_count": 371, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0085", "text": "RetrieveCatalogObject Returns a single [CatalogItem](#type-catalogitem) as a [CatalogObject](#type-catalogobject) based on the provided ID. The returned object includes all of the relevant [CatalogItem](#type-catalogitem) information including: [CatalogItemVariation](#type-catalogitemvariation) children, references to its [CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of any [CatalogTax](#type-catalogtax) objects that apply to it. @param object_id The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :include_related_objects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` @return [RetrieveCatalogObjectResponse]", "label": 1, "domain": "code", "token_count": 345, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0086", "text": "Monta a linha digitável padrão para todos os bancos segundo a BACEN. A linha digitável será composta por cinco campos:
1º campo:
Composto pelo código de Banco, código da moeda, as cinco primeiras posições do campo livre e o dígito verificador deste campo.
2º campo:
Composto pelas posições 6ª a 15ª do campo livre e o dígito verificador deste campo.
3º campo:
Composto pelas posições 16ª a 25ª do campo livre e o dígito verificador deste campo.
4º campo:
Composto pelo dígito verificador do código de barras, ou seja, a 5ª posição do código de barras.
5º campo:
Composto pelo fator de vencimento com 4(quatro) caracteres e o valor do documento com 10(dez) caracteres, sem separadores e sem edição.
@return [String] @raise [ArgumentError] Caso não seja um número de 44 dígitos. @example \"00192376900000135000000001238798777770016818\".linha_digitavel #=> \"00190.00009 01238.798779 77700.168188 2 37690000013500\"", "label": 1, "domain": "code", "token_count": 329, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0087", "text": "Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

In the foregoing description, the notation sgn(expression) designates the mathematical signum function, which is defined to return one of -1, 0, or 1 according to whether the value of expression is negative, zero or positive.

The implementor must ensure that sgn(compare(x, y)) == -sgn(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)== 0 implies that sgn(compare(x, z))== sgn(compare(y, z)) for all z.

It is generally the case, but not strictly required that (compare(x, y)== 0) == (x.equals(y)). Generally speaking, any comparator that violates this condition should clearly indicate this fact. The recommended language is \"Note: this comparator imposes orderings that are inconsistent with equals.\" @param arg0 the first object to be compared. @param arg1 the second object to be compared. @return a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. @throws ClassCastException if the arguments' types prevent them from being compared by this comparator.", "label": 1, "domain": "code", "token_count": 466, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0088", "text": "Using an Id, find document and add one or more items into a list of this document, the values provided specifies the list and items, suppose relation is a obj list, targets is a list in obj item of relations, then values = {\"relations.0.targets\", [\"some string\", {obj}, 123]} The sign means primer key of object for determining if the object exist in list already. suppose before modifying, the document is: { ..., list: [ {a:1} ], ... } If users would like to add \"item1\", {a:1, b:2} and {c:3} as items in the \"list\", , the function's parameter \"value (field: [item])\" can be set as value = {list: ['item1', {a:1, b:2}, {c:3}]} If you just want to modify the first item in the list, \"list.0\" can be used as field. To prevent from recreating the item {a:1, b:2} if {a:1} is already in the original field, \"signs\" can be signs = [{a:1}] in this case, the document will remain the same as the original one without adding anything. Returns a waterline (bluebird) promise with the document find and modify @param {string} identifier @param {Object} values {field: [value]} @Param {Array} signs @returns {Promise}", "label": 1, "domain": "code", "token_count": 304, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0089", "text": "Computational Genomics Lab, Genomics Institute, UC Santa Cruz Toil exome pipeline Perform variant / indel analysis given a pair of tumor/normal BAM files. Samples are optionally preprocessed (indel realignment and base quality score recalibration) The output of this pipeline is a tarball containing results from MuTect, MuSe, and Pindel. General usage: 1. Type \"toil-exome generate\" to create an editable manifest and config in the current working directory. 2. Parameterize the pipeline by editing the config. 3. Fill in the manifest with information pertaining to your samples. 4. Type \"toil-exome run [jobStore]\" to execute the pipeline. Please read the README.md located in the source directory or at: https://github.com/BD2KGenomics/toil-scripts/tree/master/src/toil_scripts/exome_variant_pipeline Structure of variant pipeline (per sample) 1 2 3 4 14 ------- | | | | | | 0 --------- 5 ----- 15 -------- 17 | | | --- 16 ------- | | 6 7 | | 8 9 | | 10 11 | | 12 13 0 = Start node 1 = reference index 2 = reference dict 3 = normal bam index 4 = tumor bam index 5 = pre-processing node / DAG declaration 6,7 = RealignerTargetCreator 8,9 = IndelRealigner 10,11 = BaseRecalibration 12,13 = PrintReads 14 = MuTect 15 = Pindel 16 = MuSe 17 = Consolidate Output and move/upload results ================================================== Dependencies Curl: apt-get install curl Docker: wget -qO- https://get.docker.com/ | sh Toil: pip install toil Boto: pip install boto (OPTIONAL)", "label": 1, "domain": "code", "token_count": 391, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0090", "text": "Use these TIFF options for output image. @example // Convert SVG input to LZW-compressed, 1 bit per pixel TIFF output sharp('input.svg') .tiff({ compression: 'lzw', squash: true }) .toFile('1-bpp-output.tiff') .then(info => { ... }); @param {Object} [options] - output options @param {Number} [options.quality=80] - quality, integer 1-100 @param {Boolean} [options.force=true] - force TIFF output, otherwise attempt to use input format @param {Boolean} [options.compression='jpeg'] - compression options: lzw, deflate, jpeg, ccittfax4 @param {Boolean} [options.predictor='horizontal'] - compression predictor options: none, horizontal, float @param {Boolean} [options.pyramid=false] - write an image pyramid @param {Boolean} [options.tile=false] - write a tiled tiff @param {Boolean} [options.tileWidth=256] - horizontal tile size @param {Boolean} [options.tileHeight=256] - vertical tile size @param {Number} [options.xres=1.0] - horizontal resolution in pixels/mm @param {Number} [options.yres=1.0] - vertical resolution in pixels/mm @param {Boolean} [options.squash=false] - squash 8-bit images down to 1 bit @returns {Sharp} @throws {Error} Invalid options", "label": 1, "domain": "code", "token_count": 303, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0091", "text": "Set up the HDX configuration Args: configuration (Optional[Configuration]): Configuration instance. Defaults to setting one up from passed arguments. **kwargs: See below user_agent (str): User agent string. HDXPythonLibrary/X.X.X- is prefixed. Must be supplied if remoteckan is not. user_agent_config_yaml (str): Path to YAML user agent configuration. Ignored if user_agent supplied. Defaults to ~/.useragent.yml. user_agent_lookup (str): Lookup key for YAML. Ignored if user_agent supplied. hdx_url (str): HDX url to use. Overrides hdx_site. hdx_site (str): HDX site to use eg. prod, test. hdx_read_only (bool): Whether to access HDX in read only mode. Defaults to False. hdx_key (str): Your HDX key. Ignored if hdx_read_only = True. hdx_config_dict (dict): HDX configuration dictionary to use instead of above 3 parameters OR hdx_config_json (str): Path to JSON HDX configuration OR hdx_config_yaml (str): Path to YAML HDX configuration project_config_dict (dict): Project configuration dictionary OR project_config_json (str): Path to JSON Project configuration OR project_config_yaml (str): Path to YAML Project configuration hdx_base_config_dict (dict): HDX base configuration dictionary OR hdx_base_config_json (str): Path to JSON HDX base configuration OR hdx_base_config_yaml (str): Path to YAML HDX base configuration. Defaults to library's internal hdx_base_configuration.yml. Returns: None", "label": 1, "domain": "code", "token_count": 323, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0092", "text": "@!group Actions @example Request syntax with placeholder values mfa_device.associate({ authentication_code_1: \"authenticationCodeType\", # required authentication_code_2: \"authenticationCodeType\", # required }) @param [Hash] options ({}) @option options [required, String] :authentication_code_1 An authentication code emitted by the device. The format for this parameter is a string of six digits. Submit your request immediately after generating the authentication codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device becomes out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can [resync the device][1]. [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html @option options [required, String] :authentication_code_2 A subsequent authentication code emitted by the device. The format for this parameter is a string of six digits. Submit your request immediately after generating the authentication codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device becomes out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can [resync the device][1]. [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html @return [EmptyStructure]", "label": 1, "domain": "code", "token_count": 319, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0093", "text": "Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxCellTracker Event handler that highlights cells. Inherits from . Example: (code) new mxCellTracker(graph, '#00FF00'); (end) For detecting dragEnter, dragOver and dragLeave on cells, the following code can be used: (code) graph.addMouseListener( { cell: null, mouseDown: function(sender, me) { }, mouseMove: function(sender, me) { var tmp = me.getCell(); if (tmp != this.cell) { if (this.cell != null) { this.dragLeave(me.getEvent(), this.cell); } this.cell = tmp; if (this.cell != null) { this.dragEnter(me.getEvent(), this.cell); } } if (this.cell != null) { this.dragOver(me.getEvent(), this.cell); } }, mouseUp: function(sender, me) { }, dragEnter: function(evt, cell) { mxLog.debug('dragEnter', cell.value); }, dragOver: function(evt, cell) { mxLog.debug('dragOver', cell.value); }, dragLeave: function(evt, cell) { mxLog.debug('dragLeave', cell.value); } }); (end) Constructor: mxCellTracker Constructs an event handler that highlights cells. Parameters: graph - Reference to the enclosing . color - Color of the highlight. Default is blue. funct - Optional JavaScript function that is used to override .", "label": 1, "domain": "code", "token_count": 321, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0094", "text": "Sends a health report on the Service Fabric node. Reports health state of the specified Service Fabric node. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway node, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetNodeHealth and check that the report appears in the HealthEvents section. @param node_name [String] The name of the node. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.", "label": 1, "domain": "code", "token_count": 440, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0095", "text": "Get first dom element from iterable or selector. @param {(string|Array|NodeList|HTMLCollection|Window|Node)} input - The iterable, selector or elements. @return {(Window|Node|boolean)} element - The dom element from input. @example //esnext import { createElement, append, getElement } from 'chirashi' const sushi = createElement('.sushi') const unagi = createElement('.unagi') const yakitori = createElement('.yakitori') const sashimi = createElement('.sashimi') append(document.body, [sushi, unagi, yakitori, sashimi]) getElement('div') //returns:

getElement('.yakitori, .sashimi') //returns:
getElement([sushi, unagi, '.sashimi', '.unknown']) //returns:
getElement('.wasabi') //returns: undefined @example //es5 var sushi = Chirashi.createElement('.sushi') var unagi = Chirashi.createElement('.unagi') var yakitori = Chirashi.createElement('.yakitori') var sashimi = Chirashi.createElement('.sashimi') Chirashi.append(document.body, [sushi, unagi, yakitori, sashimi]) Chirashi.getElement('div') //returns:
Chirashi.getElement('.yakitori, .sashimi') //returns:
Chirashi.getElement([sushi, unagi, '.sashimi', '.unknown']) //returns:
Chirashi.getElement('.wasabi') //returns: undefined", "label": 1, "domain": "code", "token_count": 369, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0096", "text": "Find the first element's child matching the selector. @param {(string|Array|NodeList|HTMLCollection|Element|Document|ParentNode)} element - The parent node. Note that it'll be passed to getElement to ensure there's only one. @param {string} selector - The selector to match. @return {(Element|null)} element - The first child of elements matching the selector or null. @example //esnext import { createElement, append, find } from 'chirashi' const maki = createElement('.maki') append(maki, ['.salmon[data-fish][data-inside]', '.avocado[data-inside]']) const roll = createElement('.roll') append(roll, '.tuna[data-fish][data-inside]') append(document.body, [maki, roll]) findOne('div', '[data-fish]') //returns:
findOne(maki, '[data-inside]') //returns:
@example //es5 var maki = Chirashi.createElement('.maki') Chirashi.append(maki, ['.salmon[data-fish][data-inside]', '.avocado[data-inside]']) var roll = Chirashi.createElement('.roll') Chirashi.append(roll, '.tuna[data-fish][data-inside]') Chirashi.append(document.body, [maki, roll]) Chirashi.findOne('div', '[data-fish]') //returns:
Chirashi.findOne(maki, '[data-inside]') //returns:
", "label": 1, "domain": "code", "token_count": 373, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0097", "text": "Calculates probability of gene i regulating gene j with continuous data assisted method, with the recommended combination of multiple tests. Probabilities are converted from likelihood ratios separately for each A. This gives better predictions when the number of secondary targets (dt2) is large. (Check program warnings.) dc: numpy.ndarray(nt,ns,dtype=ftype(='f4' by default)) Continuous anchor data. Entry dc[i,j] is anchor i's value for sample j. Anchor i is used to infer the probability of gene i -> any other gene. dt: numpy.ndarray(nt,ns,dtype=ftype(='=f4' by default)) Gene expression data for A Entry dt[i,j] is gene i's expression level for sample j. dt2:numpy.ndarray(nt2,ns,dtype=ftype(='=f4' by default)) Gene expression data for B. dt2 has the same format as dt, and can be identical with, different from, or a superset of dt. When dt2 is a superset of (or identical with) dt, dt2 must be arranged to be identical with dt at its upper submatrix, i.e. dt2[:nt,:]=dt, and set parameter nodiag = 1. nodiag: skip diagonal regulations, i.e. regulation A->B for A=B. This should be set to True when A is a subset of B and aligned correspondingly. memlimit: The approximate memory usage limit in bytes for the library. For datasets require a larger memory, calculation will be split into smaller chunks. If the memory limit is smaller than minimum required, calculation can fail with an error message. memlimit=0 defaults to unlimited memory usage. Return: dictionary with following keys: ret:0 iff execution succeeded. p: numpy.ndarray((nt,nt2),dtype=ftype(='=f4' by default)). Probability function from for recommended combination of multiple tests. For more information on tests, see paper. ftype can be found in auto.py. Example: see findr.examples.geuvadis5", "label": 1, "domain": "code", "token_count": 422, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0098", "text": "Gets the list of backups available for the specified backed up entity at the specified backup location. Gets the list of backups available for the specified backed up entity (Application, Service or Partition) at the specified backup location (FileShare or Azure Blob Storage). @param get_backup_by_storage_query_description [GetBackupByStorageQueryDescription] Describes the filters and backup storage details to be used for enumerating backups. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [PagedBackupInfoList] operation results.", "label": 1, "domain": "code", "token_count": 355, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0099", "text": ">>> mdbf = MongoDBForwarder('no_host', '27017', 'deadpool', ... 'chimichanga', 'logs', 'collection') >>> log = [{u'data': {u'_': {u'file': u'log.py', ... u'fn': u'start', ... u'ln': 8, ... u'name': u'__main__'}, ... u'a': 1, ... u'b': 2, ... u'msg': u'this is a dummy log'}, ... u'error': False, ... u'error_tb': u'', ... u'event': u'some_log', ... u'file': u'/var/log/sample.log', ... u'formatter': u'logagg.formatters.basescript', ... u'host': u'deepcompute', ... u'id': u'20180409T095924_aec36d313bdc11e89da654e1ad04f45e', ... u'level': u'info', ... u'raw': u'{...}', ... u'timestamp': u'2018-04-09T09:59:24.733945Z', ... u'type': u'metric'}] >>> records = mdbf._parse_msg_for_mongodb(log) >>> from pprint import pprint >>> pprint(records) [{'_id': u'20180409T095924_aec36d313bdc11e89da654e1ad04f45e', u'data': {u'_': {u'file': u'log.py', u'fn': u'start', u'ln': 8, u'name': u'__main__'}, u'a': 1, u'b': 2, u'msg': u'this is a dummy log'}, u'error': False, u'error_tb': u'', u'event': u'some_log', u'file': u'/var/log/sample.log', u'formatter': u'logagg.formatters.basescript', u'host': u'deepcompute', u'level': u'info', u'raw': u'{...}', u'timestamp': u'2018-04-09T09:59:24.733945Z', u'type': u'metric'}]", "label": 1, "domain": "code", "token_count": 482, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0100", "text": "

Perform am URI path segment escape operation on a Reader input, writing results to a Writer.

The following are the only allowed chars in an URI path segment (will not be escaped):

  • A-Z a-z 0-9
  • - . _ ~
  • ! $ & ' ( ) * + , ; =
  • : @

All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.

This method is thread-safe.

@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @param encoding the encoding to be used for escaping. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 300, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0101", "text": "Lists a collection of apis associated with tags. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param filter [String] | Field | Supported operators | Supported functions | |-------------|------------------------|---------------------------------------------| | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | isCurrent | eq | substringof, contains, startswith, endswith | @param top [Integer] Number of records to return. @param skip [Integer] Number of records to skip. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [TagResourceCollection] which provide lazy access to pages of the response.", "label": 1, "domain": "code", "token_count": 330, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0102", "text": "Calcula o número de dias corridos entre a data base (\"Fixada\" em 07.10.1997) e a data de vencimento desejada. A partir de 22.02.2025, o fator retorna para '1000' adicionando- se '1' a cada dia subsequente a este fator até que chegue a 9999 novamente onde deve ser usada nova data base começando de 1000. Somente serão considerados válidos para pagamento os boletos com 3.000 fatores de vencimento anteriores e 5.500 fatores futuros, ambos em relação a data atual. Boletos fora deste controle não serão considerados validos para pagamento na rede bancária. Ex. Hoje é 13/03/2014 (fator 6.001) Limite para emissão ou pagamento de boletos vencido: 24/12/2005 (fator 3.000) Limite para emissão ou pagamento de boletos à vencer: 03/04/2029 (fator 2.501) @return [String] Contendo 4 dígitos @example Date.parse(2000-07-04).fator_vencimento #=> 1001", "label": 1, "domain": "code", "token_count": 306, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0103", "text": "Gets automatically arranged notification index of the target. When the target have unopened notifications, it returns unopened notifications first. Additionaly, it returns opened notifications unless unopened index size overs the limit. @api private @todo Is this switching the best solution? @param [Method] loading_unopened_index_method Method to load unopened index @param [Method] loading_opened_index_method Method to load opened index @param [Hash] options Options for notification index @option options [Integer] :limit (nil) Limit to query for notifications @option options [Boolean] :reverse (false) If notification index will be ordered as earliest first @option options [Boolean] :with_group_members (false) If notification index will include group members @option options [Boolean] :as_latest_group_member (false) If grouped notification will be shown as the latest group member (default is shown as the earliest member) @option options [String] :filtered_by_type (nil) Notifiable type for filter @option options [Object] :filtered_by_group (nil) Group instance for filter @option options [String] :filtered_by_group_type (nil) Group type for filter, valid with :filtered_by_group_id @option options [String] :filtered_by_group_id (nil) Group instance id for filter, valid with :filtered_by_group_type @option options [String] :filtered_by_key (nil) Key of the notification for filter @option options [Array|Hash] :custom_filter (nil) Custom notification filter (e.g. [\"created_at >= ?\", time.hour.ago]) @return [Array] Notification index of the target", "label": 1, "domain": "code", "token_count": 335, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0104", "text": "Returns OAuth2 client Arguments: - config: hash containing: - client, hash containing: - base_url: The base URL of the OAuth2 client. Ex: http://domain.com:8080 - process_login_url: the URL where to the OAuth2 server must redirect the user when authenticated. - login_url: the URL where the user must go to be redirected to OAuth2 server for authentication. - logout_url: the URL where the user must go so that his session is cleared, and he is unlogged from client. - default_redirection_url: default URL to redirect to after login / logout. Optional, default to '/'. - crypt_key: string, encryption key used to crypt information contained in the states. This is a symmetric key and must be kept secret. - sign_key: string, signature key used to sign (HMAC) issued states. This is a symmetric key and must be kept secret. - default_server: which server to use for default login when user access login_url (ex: 'facebook.com'). - servers: hash associating OAuth2 server ids (ex: \"facebook.com\") with a hash containing (for each): - server_authorize_endpoint: full URL, OAuth2 server token endpoint (ex: \"https://graph.facebook.com/oauth/authorize\"). - server_token_endpoint: full url, where to check the token (ex: \"https://graph.facebook.com/oauth/access_token\"). - client_id: the client id as registered by this OAuth2 server. - client_secret: shared secret between client and this OAuth2 server. - options: optional, hash associating OAuth2 server ids (ex: \"facebook.com\") with hash containing some options specific to the server. Not all servers have to be listed here, neither all options. Possible options: - valid_grant: a function which will replace the default one to check the grant is ok. You might want to use this shortcut if you have a faster way of checking than requesting the OAuth2 server with an HTTP request. - treat_access_token: a function which will replace the default one to do something with the access token. You will tipically use that function to set some info in session. - transform_token_response: a function which will replace the default one to obtain a hash containing the access_token from the OAuth2 server reply. This method should be provided if the OAuth2 server we are requesting does not return JSON encoded data.", "label": 1, "domain": "code", "token_count": 490, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0105", "text": "Checks the target source code for instances of \"smell type\" and returns true only if it can find one of them that matches. You can pass the smell type you want to check for as String or as Symbol: - :UtilityFunction - \"UtilityFunction\" It is recommended to pass this as a symbol like :UtilityFunction. However we don't enforce this. Additionally you can be more specific and pass in \"smell_details\" you want to check for as well e.g. \"name\" or \"count\" (see the examples below). The parameters you can check for are depending on the smell you are checking for. For instance \"count\" doesn't make sense everywhere whereas \"name\" does in most cases. If you pass in a parameter that doesn't exist (e.g. you make a typo like \"namme\") Reek will raise an ArgumentError to give you a hint that you passed something that doesn't make much sense. @param smell_type [Symbol, String] The \"smell type\" to check for. @param smell_details [Hash] A hash containing \"smell warning\" parameters @example Without smell_details reek_of(:FeatureEnvy) reek_of(:UtilityFunction) @example With smell_details reek_of(:UncommunicativeParameterName, name: 'x2') reek_of(:DataClump, count: 3) @example From a real spec expect(src).to reek_of(:DuplicateMethodCall, name: '@other.thing') @public @quality :reek:UtilityFunction", "label": 1, "domain": "code", "token_count": 314, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0106", "text": "Gets the Service Fabric application backup configuration information. Gets the Service Fabric backup configuration information for the application and the services and partitions under this application. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 397, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0107", "text": "@!group Actions @example Request syntax with placeholder values db_log_file.download({ marker: \"String\", number_of_lines: 1, }) @param [Hash] options ({}) @option options [String] :marker The pagination token provided in the previous request or \"0\". If the Marker parameter is specified the response includes only records beyond the marker until the end of the file or up to NumberOfLines. @option options [Integer] :number_of_lines The number of lines to download. If the number of lines specified results in a file over 1 MB in size, the file is truncated at 1 MB in size. If the NumberOfLines parameter is specified, then the block of lines returned can be from the beginning or the end of the log file, depending on the value of the Marker parameter. * If neither Marker or NumberOfLines are specified, the entire log file is returned up to a maximum of 10000 lines, starting with the most recent log entries first. * If NumberOfLines is specified and Marker is not specified, then the most recent lines from the end of the log file are returned. * If Marker is specified as \"0\", then the specified number of lines from the beginning of the log file are returned. * You can download the log file in blocks of lines by specifying the size of the block using the NumberOfLines parameter, and by specifying a value of \"0\" for the Marker parameter in your first request. Include the Marker value returned in the response as the Marker value for the next request, continuing until the AdditionalDataPending response element returns false. @return [Types::DownloadDBLogFilePortionDetails]", "label": 1, "domain": "code", "token_count": 333, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0108", "text": "The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

CallBack Schemas

Review Completion CallBack Sample

{
\"ReviewId\": \"\",
\"ModifiedOn\": \"2016-10-11T22:36:32.9934851Z\",
\"ModifiedBy\": \"\",
\"CallBackType\": \"Review\",
\"ContentId\": \"\",
\"Metadata\": {
\"adultscore\": \"0.xxx\",
\"a\": \"False\",
\"racyscore\": \"0.xxx\",
\"r\": \"True\"
},
\"ReviewerResultTags\": {
\"a\": \"False\",
\"r\": \"True\"
}
}

. @param team_name [String] Your team name. @param review_id [String] Id of the review. @param timescale [Integer] Timescale of the video you are adding frames to. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.", "label": 1, "domain": "code", "token_count": 303, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0109", "text": "Like {@link module:lamb.partial|partial} will build a partially applied function and it will accept placeholders.
The difference is that the bound arguments will be appended to the ones received by the resulting function. @example Explaining the difference with partial: var f1 = _.partial(_.list, [\"a\", \"b\", \"c\"]); var f2 = _.partialRight(_.list, [\"a\", \"b\", \"c\"]); f1(\"d\", \"e\") // => [\"a\", \"b\", \"c\", \"d\", \"e\"] f2(\"d\", \"e\") // => [\"d\", \"e\", \"a\", \"b\", \"c\"] @example Explaining placeholder substitutions: var __ = _.__; var f1 = _.partial(_.list, [\"a\", __, __, \"d\"]); var f2 = _.partialRight(_.list, [\"a\", __, __, \"d\"]); f1(\"b\", \"c\", \"e\") // => [\"a\", \"b\", \"c\", \"d\", \"e\"] f2(\"b\", \"c\", \"e\") // => [\"b\", \"a\", \"c\", \"e\", \"d\"] @memberof module:lamb @category Function @see {@link module:lamb.partial|partial} @see {@link module:lamb.asPartial|asPartial} @see {@link module:lamb.curry|curry}, {@link module:lamb.curryRight|curryRight} @see {@link module:lamb.curryable|curryable}, {@link module:lamb.curryableRight|curryableRight} @see {@link module:lamb.__|__} The placeholder object. @param {Function} fn @param {Array} args @since 0.52.0 @returns {Function}", "label": 1, "domain": "code", "token_count": 390, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0110", "text": "Calculate the flown through area and the wetted perimeter of both outer embankments. Note that each outer embankment lies beyond its foreland and that all water flowing exactly above the a embankment is added to |AVR|. The theoretical surface seperating water above the foreland from water above its embankment is not contributing to |UVR|. Required control parameters: |HM| |BNVR| Required derived parameter: |HV| Required flux sequence: |H| Calculated flux sequence: |AVR| |UVR| Examples: Generally, right trapezoids are assumed. Here, for simplicity, both forelands are assumed to be symmetrical. Their smaller bases (bottoms) hava a length of 2 meters, their non-vertical legs show an inclination of 1 meter per 4 meters, and their height (depths) is 1 meter. Both forelands lie 1 meter above the main channels bottom. Generally, a triangles are assumed, with the vertical side seperating the foreland from its outer embankment. Here, for simplicity, both forelands are assumed to be symmetrical. Their inclinations are 1 meter per 4 meters and their lowest point is 1 meter above the forelands bottom and 2 meters above the main channels bottom: >>> from hydpy.models.lstream import * >>> parameterstep() >>> hm(1.0) >>> bnvr(4.0) >>> derived.hv(1.0) The first example deals with moderate high flow conditions, where water flows over the forelands, but not over their outer embankments (|HM| < |H| < (|HM| + |HV|)): >>> fluxes.h = 1.5 >>> model.calc_avr_uvr_v1() >>> fluxes.avr avr(0.0, 0.0) >>> fluxes.uvr uvr(0.0, 0.0) The second example deals with extreme high flow conditions, where water flows over the both foreland and their outer embankments ((|HM| + |HV|) < |H|): >>> fluxes.h = 2.5 >>> model.calc_avr_uvr_v1() >>> fluxes.avr avr(0.5, 0.5) >>> fluxes.uvr uvr(2.061553, 2.061553)", "label": 1, "domain": "code", "token_count": 494, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0111", "text": "Get closest element matching the tested selector or tested element traveling up the DOM tree from element to limit. @param {(string|Array|NodeList|HTMLCollection|Element)} element - First tested element. Note that it'll be passed to getElement to ensure there's only one. @param {(string|Element)} tested - The selector or dom element to match. @param {(string|Node)} [limit=document] - Returns false when this selector or element is reached. @return {(Element|boolean)} matchedElement - The matched element or false. @example //esnext import { createElement, append, closest } from 'chirashi' const maki = createElement('.maki') const cheese = createElement('.cheese') append(maki, cheese) append(cheese, '.avocado') append(document.body, maki) closest('.avocado', '.maki') //returns:
closest('.avocado', '.maki', '.cheese') //returns: false @example //es5 var maki = Chirashi.createElement('.maki') var cheese = Chirashi.createElement('.cheese') Chirashi.append(maki, cheese) Chirashi.append(cheese, '.avocado') Chirashi.append(document.body, maki) Chirashi.closest('.avocado', '.maki') //returns:
Chirashi.closest('.avocado', '.maki', '.cheese') //returns: false", "label": 1, "domain": "code", "token_count": 310, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0112", "text": "Sends a health report on the Service Fabric partition. Reports health state of the specified Service Fabric partition. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Partition, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetPartitionHealth and check that the report appears in the HealthEvents section. @param partition_id The identity of the partition. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.", "label": 1, "domain": "code", "token_count": 437, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0113", "text": "Raises ValidationException if value is not a int. Returns value, so it can be used inline in an expression: print(2 + validateInt(your_number)) Note that since int() and ignore leading or trailing whitespace when converting a string to a number, so does this validateNum(). * value (str): The value being validated as an int or float. * blank (bool): If True, a blank string will be accepted. Defaults to False. * strip (bool, str, None): If None, whitespace is stripped from value. If a str, the characters in it are stripped from value. If False, nothing is stripped. * allowlistRegexes (Sequence, None): A sequence of regex str that will explicitly pass validation, even if they aren't numbers. * blocklistRegexes (Sequence, None): A sequence of regex str or (regex_str, response_str) tuples that, if matched, will explicitly fail validation. * _numType (str): One of 'num', 'int', or 'float' for the kind of number to validate against, where 'num' means int or float. * min (int, float): The (inclusive) minimum value for the value to pass validation. * max (int, float): The (inclusive) maximum value for the value to pass validation. * lessThan (int, float): The (exclusive) minimum value for the value to pass validation. * greaterThan (int, float): The (exclusive) maximum value for the value to pass validation. * excMsg (str): A custom message to use in the raised ValidationException. If you specify min or max, you cannot also respectively specify lessThan or greaterThan. Doing so will raise PySimpleValidateException. >>> import pysimplevalidate as pysv >>> pysv.validateInt('42') 42 >>> pysv.validateInt('forty two') Traceback (most recent call last): ... pysimplevalidate.ValidationException: 'forty two' is not an integer.", "label": 1, "domain": "code", "token_count": 408, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0114", "text": "add an animation
For fixed-sized cell sprite sheet, the index list must follow the logic as per the following example :
@name addAnimation @memberOf me.Sprite.prototype @function @param {String} name animation id @param {Number[]|String[]|Object[]} index list of sprite index or name defining the animation. Can also use objects to specify delay for each frame, see below @param {Number} [animationspeed] cycling speed for animation in ms @return {Number} frame amount of frame added to the animation (delay between each frame). @see me.Sprite#animationspeed @example // walking animation this.addAnimation(\"walk\", [ 0, 1, 2, 3, 4, 5 ]); // standing animation this.addAnimation(\"stand\", [ 11, 12 ]); // eating animation this.addAnimation(\"eat\", [ 6, 6 ]); // rolling animation this.addAnimation(\"roll\", [ 7, 8, 9, 10 ]); // slower animation this.addAnimation(\"roll\", [ 7, 8, 9, 10 ], 200); // or get more specific with delay for each frame. Good solution instead of repeating: this.addAnimation(\"turn\", [{ name: 0, delay: 200 }, { name: 1, delay: 100 }]) // can do this with atlas values as well: this.addAnimation(\"turn\", [{ name: \"turnone\", delay: 200 }, { name: \"turntwo\", delay: 100 }]) // define an dying animation that stop on the last frame this.addAnimation(\"die\", [{ name: 3, delay: 200 }, { name: 4, delay: 100 }, { name: 5, delay: Infinity }]) // set the standing animation as default this.setCurrentAnimation(\"stand\");", "label": 1, "domain": "code", "token_count": 394, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0115", "text": "/* Use ReferenceIdentityMap (with weak key and hard value setting) instead of WeakHashMap to hold anonymous field values. Here is an snip of the mail from Andy Malakov: I found that usage of database identity in Java produces quite interesting problem in OJB: In my application all persistent Java objects use database identity instead of Java reference identity (i.e. Persistable.equals() is redefined so that two persistent objects are the same if they have the same primary key and top-level class). In OJB, for each field declared in repository there is dedicated instance of AnonymousPersistentField that stores object-to-field-value mapping in WeakHashMap (in fkCache attribute). Despite usage of cache (ObjectCachePerBrokerImpl in my case) it is possible that identical DB objects will end up as different Java objects during retrieval of complex objects. Now imagine what happens when two identical instances are retrieved: 1) When first instance is retrieved it stores its foreign keys in AnonymousPersistentField.fkCache under instance's identity. (happens in RowReaderDefaultImpl.buildWithReflection()) 2) When second object is retrieved and stored in fkCache, first instance is probably still cached [WeakHashMap entries are cleaned up only during GC]. Since keys are identical WeakHashMap only updates entry value and DOES NOT update entry key. 3) If Full GC happens after that moment it will dispose fcCache entry if the FIRST reference becomes soft-referenced only. ", "label": 1, "domain": "code", "token_count": 300, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0116", "text": "local helper function for creating filter expressions for all group level requests /* Let G be the group ID for the root for the first missing member, e.g. G = /A/B/C/D/.../W/X/, and (optional) startIndex_Missing > 0 for the children of X. Let P_1, P_2, ... be the properties for the different grouping levels. Then, for every level l, 1 <= l <= iAutoExpandGroupsToLevel, the filter expression is // every such expression is an instance of aLevelFilterCondition, see in code below [0] ( P_1 = A and P_2 = B and .. P_l >= X ) [1] or ( P_1 = A and P_2 = B and .. P_(l-1) > W ) // every such line is an instance of aIntermediateLevelFilterCondition, see in code below ... [N] or ( P_1 > A ) assuming that P_1, P_2, ... are all to be sorted in ascending order. For any deviation, replace > with <. Additional rules considered: (R1) For every auto-expand level with a higher number than the level of the first missing member, the strict comparison (< or >) has to include equality (<= or >=) to match all needed members of these deep levels. (R2) If startIndex_Missing > 0, then the R1 does not apply. here, (R2.1) the strict comparison (< or >) must be replaced by equality (=) (R2.2) the partial filter expression for every auto-expand level with a higher number than the level of the first missing member must be extended by a condition P_Y > Y, where Y is the child of X at position startIndex_Missing - 1, and P_Y is the property for this grouping level.", "label": 1, "domain": "code", "token_count": 386, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0117", "text": "Create a UUID instance from 16-bit UUID data.
 // Prepare a byte array containing 32-bit UUID data (little endian). byte[] data = new byte[] { (byte)0xAB, (byte)0xCD }; // Create a UUID instance from the byte array. UUID uuid = UUIDCreator.{@link #from16(byte[], int, boolean) from16}(data, 0, true); // uuid represents 0000cdab-0000-1000-8000-00805f9b34fb. 

 // Prepare a byte array containing 32-bit UUID data (big endian). byte[] data = new byte[] { (byte)0xCD, (byte)0xAB }; // Create a UUID instance from the byte array. UUID uuid = UUIDCreator.{@link #from16(byte[], int, boolean) from16}(data, 0, false); // uuid represents 0000cdab-0000-1000-8000-00805f9b34fb. 
@param data A byte array containing 16-bit UUID data. @param offset The offset from which 16-bit UUID data should be read. @param littleEndian {@code true} if the 16-bit UUID data is stored in little endian. {@code false} for big endian. @return A UUID instance. {@code null} is returned when {@code data} is {@code null} or {@code offset} is not valid.", "label": 1, "domain": "code", "token_count": 445, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0118", "text": "Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError. @param detect_orientation [Boolean] Whether detect the text orientation in the image. With detectOrientation=true the OCR service tries to detect the image orientation and correct it before further processing (e.g. if it's upside-down). @param url [String] Publicly reachable URL of an image. @param language [OcrLanguages] The BCP-47 language code of the text to be detected in the image. The default value is 'unk'. Possible values include: 'unk', 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el', 'hu', 'it', 'ja', 'ko', 'nb', 'pl', 'pt', 'ru', 'es', 'sv', 'tr', 'ar', 'ro', 'sr-Cyrl', 'sr-Latn', 'sk' @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [OcrResult] operation results.", "label": 1, "domain": "code", "token_count": 301, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0119", "text": "

Perform an HTML 4 level 1 (XML-style) escape operation on a String input, writing results to a Writer.

Level 1 means this method will only escape the five markup-significant characters: <, >, &, " and '. It is called XML-style in order to link it with JSP's escapeXml attribute in JSTL's <c:out ... /> tags.

Note this method may not produce the same results as {@link #escapeHtml5Xml(String, Writer)} because it will escape the apostrophe as &#39;, whereas in HTML5 there is a specific NCR for such character (&apos;).

This method calls {@link #escapeHtml(String, Writer, HtmlEscapeType, HtmlEscapeLevel)} with the following preconfigured values:

  • type: {@link org.unbescape.html.HtmlEscapeType#HTML4_NAMED_REFERENCES_DEFAULT_TO_DECIMAL}
  • level: {@link org.unbescape.html.HtmlEscapeLevel#LEVEL_1_ONLY_MARKUP_SIGNIFICANT}

This method is thread-safe.

@param text the String to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 428, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0120", "text": "

Perform an HTML 4 level 1 (XML-style) escape operation on a Reader input, writing results to a Writer.

Level 1 means this method will only escape the five markup-significant characters: <, >, &, " and '. It is called XML-style in order to link it with JSP's escapeXml attribute in JSTL's <c:out ... /> tags.

Note this method may not produce the same results as {@link #escapeHtml5Xml(Reader, Writer)} because it will escape the apostrophe as &#39;, whereas in HTML5 there is a specific NCR for such character (&apos;).

This method calls {@link #escapeHtml(Reader, Writer, HtmlEscapeType, HtmlEscapeLevel)} with the following preconfigured values:

  • type: {@link org.unbescape.html.HtmlEscapeType#HTML4_NAMED_REFERENCES_DEFAULT_TO_DECIMAL}
  • level: {@link org.unbescape.html.HtmlEscapeLevel#LEVEL_1_ONLY_MARKUP_SIGNIFICANT}

This method is thread-safe.

@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 433, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0121", "text": "Compute Permutation Entropy of a given time series x, specified by permutation order n and embedding lag tau. Parameters ---------- x list a time series n integer Permutation order tau integer Embedding lag Returns ---------- PE float permutation entropy Notes ---------- Suppose the given time series is X =[x(1),x(2),x(3),...,x(N)]. We first build embedding matrix Em, of dimension(n*N-n+1), such that the ith row of Em is x(i),x(i+1),..x(i+n-1). Hence the embedding lag and the embedding dimension are 1 and n respectively. We build this matrix from a given time series, X, by calling pyEEg function embed_seq(x,1,n). We then transform each row of the embedding matrix into a new sequence, comprising a set of integers in range of 0,..,n-1. The order in which the integers are placed within a row is the same as those of the original elements:0 is placed where the smallest element of the row was and n-1 replaces the largest element of the row. To calculate the Permutation entropy, we calculate the entropy of PeSeq. In doing so, we count the number of occurrences of each permutation in PeSeq and write it in a sequence, RankMat. We then use this sequence to calculate entropy by using Shannon's entropy formula. Permutation entropy is usually calculated with n in range of 3 and 7. References ---------- Bandt, Christoph, and Bernd Pompe. \"Permutation entropy: a natural complexity measure for time series.\" Physical Review Letters 88.17 (2002): 174102. Examples ---------- >>> import pyeeg >>> x = [1,2,4,5,12,3,4,5] >>> pyeeg.permutation_entropy(x,5,1) 2.0", "label": 1, "domain": "code", "token_count": 381, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0122", "text": "Creates a new TableService object. If no connection string or storageaccount and storageaccesskey are provided, the AZURE_STORAGE_CONNECTION_STRING or AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY environment variables will be used. @class The TableService object allows you to peform management operations with the Microsoft Azure Table Service. The Table Service stores data in rows of key-value pairs. A table is composed of multiple rows, and each row contains key-value pairs. There is no schema, so each row in a table may store a different set of keys. For more information on the Table Service, as well as task focused information on using it from a Node.js application, see [How to Use the Table Service from Node.js](http://azure.microsoft.com/en-us/documentation/articles/storage-nodejs-how-to-use-table-storage/). The following defaults can be set on the Table service. defaultTimeoutIntervalInMs The default timeout interval, in milliseconds, to use for request made via the Table service. defaultClientRequestTimeoutInMs The default timeout of client requests, in milliseconds, to use for the request made via the Table service. defaultMaximumExecutionTimeInMs The default maximum execution time across all potential retries, for requests made via the Table service. defaultLocationMode The default location mode for requests made via the Table service. defaultPayloadFormat The default payload format for requests made via the Table service. useNagleAlgorithm Determines whether the Nagle algorithm is used for requests made via the Table service.; true to use the Nagle algorithm; otherwise, false. The default value is false. enableGlobalHttpAgent Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use http(s).Agent({keepAlive:true}). @constructor @extends {StorageServiceClient} @param {string} [storageAccountOrConnectionString] The storage account or the connection string. @param {string} [storageAccessKey] The storage access key. @param {string|object} [host] The host address. To define primary only, pass a string. Otherwise 'host.primaryHost' defines the primary host and 'host.secondaryHost' defines the secondary host. @param {string} [sasToken] The Shared Access Signature token. @param {string} [endpointSuffix] The endpoint suffix.", "label": 1, "domain": "code", "token_count": 471, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0123", "text": "A callback hook set to run every time after a user is set. This callback is triggered the first time one of those three events happens during a request: :authentication, :fetch (from session) and :set_user (when manually set). You can supply as many hooks as you like, and they will be run in order of declaration. If you want to run the callbacks for a given scope and/or event, you can specify them as options. See parameters and example below. Parameters: Some options which specify when the callback should be executed scope - Executes the callback only if it matches the scope(s) given only - Executes the callback only if it matches the event(s) given except - Executes the callback except if it matches the event(s) given A block where you can set arbitrary logic to run every time a user is set Block Parameters: |user, auth, opts| user - The user object that is being set auth - The raw authentication proxy object. opts - any options passed into the set_user call including :scope Example: Warden::Manager.after_set_user do |user,auth,opts| scope = opts[:scope] if auth.session[\"#{scope}.last_access\"].to_i > (Time.now - 5.minutes) auth.logout(scope) throw(:warden, :scope => scope, :reason => \"Times Up\") end auth.session[\"#{scope}.last_access\"] = Time.now end Warden::Manager.after_set_user :except => :fetch do |user,auth,opts| user.login_count += 1 end :api: public", "label": 1, "domain": "code", "token_count": 323, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0124", "text": "Builds a partially applied function.
The {@link module:lamb.__|__} object can be used as a placeholder for arguments.
@example var __ = _.__; var users = [ {id: 1, name: \"John\", active: true, confirmedMail: true}, {id: 2, name: \"Jane\", active: true, confirmedMail: false}, {id: 3, name: \"Mario\", active: false, confirmedMail: false} ]; var isKeyTrue = _.partial(_.hasKeyValue, [__, true]); var isActive = isKeyTrue(\"active\"); var hasConfirmedMail = isKeyTrue(\"confirmedMail\"); _.map(users, isActive) // => [true, true, false] _.map(users, hasConfirmedMail) // => [true, false, false] @memberof module:lamb @category Function @see {@link module:lamb.partialRight|partialRight} @see {@link module:lamb.asPartial|asPartial} @see {@link module:lamb.curry|curry}, {@link module:lamb.curryRight|curryRight} @see {@link module:lamb.curryable|curryable}, {@link module:lamb.curryableRight|curryableRight} @see {@link module:lamb.__|__} The placeholder object. @since 0.1.0 @param {Function} fn @param {Array} args @returns {Function}", "label": 1, "domain": "code", "token_count": 302, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0125", "text": "add page numbers to the PDF For unicode text, a unicode font(s) must first be registered. the registered font(s) must supply the subset of characters used in the text. UNICODE IS AN ISSUE WITH THE PDF FORMAT - USE CAUSION. options:: a Hash of options setting the behavior and format of the page numbers: - :number_format a string representing the format for page number. defaults to ' - %s - ' (allows for letter numbering as well, such as \"a\", \"b\"...). - :location an Array containing the location for the page numbers, can be :top, :bottom, :top_left, :top_right, :bottom_left, :bottom_right or :center (:center == full page). defaults to [:top, :bottom]. - :start_at an Integer that sets the number for first page number. also accepts a letter (\"a\") for letter numbering. defaults to 1. - :margin_from_height a number (PDF points) for the top and bottom margins. defaults to 45. - :margin_from_side a number (PDF points) for the left and right margins. defaults to 15. - :page_range a range of pages to be numbered (i.e. (2..-1) ) defaults to all the pages (nil). Remember to set the :start_at to the correct value. the options Hash can also take all the options for {Page_Methods#textbox}. defaults to font: :Helvetica, font_size: 12 and no box (:border_width => 0, :box_color => nil).", "label": 1, "domain": "code", "token_count": 321, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0126", "text": "Extract a map of error details from a potentially partially successful REST request. Return an empty map if @partial_success is not enabled. The keys in this map are [error_code, error_message] pairs, and the values are a list of stringified indexes of log entries that failed due to this error. A sample error.body looks like: { \"error\": { \"code\": 403, \"message\": \"User not authorized.\", \"status\": \"PERMISSION_DENIED\", \"details\": [ { \"@type\": \"type.googleapis.com/google.logging.v2.WriteLogEntriesPar tialErrors\", \"logEntryErrors\": { \"0\": { \"code\": 7, \"message\": \"User not authorized.\" }, \"1\": { \"code\": 3, \"message\": \"Log name contains illegal character :\" }, \"3\": { \"code\": 3, \"message\": \"Log name contains illegal character :\" } } }, { \"@type\": \"type.googleapis.com/google.rpc.DebugInfo\", \"detail\": ... } ] } } The root level \"code\", \"message\", and \"status\" simply match the root cause of the first failed log entry. For example, if we switched the order of the log entries, then we would get: { \"error\" : { \"code\" : 400, \"message\" : \"Log name contains illegal character :\", \"status\" : \"INVALID_ARGUMENT\", \"details\": ... } } We will ignore it anyway and look at the details instead which includes info for all failed log entries. In this example, the logEntryErrors that we care are: { \"0\": { \"code\": 7, \"message\": \"User not authorized.\" }, \"1\": { \"code\": 3, \"message\": \"Log name contains illegal character :\" }, \"3\": { \"code\": 3, \"message\": \"Log name contains illegal character :\" } } The ultimate map that is constructed is: { [7, 'User not authorized.']: ['0'], [3, 'Log name contains illegal character :']: ['1', '3'] }", "label": 1, "domain": "code", "token_count": 425, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0127", "text": "Find running porcesses @function $os~ps @param {number|object|function} [filterer] - Without arguments, ps returns all the running processes. The filterer allows selecting a subset. @returns {array|oject} - The list of matching processes, or the requested process object if filterer was a number @example // Find all processes $os.ps(); // => [{ user: 'root', pid: 1, ppid: 0, cmd: 'supervisord', full_cmd: '/usr/bin/python /usr/bin/supervisord' }, { user: 'root', pid: 17291, ppid: 1, cmd: 'sshd', full_cmd: '/usr/sbin/sshd -D' }, { user: 'root', pid: 17293, ppid: 1, cmd: 'cron', full_cmd: '/usr/sbin/cron -f -L 15' }] // Find specific pid $ps.ps(17291); // => { user: 'root', pid: 17291, ppid: 1, cmd: 'sshd', full_cmd: '/usr/sbin/sshd -D' } // Find by parent pid: $os.ps({ppid: 1}); // => [{ user: 'root', pid: 17291, ppid: 1, cmd: 'sshd', full_cmd: '/usr/sbin/sshd -D' }, { user: 'root', pid: 17293, ppid: 1, cmd: 'cron', full_cmd: '/usr/sbin/cron -f -L 15' }] // Filter using a function $os.ps(process => process.full_cmd.match(/ssh/) && process.user === 'root') // => [{ user: 'root', pid: 17291, ppid: 1, cmd: 'sshd', full_cmd: '/usr/sbin/sshd -D' }]", "label": 1, "domain": "code", "token_count": 402, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0128", "text": "Creates the view used to edit permissions. To create the view, data in the following format is passed to the UI in the objects field: .. code-block:: python { \"type\": \"tree-toggle\", \"action\": \"set_permission\", \"tree\": [ { \"checked\": true, \"name\": \"Workflow 1 Name\", \"id\": \"workflow1\", \"children\": [ { \"checked\": true, \"name\": \"Task 1 Name\", \"id\": \"workflow1..task1\", \"children\": [] }, { \"checked\": false, \"id\": \"workflow1..task2\", \"name\": \"Task 2 Name\", \"children\": [] } ] }, { \"checked\": true, \"name\": \"Workflow 2 Name\", \"id\": \"workflow2\", \"children\": [ { \"checked\": true, \"name\": \"Workflow 2 Lane 1 Name\", \"id\": \"workflow2.lane1\", \"children\": [ { \"checked\": true, \"name\": \"Workflow 2 Task 1 Name\", \"id\": \"workflow2.lane1.task1\", \"children\": [] }, { \"checked\": false, \"name\": \"Workflow 2 Task 2 Name\", \"id\": \"workflow2.lane1.task2\", \"children\": [] } ] } ] } ] } \"type\" field denotes that the object is a tree view which has elements that can be toggled. \"action\" field is the \"name\" field is the human readable name. \"id\" field is used to make requests to the backend. \"checked\" field shows whether the role has the permission or not. \"children\" field is the sub-permissions of the permission.", "label": 1, "domain": "code", "token_count": 351, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0129", "text": "Return the header of a regular or auxiliary parameter control file. The header contains the default coding information, the import command for the given model and the actual parameter and simulation step sizes. The first example shows that, if you pass the model argument as a string, you have to take care that this string makes sense: >>> from hydpy.core.parametertools import get_controlfileheader, Parameter >>> from hydpy import Period, prepare_model, pub, Timegrids, Timegrid >>> print(get_controlfileheader(model='no model class', ... parameterstep='-1h', ... simulationstep=Period('1h'))) # -*- coding: utf-8 -*- from hydpy.models.no model class import * simulationstep('1h') parameterstep('-1h') The second example shows the saver option to pass the proper model object. It also shows that function |get_controlfileheader| tries to gain the parameter and simulation step sizes from the global |Timegrids| object contained in the module |pub| when necessary: >>> model = prepare_model('lland_v1') >>> _ = Parameter.parameterstep('1d') >>> pub.timegrids = '2000.01.01', '2001.01.01', '1h' >>> print(get_controlfileheader(model=model)) # -*- coding: utf-8 -*- from hydpy.models.lland_v1 import * simulationstep('1h') parameterstep('1d') ", "label": 1, "domain": "code", "token_count": 335, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0130", "text": "Upload files for the project to Open Humans member accounts. If using a master access token and not specifying member ID: (1) Files should be organized in subdirectories according to project member ID, e.g.: main_directory/01234567/data.json main_directory/12345678/data.json main_directory/23456789/data.json (2) The metadata CSV should have the following format: 1st column: Project member ID 2nd column: filenames 3rd & additional columns: Metadata fields (see below) If uploading for a specific member: (1) The local directory should not contain subdirectories. (2) The metadata CSV should have the following format: 1st column: filenames 2nd & additional columns: Metadata fields (see below) The default behavior is to overwrite files with matching filenames on Open Humans, but not otherwise delete files. (Use --safe or --sync to change this behavior.) If included, the following metadata columns should be correctly formatted: 'tags': should be comma-separated strings 'md5': should match the file's md5 hexdigest 'creation_date', 'start_date', 'end_date': ISO 8601 dates or datetimes Other metedata fields (e.g. 'description') can be arbitrary strings. Either specify sync as True or safe as True but not both. :param directory: This field is the target directory from which data will be uploaded. :param metadata_csv: This field is the filepath of the metadata csv file. :param master_token: This field is the master access token for the project. It's default value is None. :param member: This field is specific member whose project data is downloaded. It's default value is None. :param access_token: This field is the user specific access token. It's default value is None. :param safe: This boolean field will overwrite matching filename. It's default value is False. :param sync: This boolean field will delete files on Open Humans that are not in the local directory. It's default value is False. :param max_size: This field is the maximum file size. It's default value is None. :param mode: This field takes three value default, sync, safe. It's default value is 'default'. :param verbose: This boolean field is the logging level. It's default value is False. :param debug: This boolean field is the logging level. It's default value is False.", "label": 1, "domain": "code", "token_count": 496, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0131", "text": "@example Request syntax with placeholder values mfadevice = user.enable_mfa({ serial_number: \"serialNumberType\", # required authentication_code_1: \"authenticationCodeType\", # required authentication_code_2: \"authenticationCodeType\", # required }) @param [Hash] options ({}) @option options [required, String] :serial_number The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the device ARN. This parameter allows (through its [regex pattern][1]) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@:/- [1]: http://wikipedia.org/wiki/regex @option options [required, String] :authentication_code_1 An authentication code emitted by the device. The format for this parameter is a string of six digits. Submit your request immediately after generating the authentication codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device becomes out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can [resync the device][1]. [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html @option options [required, String] :authentication_code_2 A subsequent authentication code emitted by the device. The format for this parameter is a string of six digits. Submit your request immediately after generating the authentication codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device becomes out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can [resync the device][1]. [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html @return [MfaDevice]", "label": 1, "domain": "code", "token_count": 418, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0132", "text": "Negotiate an SSH2 session, and optionally verify the server's host key and authenticate using a password or private key. This is a shortcut for L{start_client}, L{get_remote_server_key}, and L{Transport.auth_password} or L{Transport.auth_publickey}. Use those methods if you want more control. You can use this method immediately after creating a Transport to negotiate encryption with a server. If it fails, an exception will be thrown. On success, the method will return cleanly, and an encrypted session exists. You may immediately call L{open_channel} or L{open_session} to get a L{Channel} object, which is used for data transfer. @note: If you fail to supply a password or private key, this method may succeed, but a subsequent L{open_channel} or L{open_session} call may fail because you haven't authenticated yet. @param hostkey: the host key expected from the server, or C{None} if you don't want to do host key verification. @type hostkey: L{PKey} @param username: the username to authenticate as. @type username: str @param password: a password to use for authentication, if you want to use password authentication; otherwise C{None}. @type password: str @param pkey: a private key to use for authentication, if you want to use private key authentication; otherwise C{None}. @type pkey: L{PKey} @raise SSHException: if the SSH2 negotiation fails, the host key supplied by the server is incorrect, or authentication fails.", "label": 1, "domain": "code", "token_count": 336, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0133", "text": "Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxSvgCanvas2D Extends to implement a canvas for SVG. This canvas writes all calls as SVG output to the given SVG root node. (code) var svgDoc = mxUtils.createXmlDocument(); var root = (svgDoc.createElementNS != null) ? svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg'); if (svgDoc.createElementNS == null) { root.setAttribute('xmlns', mxConstants.NS_SVG); root.setAttribute('xmlns:xlink', mxConstants.NS_XLINK); } else { root.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', mxConstants.NS_XLINK); } var bounds = graph.getGraphBounds(); root.setAttribute('width', (bounds.x + bounds.width + 4) + 'px'); root.setAttribute('height', (bounds.y + bounds.height + 4) + 'px'); root.setAttribute('version', '1.1'); svgDoc.appendChild(root); var svgCanvas = new mxSvgCanvas2D(root); (end) A description of the public API is available in . To disable anti-aliasing in the output, use the following code. (code) graph.view.canvas.ownerSVGElement.setAttribute('shape-rendering', 'crispEdges'); (end) Or set the respective attribute in the SVG element directly. Constructor: mxSvgCanvas2D Constructs a new SVG canvas. Parameters: root - SVG container for the output. styleEnabled - Optional boolean that specifies if a style section should be added. The style section sets the default font-size, font-family and stroke-miterlimit globally. Default is false.", "label": 1, "domain": "code", "token_count": 383, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0134", "text": "/* Old helpers that got replaced by robust functions provided by the UI5 ODataModel /* renderPropertyKeyValue : function(sKeyValue, sPropertyEDMTypeName) { if (typeof sKeyValue == \"string\" && sKeyValue.charAt(0) == \"'\") throw \"Illegal property value starting with a quote\"; switch (sPropertyEDMTypeName) { case 'Edm.String': return \"'\" + sKeyValue + \"'\"; case 'Edm.DateTime': return \"datetime'\" + sKeyValue + \"'\"; case 'Edm.Guid': return \"guid'\" + sKeyValue + \"'\"; case 'Edm.Time': return \"time'\" + sKeyValue + \"'\"; case 'Edm.DateTimeOffset': return \"datetimeoffset'\" + sKeyValue + \"'\"; default: return sKeyValue; } }, renderPropertyFilterValue : function(sFilterValue, sPropertyEDMTypeName) { if (typeof sFilterValue == \"string\" && sFilterValue.charAt(0) == \"'\") throw \"Illegal property value starting with a quote\"; switch (sPropertyEDMTypeName) { case 'Edm.String': return \"'\" + sFilterValue + \"'\"; case 'Edm.DateTime': return \"datetime'\" + sFilterValue + \"'\"; case 'Edm.Guid': return \"guid'\" + sFilterValue + \"'\"; case 'Edm.Time': return \"time'\" + sFilterValue + \"'\"; case 'Edm.DateTimeOffset': return \"datetimeoffset'\" + sFilterValue + \"'\"; default: return sFilterValue; } },", "label": 1, "domain": "code", "token_count": 310, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0135", "text": "Compute Pgen for all seqs consistent with regular expression regex_seq. Computes Pgen for a (limited vocabulary) regular expression of CDR3 amino acid sequences, conditioned on the V genes/alleles indicated in V_usage_mask_in and the J genes/alleles in J_usage_mask_in. Please note that this function will list out all the sequences that correspond to the regular expression and then calculate the Pgen of each sequence in succession. THIS CAN BE SLOW. Consider defining a custom alphabet to represent any undetermined amino acids as this will greatly speed up the computations. For example, if the symbol ^ is defined as [AGR] in a custom alphabet, then instead of running compute_regex_CDR3_template_pgen('CASS[AGR]SARPEQFF', ppp), which will compute Pgen for 3 sequences, the single sequence 'CASS^SARPEQFF' can be considered. (Examples are TCRB sequences/model) Parameters ---------- regex_seq : str The regular expression string that represents the CDR3 sequences to be listed then their Pgens computed and summed. V_usage_mask_in : str or list An object to indicate which V alleles should be considered. The default input is None which returns the list of all productive V alleles. J_usage_mask_in : str or list An object to indicate which J alleles should be considered. The default input is None which returns the list of all productive J alleles. print_warnings : bool Determines whether warnings are printed or not. Default ON. raise_overload_warning : bool A flag to warn of more than 10000 seqs corresponding to the regex_seq Returns ------- pgen : float The generation probability (Pgen) of the sequence Examples -------- >>> generation_probability.compute_regex_CDR3_template_pgen('CASS[AGR]SARPEQFF') 8.1090898050318022e-10 >>> generation_probability.compute_regex_CDR3_template_pgen('CASSAX{0,5}SARPEQFF') 6.8468778040965569e-10", "label": 1, "domain": "code", "token_count": 422, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0136", "text": "Lists a collection of the members of the group, specified by its identifier. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param group_id [String] Group identifier. Must be unique in the current API Management service instance. @param filter [String] | Field | Supported operators | Supported functions | |------------------|------------------------|-----------------------------------| | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | state | eq | N/A | | registrationDate | ge, le, eq, ne, gt, lt | N/A | | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | @param top [Integer] Number of records to return. @param skip [Integer] Number of records to skip. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 307, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0137", "text": "Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. @param resource_group_name [String] The name of the Azure resource group that contains the Data Lake Analytics account. @param account_name [String] The name of the Data Lake Analytics account for which to list Azure Storage accounts. @param filter [String] The OData filter. Optional. @param top [Integer] The number of items to return. Optional. @param skip [Integer] The number of items to skip over before returning elements. Optional. @param expand [String] OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. @param select [String] OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. @param orderby [String] OrderBy clause. One or more comma-separated expressions with an optional \"asc\" (the default) or \"desc\" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. @param count [Boolean] The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. @param search [String] A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. @param format [String] The desired return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [DataLakeAnalyticsAccountListStorageAccountsResult] which provide lazy access to pages of the response.", "label": 1, "domain": "code", "token_count": 426, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0138", "text": "

Perform an XML 1.1 level 1 (only markup-significant chars) escape operation on a String input, writing results to a Writer.

Level 1 means this method will only escape the five markup-significant characters which are predefined as Character Entity References in XML: <, >, &, " and '.

This method calls {@link #escapeXml11(String, Writer, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:

  • type: {@link org.unbescape.xml.XmlEscapeType#CHARACTER_ENTITY_REFERENCES_DEFAULT_TO_HEXA}
  • level: {@link org.unbescape.xml.XmlEscapeLevel#LEVEL_1_ONLY_MARKUP_SIGNIFICANT}

This method is thread-safe.

@param text the String to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 326, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0139", "text": "Create a Lambert Conformal Conic Projection based Spatial Reference. The params passed in construction should include the following properties:
-wkid: well-known id
-semi_major: ellipsoidal semi-major axis in meter
-unit: meters per unit
-inverse_flattening: inverse of flattening of the ellipsoid where 1/f = a/(a - b)
-standard_parallel_1: phi1, latitude of the first standard parallel
-standard_parallel_2: phi2, latitude of the second standard parallel
-latitude_of_origin: phi0, latitude of the false origin
-central_meridian: lamda0, longitude of the false origin (with respect to the prime meridian)
-false_easting: FE, false easting, the Eastings value assigned to the natural origin
-false_northing: FN, false northing, the Northings value assigned to the natural origin

e.g. North Carolina State Plane NAD83 Feet:
var ncsp82 = new LambertConformalConic({wkid:2264, semi_major: 6378137.0,inverse_flattening: 298.257222101, standard_parallel_1: 34.33333333333334, standard_parallel_2: 36.16666666666666, central_meridian: -79.0, latitude_of_origin: 33.75,false_easting: 2000000.002616666, 'false_northing': 0, unit: 0.3048006096012192 }); @name LambertConformalConic @class This class (LambertConformalConic) represents a Spatial Reference System based on Lambert Conformal Conic Projection. @extends SpatialReference @constructor @param {Object} params", "label": 1, "domain": "code", "token_count": 448, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0140", "text": "

Perform am URI query parameter (name or value) escape operation on a String input using UTF-8 as encoding, writing results to a Writer.

The following are the only allowed chars in an URI query parameter (will not be escaped):

  • A-Z a-z 0-9
  • - . _ ~
  • ! $ ' ( ) * , ;
  • : @
  • / ?

All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.

This method is thread-safe.

@param text the String to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 310, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0141", "text": "Create a Transverse Mercator Projection. The params passed in constructor should contain the following properties:

-wkid: well-known id
-semi_major: ellipsoidal semi-major axis in meters
-unit: meters per unit
-inverse_flattening: inverse of flattening of the ellipsoid where 1/f = a/(a - b)
-Scale Factor: scale factor at origin
-latitude_of_origin: phi0, latitude of the false origin
-central_meridian: lamda0, longitude of the false origin (with respect to the prime meridian)
-false_easting: FE, false easting, the Eastings value assigned to the natural origin
-false_northing: FN, false northing, the Northings value assigned to the natural origin

e.g. Georgia West State Plane NAD83 Feet:
var gawsp83 = new TransverseMercator({wkid: 102667, semi_major:6378137.0, inverse_flattening:298.257222101,central_meridian:-84.16666666666667, latitude_of_origin: 30.0, scale_factor:0.9999, false_easting:2296583.333333333, false_northing:0, unit: 0.3048006096012192}); @param {Object} params @name TransverseMercator @constructor @class This class (TransverseMercator) represents a Spatial Reference System based on Transverse Mercator Projection @extends SpatialReference", "label": 1, "domain": "code", "token_count": 389, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0142", "text": "Returns true if a record exists in the table that matches the +id+ or conditions given, or false otherwise. The argument can take six forms: * Integer - Finds the record with this primary key. * String - Finds the record with a primary key corresponding to this string (such as '5'). * Array - Finds the record that matches these +find+-style conditions (such as ['name LIKE ?', \"%#{query}%\"]). * Hash - Finds the record that matches these +find+-style conditions (such as {name: 'David'}). * +false+ - Returns always +false+. * No args - Returns +false+ if the relation is empty, +true+ otherwise. For more information about specifying conditions as a hash or array, see the Conditions section in the introduction to ActiveRecord::Base. Note: You can't pass in a condition as a string (like name = 'Jamie'), since it would be sanitized and then queried against the primary key column, like id = 'name = \\'Jamie\\''. Person.exists?(5) Person.exists?('5') Person.exists?(['name LIKE ?', \"%#{query}%\"]) Person.exists?(id: [1, 4, 8]) Person.exists?(name: 'David') Person.exists?(false) Person.exists? Person.where(name: 'Spartacus', rating: 4).exists?", "label": 1, "domain": "code", "token_count": 301, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0143", "text": "Set an option based on a String array in the style of commandline flags. The option may be either one known by the Options object, or one recognized by the TreebankLangParserParams which has already been set up inside the Options object, and then the option is set in the language-particular TreebankLangParserParams. Note that despite this method being an instance method, many flags are actually set as static class variables in the Train and Test classes (this should be fixed some day). Some options (there are many others; see the source code):
  • -maxLength n set the maximum length sentence to parse (inclusively)
  • -printTT print the training trees in raw, annotated, and annotated+binarized form. Useful for debugging and other miscellany.
  • -printAnnotated filename use only in conjunction with -printTT. Redirects printing of annotated training trees to filename.
  • -forceTags when the parser is tested against a set of gold standard trees, use the tagged yield, instead of just the yield, as input.
@param flags An array of options arguments, command-line style. E.g. {\"-maxLength\", \"50\"}. @param i The index in flags to start at when processing an option @return The index in flags of the position after the last element used in processing this option. If the current array position cannot be processed as a valid option, then a warning message is printed to stderr and the return value is i+1", "label": 1, "domain": "code", "token_count": 344, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0144", "text": "Will be fired when the title of the \"TitleTarget\" in the currently matching Route has been changed.
 A \"TitleTarget\" is resolved as the following: 1. When the Route only has one target configured, the \"TitleTarget\" is resolved with this target when its {@link sap.ui.core.routing.Targets#constructor|title} options is set. 2. When the Route has more than one target configured, the \"TitleTarget\" is resolved by default with the first target which has a {@link sap.ui.core.routing.Targets#constructor|title} option. 3. When the {@link sap.ui.core.routing.Route#constructor|titleTarget} option on the Route is configured, this specific target is then used as the \"TitleTarget\". 
@name sap.ui.core.routing.Router#titleChanged @event @param {object} oEvent @param {sap.ui.base.EventProvider} oEvent.getSource @param {object} oEvent.getParameters @param {string} oEvent.getParameters.title The current displayed title @param {array} oEvent.getParameters.history An array which contains the history of previous titles @param {string} oEvent.getParameters.history.title The title @param {string} oEvent.getParameters.history.hash The hash @param {boolean} oEvent.getParameters.history.isHome The app home indicator @public Attach event-handler fnFunction to the 'titleChanged' event of this sap.ui.core.routing.Router.
@param {object} [oData] The object, that should be passed along with the event-object when firing the event. @param {function} fnFunction The function to call, when the event occurs. This function will be called on the oListener-instance (if present) or in a 'static way'. @param {object} [oListener] Object on which to call the given function. @return {sap.ui.core.routing.Router} this to allow method chaining @public", "label": 1, "domain": "code", "token_count": 414, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0145", "text": "Create an issue = Inputs :title - Required string :content - Optional string :responsible - Optional string - Login for the user that this issue should be assigned to. :milestone - Optional number - Milestone to associate this issue with :version - Optional number - Version to associate this issue with :component - Optional number - Component to associate this issue with :priority - Optional string - The priority of this issue * trivial * minor * major * critical * blocker :status - Optional string - The status of this issue * new * open * resolved * on hold * invalid * duplicate * wontfix :kind - Optional string - The kind of issue * bug * enhancement * proposal * task = Examples bitbucket = BitBucket.new :user => 'user-name', :repo => 'repo-name' bitbucket.issues.create \"title\" => \"Found a bug\", \"content\" => \"I'm having a problem with this.\", \"responsible\" => \"octocat\", \"milestone\" => 1, \"priority\" => \"blocker\"", "label": 1, "domain": "code", "token_count": 357, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0146", "text": "Returns a serialized hash of your object. class Person include ActiveModel::Serialization attr_accessor :name, :age def attributes {'name' => nil, 'age' => nil} end def capitalized_name name.capitalize end end person = Person.new person.name = 'bob' person.age = 22 person.serializable_hash # => {\"name\"=>\"bob\", \"age\"=>22} person.serializable_hash(only: :name) # => {\"name\"=>\"bob\"} person.serializable_hash(except: :name) # => {\"age\"=>22} person.serializable_hash(methods: :capitalized_name) # => {\"name\"=>\"bob\", \"age\"=>22, \"capitalized_name\"=>\"Bob\"} Example with :include option class User include ActiveModel::Serializers::JSON attr_accessor :name, :notes # Emulate has_many :notes def attributes {'name' => nil} end end class Note include ActiveModel::Serializers::JSON attr_accessor :title, :text def attributes {'title' => nil, 'text' => nil} end end note = Note.new note.title = 'Battle of Austerlitz' note.text = 'Some text here' user = User.new user.name = 'Napoleon' user.notes = [note] user.serializable_hash # => {\"name\" => \"Napoleon\"} user.serializable_hash(include: { notes: { only: 'title' }}) # => {\"name\" => \"Napoleon\", \"notes\" => [{\"title\"=>\"Battle of Austerlitz\"}]}", "label": 1, "domain": "code", "token_count": 316, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0147", "text": "Starts a new discovery, the localPort and network interface can be specified.

The search will continue for timeout seconds, or infinite if timeout value is zero. During this time, search responses will get collected asynchronous in the background by this {@link Discoverer}.
With wait you can force this method into blocking mode to wait until the search finished, otherwise the method returns with the search running in the background.
A search is finished if either the timeout was reached or the background receiver stopped.
The reason the localPort parameter is specified here, in addition to the port queried at {@link #Discoverer(int, boolean)}, is to distinguish between search responses if more searches are running concurrently.
@param localPort the port used to bind the socket, a valid port is 0 to 65535, if localPort is zero an arbitrary unused (ephemeral) port is picked @param ni the {@link NetworkInterface} used for sending outgoing multicast messages, or null to use the default multicast interface @param timeout time window in seconds during which search response messages will get collected, timeout >= 0. If timeout is zero, no timeout is set, the search has to be stopped with {@link #stopSearch()}. @param wait true to block until end of search before return @throws KNXException on network I/O error @see MulticastSocket @see NetworkInterface", "label": 1, "domain": "code", "token_count": 327, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0148", "text": "Approximate an ASCII string. This works only for Western strings using characters that are Roman-alphabet characters + diacritics. Non-letter characters are left unmodified. string = Identifier.new \"Łódź string.transliterate # => \"Lodz, Poland\" string = Identifier.new \"日本\" string.transliterate # => \"日本\" You can pass any key(s) from +Characters.approximations+ as arguments. This allows for contextual approximations. Various languages are supported, you can see which ones by looking at the source of {Babosa::Transliterator::Base}. string = Identifier.new \"Jürgen Müller\" string.transliterate # => \"Jurgen Muller\" string.transliterate :german # => \"Juergen Mueller\" string = Identifier.new \"¡Feliz año!\" string.transliterate # => \"¡Feliz ano!\" string.transliterate :spanish # => \"¡Feliz anio!\" The approximations are an array, which you can modify if you choose: # Make Spanish use \"nh\" rather than \"nn\" Babosa::Transliterator::Spanish::APPROXIMATIONS[\"ñ\"] = \"nh\" Notice that this method does not simply convert to ASCII; if you want to remove non-ASCII characters such as \"¡\" and \"¿\", use {#to_ascii!}: string.transliterate!(:spanish) # => \"¡Feliz anio!\" string.transliterate! # => \"¡Feliz anio!\" @param *args @return String", "label": 1, "domain": "code", "token_count": 324, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0149", "text": "/* private void findAlignments(int l, int s) { if( listMatrix[l][s] != null ) return; byte backp = backMatrix[l][s]; listMatrix[l][s] = new LinkedList(); if( alignMatrix[l][s] == 0 ) { listMatrix[l][s].add( new int[shortForm.length] ); return; } if( (backp & SHIFT_BOTH) != 0 ) { assert( lcLongForm[l] == lcShortForm[s] ); findAlignments(l-1,s-1); LinkedList from = listMatrix[l-1][s-1]; Iterator iter = from.iterator(); while(iter.hasNext()) { int[] ref = (int[]) iter.next(); int[] cpy = ref.clone(); cpy[s] = l; listMatrix[l][s].add(cpy); } } if( (backp & SHIFT_LONG) != 0 ) { if( l != 0 ) { findAlignments(l-1, s); Iterator iter = listMatrix[l-1][s]; while(iter.hasNext()) { listMatrix[l][s].add( iter.next() ); } } else { listMatrix[l][s].add( new int[shortForm.length] ); } } if( (backp & SHIFT_SHORT) != 0 ) { backp &= ~SHIFT_SHORT; int[] ptrcpy = (int[]) ((backp == 0) ? pointers : pointers.clone()); if( s == 0 ) { ++addCount; alignments.add( new Alignment(longForm, shortForm, ptrcpy) ); } else { findAlignments(ptrcpy, l, s-1); } } if( lcLongForm[l] == lcShortForm[s] ) assert( (backMatrix[l][s] & SHIFT_BOTH) != 0);", "label": 1, "domain": "code", "token_count": 375, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0150", "text": "Compute Pi_J conditioned on D. This function returns the Pi array from the model factors of the D and J genomic contributions, P(D, J)*P(delJ|J) = P(D|J)P(J)P(delJ|J). This corresponds to J(D)^{x_4}. For clarity in parsing the algorithm implementation, we include which instance attributes are used in the method as 'parameters.' Parameters ---------- CDR3_seq : str CDR3 sequence composed of 'amino acids' (single character symbols each corresponding to a collection of codons as given by codons_dict). J_usage_mask : list Indices of the J alleles to be considered in the Pgen computation. self.cutJ_genomic_CDR3_segs : list List of all the J genomic nucleotide sequences trimmed to begin at the conserved 3' residue (F/W) and with the maximum number of palindromic insertions appended. self.PD_given_J : ndarray Probability distribution of D conditioned on J, i.e. P(D|J). self.PJdelJ_nt_pos_vec : list of ndarrays For each J allele, format P(J)*P(delJ|J) into the correct form for a Pi array or J(D)^{x_4}. This is only done for the first and last position in each codon. self.PJdelJ_2nd_nt_pos_per_aa_vec : list of dicts For each J allele, and each 'amino acid', format P(J)*P(delJ|J) for positions in the middle of a codon into the correct form for a Pi array or J(D)^{x_4} given the 'amino acid'. Returns ------- Pi_J_given_D : list List of (4, 3L) ndarrays corresponding to J(D)^{x_4}. max_J_align: int Maximum alignment of the CDR3_seq to any genomic J allele allowed by J_usage_mask.", "label": 1, "domain": "code", "token_count": 399, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0151", "text": "Creates a token for connecting to an OpenTok session. In order to authenticate a user connecting to an OpenTok session, the client passes a token when connecting to the session.

The following example shows how to obtain a token that has a role of \"subscriber\" and that has a connection metadata string:

 import com.opentok.Role; import com.opentok.TokenOptions; class Test { public static void main(String argv[]) throws OpenTokException { int API_KEY = 0; // Replace with your OpenTok API key (see https://tokbox.com/account). String API_SECRET = \"\"; // Replace with your OpenTok API secret. OpenTok sdk = new OpenTok(API_KEY, API_SECRET); //Generate a basic session. Or you could use an existing session ID. String sessionId = System.out.println(sdk.createSession()); // Replace with meaningful metadata for the connection. String connectionMetadata = \"username=Bob,userLevel=4\"; // Use the Role value appropriate for the user. String role = Role.SUBSCRIBER; // Generate a token: TokenOptions options = new TokenOptions.Buider().role(role).data(connectionMetadata).build(); String token = sdk.generateToken(sessionId, options); System.out.println(token); } } 

For testing, you can also generate tokens by logging in to your TokBox account. @param sessionId The session ID corresponding to the session to which the user will connect. @param tokenOptions This TokenOptions object defines options for the token. These include the following:

  • The role of the token (subscriber, publisher, or moderator)
  • The expiration time of the token
  • Connection data describing the end-user
@return The token string.", "label": 1, "domain": "code", "token_count": 384, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0152", "text": "TODO - remove this ... var loadMembers = function(caller) { var filename = self._filename , imports = '' , str = fs.readFileSync(filename).toString() , source = str; var first = source.indexOf('{') + 1 var last = source.lastIndexOf('}') -1; // extract imports imports = str.substring(0, first) .replace(/function(.*)/, '') .replace(/require\\(/g, 'module.require(') .replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(\\/\\/.*)/g, '');//remove comments // extract function body source = source.substring(first, last); source = 'var module = arguments[0];\\n\\r' + imports + source; var EntityOrigin = new Function(source); for (var c in self) { if (!EntityOrigin[c]) EntityOrigin.prototype[c] = self[c] } var obj = new EntityOrigin(module); var methodList = {} , args = [] , variables = '' , placeholder = '' , functionBody = ''; obj._methods = []; for (var prop in obj) { if (typeof(obj[prop]) != 'function') continue; str = obj[prop].toString(); variables = str.match(/\\((.*)\\)/g)[0]; args = []; if (variables.length) { variables = variables.replace(/\\(|\\)/g, '').replace(/\\s*/g, ''); if (variables) args = variables.split(/\\,/g); } first = str.indexOf('{') + 1 last = str.lastIndexOf('}') - 1; str = str.substring(first, last); if (!self[prop]) { if (typeof(obj[prop]) == 'function') { self[prop] = obj[prop]; self._methods.push(prop); } } } if (caller) { if ( !EntitySuper[caller].instance ) { EntitySuper[caller].instance = { _relations: {} } } } else { if ( !EntitySuper[self.name].instance ) { EntitySuper[self.name].instance = { _relations: {} } } } return setListeners(caller) } Set all main listenners at once", "label": 1, "domain": "code", "token_count": 443, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0153", "text": "

Perform a (configurable) XML 1.0 escape operation on a String input meant to be an XML attribute value.

This method will perform an escape operation according to the specified {@link org.unbescape.xml.XmlEscapeType} and {@link org.unbescape.xml.XmlEscapeLevel} argument values.

Besides, being an attribute value also \t, \n and \r will be escaped to avoid white-space normalization from removing line feeds (turning them into white spaces) during future parsing operations.

All other String-based escapeXml10*(...) methods call this one with preconfigured type and level values.

This method is thread-safe.

@param text the String to be escaped. @param type the type of escape operation to be performed, see {@link org.unbescape.xml.XmlEscapeType}. @param level the escape level to be applied, see {@link org.unbescape.xml.XmlEscapeLevel}. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null. @since 1.1.5", "label": 1, "domain": "code", "token_count": 364, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0154", "text": "Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxKeyHandler Event handler that listens to keystroke events. This is not a singleton, however, it is normally only required once if the target is the document element (default). This handler installs a key event listener in the topmost DOM node and processes all events that originate from descandants of or from the topmost DOM node. The latter means that all unhandled keystrokes are handled by this object regardless of the focused state of the . Example: The following example creates a key handler that listens to the delete key (46) and deletes the selection cells if the graph is enabled. (code) var keyHandler = new mxKeyHandler(graph); keyHandler.bindKey(46, function(evt) { if (graph.isEnabled()) { graph.removeCells(); } }); (end) Keycodes: See http://tinyurl.com/yp8jgl or http://tinyurl.com/229yqw for a list of keycodes or install a key event listener into the document element and print the key codes of the respective events to the console. To support the Command key and the Control key on the Mac, the following code can be used. (code) keyHandler.getFunction = function(evt) { if (evt != null) { return (mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey)) ? this.controlKeys[evt.keyCode] : this.normalKeys[evt.keyCode]; } return null; }; (end) Constructor: mxKeyHandler Constructs an event handler that executes functions bound to specific keystrokes. Parameters: graph - Reference to the associated . target - Optional reference to the event target. If null, the document element is used as the event target, that is, the object where the key event listener is installed.", "label": 1, "domain": "code", "token_count": 398, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0155", "text": "/* eslint-enable no-unused-vars This class represents a request for professional editing of machine-translated content. Note: this constructor is not usually called directly, use Client.tr(id) or Client.tr({fields…}) @class TranslationRequest @param {Client} gp - parent g11n-pipeline client object @param {Object} props - properties to inherit @prop {string} id - Translation Request ID @prop {string} serviceInstance - the Service Instance that this Translation Request belongs to @prop {string} partner - the three letter Partner ID to be used. Use 'IBM' for the Professional Plan @prop {string} name - descriptive title for this translation request @prop {Object.} targetLanguagesByBundle - map from Bundle ID to array of target languages @prop {String[]} emails - array of email addresses for the requester @prop {TranslationDomain[]} domains - A list of applicable translation domains. @prop {TranslationRequestStatus} status - Status of this TR. @prop {Object.} wordCountsByBundle - map of bundle IDs to word count data @prop {string} updatedBy - last updated user ID @prop {Date} updatedAt - date when the TR was updated @prop {Date} createdAt - date when the TR was first submitted @prop {Date} estimatedCompletion - date when the TR is expected to be complete @prop {Date} startedAt - date when the TR was accepted for processing @prop {Date} translatedAt - date when the TR had completed translation review @prop {Date} mergedAt - date when the TR was merged back into the target bundles @prop {String[]} [notes=[]] - optional array of notes to the translators @prop {Object.} metadata - array of user-defined metadata", "label": 1, "domain": "code", "token_count": 364, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0156", "text": " Import the private ECDSA key stored in 'pem', and generate its public key (which will also be included in the returned ECDSA key object). In addition, a keyid identifier for the ECDSA key is generated. The object returned conforms to: {'keytype': 'ecdsa-sha2-nistp256', 'scheme': 'ecdsa-sha2-nistp256', 'keyid': keyid, 'keyval': {'public': '-----BEGIN PUBLIC KEY----- ... -----END PUBLIC KEY-----', 'private': '-----BEGIN EC PRIVATE KEY----- ... -----END EC PRIVATE KEY-----'}} The private key is a string in PEM format. >>> ecdsa_key = generate_ecdsa_key() >>> private_pem = ecdsa_key['keyval']['private'] >>> ecdsa_key = import_ecdsakey_from_private_pem(private_pem) >>> securesystemslib.formats.ECDSAKEY_SCHEMA.matches(ecdsa_key) True pem: A string in PEM format. The private key is extracted and returned in an ecdsakey object. scheme: The signature scheme used by the imported key. password: (optional) The password, or passphrase, to decrypt the private part of the ECDSA key if it is encrypted. 'password' is not used directly as the encryption key, a stronger encryption key is derived from it. securesystemslib.exceptions.FormatError, if the arguments are improperly formatted. securesystemslib.exceptions.UnsupportedAlgorithmError, if 'pem' specifies an unsupported key type. None. A dictionary containing the ECDSA keys and other identifying information. Conforms to 'securesystemslib.formats.ECDSAKEY_SCHEMA'.", "label": 1, "domain": "code", "token_count": 362, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0157", "text": "

Fetches all foreign keys for all tables. If a SQL statement is given, this SQL statement is used instead of using the JDBC meta data methods. The SQL select statement must define this six columns

  • TABLE_NAME for the real name of the table,
  • FK_NAME for the real name of the foreign key name,
  • FKCOLUMN_NAME for the name of the column for which the foreign key is defined,
  • PKTABLE_NAME for the name of the referenced table,
  • PKCOLUMN_NAME for the name of column within the referenced table and
  • DELETE_RULE defining the rule what happens in the case a row of the table is deleted (with value {@link DatabaseMetaData#importedKeyCascade} in the case the delete is cascaded).

@param _con SQL connection @param _sql SQL statement which must be executed if the JDBC functionality does not work (or null if JDBC meta data is used to fetch the foreign keys) @param _cache4Name map used to fetch depending on the table name the related table information @throws SQLException if foreign keys could not be fetched", "label": 1, "domain": "code", "token_count": 303, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0158", "text": "Get dom element recursively from iterable or selector. @param {(string|Array|NodeList|HTMLCollection|Window|Node)} input - The iterable, selector or elements. @return {Array} domElements - The array of dom elements from input. @example //esnext import { createElement, append, getElements } from 'chirashi' const sushi = createElement('.sushi') const unagi = createElement('.unagi') const yakitori = createElement('.yakitori') const sashimi = createElement('.sashimi') append(document.body, [sushi, unagi, yakitori, sashimi]) getElements('div') //returns: [
,
,
,
] getElements('.yakitori, .sashimi') //returns: [
,
] getElements([sushi, unagi, '.sashimi', '.wasabi']) //returns: [
,
,
] getElements('.wasabi') //returns: [] @example //es5 var sushi = Chirashi.createElement('.sushi') var unagi = Chirashi.createElement('.unagi') var yakitori = Chirashi.createElement('.yakitori') var sashimi = Chirashi.createElement('.sashimi') Chirashi.append(document.body, [sushi, unagi, yakitori, sashimi]) Chirashi.getElements('div') //returns: [
,
,
,
] Chirashi.getElements('.yakitori, .sashimi') //returns: [
,
] Chirashi.getElements([sushi, unagi, '.sashimi', '.wasabi']) //returns: [
,
,
] Chirashi.getElements('.wasabi') //returns: []", "label": 1, "domain": "code", "token_count": 491, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0159", "text": "/*function CCGIFEncoder( settings ) { CCFrameEncoder.call( this ); settings.quality = settings.quality || 6; this.settings = settings; this.encoder = new GIFEncoder(); this.encoder.setRepeat( 1 ); this.encoder.setDelay( settings.step ); this.encoder.setQuality( 6 ); this.encoder.setTransparent( null ); this.encoder.setSize( 150, 150 ); this.canvas = document.createElement( 'canvas' ); this.ctx = this.canvas.getContext( '2d' ); } CCGIFEncoder.prototype = Object.create( CCFrameEncoder ); CCGIFEncoder.prototype.start = function() { this.encoder.start(); } CCGIFEncoder.prototype.add = function( canvas ) { this.canvas.width = canvas.width; this.canvas.height = canvas.height; this.ctx.drawImage( canvas, 0, 0 ); this.encoder.addFrame( this.ctx ); this.encoder.setSize( canvas.width, canvas.height ); var readBuffer = new Uint8Array(canvas.width * canvas.height * 4); var context = canvas.getContext( 'webgl' ); context.readPixels(0, 0, canvas.width, canvas.height, context.RGBA, context.UNSIGNED_BYTE, readBuffer); this.encoder.addFrame( readBuffer, true ); } CCGIFEncoder.prototype.stop = function() { this.encoder.finish(); } CCGIFEncoder.prototype.save = function( callback ) { var binary_gif = this.encoder.stream().getData(); var data_url = 'data:image/gif;base64,'+encode64(binary_gif); window.location = data_url; return; var blob = new Blob( [ binary_gif ], { type: \"octet/stream\" } ); var url = window.URL.createObjectURL( blob ); callback( url ); }", "label": 1, "domain": "code", "token_count": 353, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0160", "text": " Return a string containing 'encrypted_key' in non-encrypted form. The decrypt_key() function can be applied to the encrypted string to restore the original key object, a key (e.g., RSAKEY_SCHEMA, ED25519KEY_SCHEMA). This function calls pyca_crypto_keys.py to perform the actual decryption. Encrypted keys use AES-256-CTR-Mode and passwords are strengthened with PBKDF2-HMAC-SHA256 (100K iterations be default, but may be overriden in 'settings.py' by the user). http://en.wikipedia.org/wiki/Advanced_Encryption_Standard http://en.wikipedia.org/wiki/CTR_mode#Counter_.28CTR.29 https://en.wikipedia.org/wiki/PBKDF2 >>> ed25519_key = generate_ed25519_key() >>> password = 'secret' >>> encrypted_key = encrypt_key(ed25519_key, password) >>> decrypted_key = decrypt_key(encrypted_key.encode('utf-8'), password) >>> securesystemslib.formats.ANYKEY_SCHEMA.matches(decrypted_key) True >>> decrypted_key == ed25519_key True encrypted_key: An encrypted key (additional data is also included, such as salt, number of password iterations used for the derived encryption key, etc) of the form 'securesystemslib.formats.ENCRYPTEDKEY_SCHEMA'. 'encrypted_key' should have been generated with encrypt_key(). password: The password, or passphrase, to decrypt 'encrypted_key'. 'password' is not used directly as the encryption key, a stronger encryption key is derived from it. The supported general-purpose module takes care of re-deriving the encryption key. securesystemslib.exceptions.FormatError, if the arguments are improperly formatted. securesystemslib.exceptions.CryptoError, if 'encrypted_key' cannot be decrypted. None. A key object of the form: 'securesystemslib.formats.ANYKEY_SCHEMA' (e.g., RSAKEY_SCHEMA, ED25519KEY_SCHEMA).", "label": 1, "domain": "code", "token_count": 415, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0161", "text": "Calculate largest Lyauponov exponent of a given time series x using Rosenstein algorithm. Parameters ---------- x list a time series n integer embedding dimension tau integer Embedding lag fs integer Sampling frequency T integer Mean period Returns ---------- Lexp float Largest Lyapunov Exponent Notes ---------- A n-dimensional trajectory is first reconstructed from the observed data by use of embedding delay of tau, using pyeeg function, embed_seq(x, tau, n). Algorithm then searches for nearest neighbour of each point on the reconstructed trajectory; temporal separation of nearest neighbours must be greater than mean period of the time series: the mean period can be estimated as the reciprocal of the mean frequency in power spectrum Each pair of nearest neighbours is assumed to diverge exponentially at a rate given by largest Lyapunov exponent. Now having a collection of neighbours, a least square fit to the average exponential divergence is calculated. The slope of this line gives an accurate estimate of the largest Lyapunov exponent. References ---------- Rosenstein, Michael T., James J. Collins, and Carlo J. De Luca. \"A practical method for calculating largest Lyapunov exponents from small data sets.\" Physica D: Nonlinear Phenomena 65.1 (1993): 117-134. Examples ---------- >>> import pyeeg >>> X = numpy.array([3,4,1,2,4,51,4,32,24,12,3,45]) >>> pyeeg.LLE(X,2,4,1,1) >>> 0.18771136179353307", "label": 1, "domain": "code", "token_count": 316, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0162", "text": "Get the score of this word with this tag (as an IntTaggedWord) at this location. (Presumably an estimate of P(word | tag).)

Implementation documentation: Seen: c_W = count(W) c_TW = count(T,W) c_T = count(T) c_Tunseen = count(T) among new words in 2nd half total = count(seen words) totalUnseen = count(\"unseen\" words) p_T_U = Pmle(T|\"unseen\") pb_T_W = P(T|W). If (c_W > smoothInUnknownsThreshold) = c_TW/c_W Else (if not smart mutation) pb_T_W = bayes prior smooth[1] with p_T_U p_T= Pmle(T) p_W = Pmle(W) pb_W_T = log(pb_T_W * p_W / p_T) [Bayes rule] Note that this doesn't really properly reserve mass to unknowns. Unseen: c_TS = count(T,Sig|Unseen) c_S = count(Sig) c_T = count(T|Unseen) c_U = totalUnseen above p_T_U = Pmle(T|Unseen) pb_T_S = Bayes smooth of Pmle(T|S) with P(T|Unseen) [smooth[0]] pb_W_T = log(P(W|T)) inverted @param iTW An IntTaggedWord pairing a word and POS tag @param loc The position in the sentence. In the default implementation this is used only for unknown words to change their probability distribution when sentence initial @return A float score, usually, log P(word|tag)", "label": 1, "domain": "code", "token_count": 358, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0163", "text": "

Perform an XML 1.1 level 2 (markup-significant and all non-ASCII chars) escape operation on a String input, writing results to a Writer.

Level 2 means this method will escape:

  • The five markup-significant characters: <, >, &, " and '
  • All non ASCII characters.

This escape will be performed by replacing those chars by the corresponding XML Character Entity References (e.g. '&lt;') when such CER exists for the replaced character, and replacing by a hexadecimal character reference (e.g. '&#x2430;') when there there is no CER for the replaced character.

This method calls {@link #escapeXml11(String, Writer, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:

  • type: {@link org.unbescape.xml.XmlEscapeType#CHARACTER_ENTITY_REFERENCES_DEFAULT_TO_HEXA}
  • level: {@link org.unbescape.xml.XmlEscapeLevel#LEVEL_2_ALL_NON_ASCII_PLUS_MARKUP_SIGNIFICANT}

This method is thread-safe.

@param text the String to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 420, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0164", "text": "
 Generate normally distributed floats. Use generator to generate num float results into the device memory at outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no stream has been set. Results are 32-bit floating point values with mean mean and standard deviation stddev. Normally distributed results are generated from pseudorandom generators with a Box-Muller transform, and so require num to be even. Quasirandom generators use an inverse cumulative distribution function to preserve dimensionality. There may be slight numerical differences between results generated on the GPU with generators created with ::curandCreateGenerator() and results calculated on the CPU with generators created with ::curandCreateGeneratorHost(). These differences arise because of differences in results for transcendental functions. In addition, future versions of CURAND may use newer versions of the CUDA math library, so different versions of CURAND may give slightly different numerical values. @param generator - Generator to use @param outputPtr - Pointer to device memory to store CUDA-generated results, or Pointer to host memory to store CPU-generated results @param n - Number of floats to generate @param mean - Mean of normal distribution @param stddev - Standard deviation of normal distribution @return CURAND_STATUS_NOT_INITIALIZED if the generator was never created CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason CURAND_STATUS_LENGTH_NOT_MULTIPLE if the number of output samples is not a multiple of the quasirandom dimension, or is not a multiple of two for pseudorandom generators CURAND_STATUS_SUCCESS if the results were generated successfully 
", "label": 1, "domain": "code", "token_count": 361, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0165", "text": "This operation extracts a rich set of visual features based on the image content. Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong. @param image An image stream. @param visual_features [Array] A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include: Categories - categorizes image content according to a taxonomy defined in documentation. Tags - tags the image with a detailed list of words related to the image content. Description - describes the image content with a complete English sentence. Faces - detects if faces are present. If present, generate coordinates, gender and age. ImageType - detects if image is clipart or a line drawing. Color - determines the accent color, dominant color, and whether an image is black&white. Adult - detects if the image is pornographic in nature (depicts nudity or a sex act). Sexually suggestive content is also detected. Objects - detects various objects within an image, including the approximate location. The Objects argument is only available in English. Brands - detects various brands within an image, including the approximate location. The Brands argument is only available in English. @param details [Array
] A string indicating which domain-specific details to return. Multiple values should be comma-separated. Valid visual feature types include: Celebrities - identifies celebrities if detected in the image, Landmarks - identifies notable landmarks in the image. @param language [Enum] The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh' @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ImageAnalysis] operation results.", "label": 1, "domain": "code", "token_count": 469, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0166", "text": "Constructor If name: is provided (as a String or Symbol) that will be stored as the APIConnection's name attribute. For other available parameters, see {#connect}. If they are provided, they will be used to establish the connection immediately. If not, you must call {#connect} before accessing the API. init Instance Methods Connect to the JSS Classic API. @param args[Hash] the keyed arguments for connection. @option args :server[String] the hostname of the JSS API server, required if not defined in JSS::CONFIG @option args :server_path[String] If your JSS is not at the root of the server, e.g. if it's at https://myjss.myserver.edu:8443/dev_mgmt/jssweb rather than https://myjss.myserver.edu:8443/ then use this parameter to specify the path below the root e.g: server_path: 'dev_mgmt/jssweb' @option args :port[Integer] the port number to connect with, defaults to 8443 @option args :use_ssl[Boolean] should the connection be made over SSL? Defaults to true. @option args :verify_cert[Boolean] should HTTPS SSL certificates be verified. Defaults to true. If your connection raises RestClient::SSLCertificateNotVerified, and you don't care about the validity of the SSL cert. just set this explicitly to false. @option args :user[String] a JSS user who has API privs, required if not defined in JSS::CONFIG @option args :pw[String,Symbol] Required, the password for that user, or :prompt, or :stdin If :prompt, the user is promted on the commandline to enter the password for the :user. If :stdin#, the password is read from a line of std in represented by the digit at #, so :stdin3 reads the passwd from the third line of standard input. defaults to line 1, if no digit is supplied. see {JSS.stdin} @option args :open_timeout[Integer] the number of seconds to wait for an initial response, defaults to 60 @option args :timeout[Integer] the number of seconds before an API call times out, defaults to 60 @return [true]", "label": 1, "domain": "code", "token_count": 464, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0167", "text": "Gets the health of a Service Fabric node, by using the specified health policy. Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. Use ClusterHealthPolicy in the POST body to override the health policies used to evaluate the health. If the node that you specify by name does not exist in the health store, this returns an error. @param node_name [String] The name of the node. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. - Default - Default value. Matches any HealthState. The value is zero. - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. - Ok - Filter that matches input with HealthState value Ok. The value is 2. - Warning - Filter that matches input with HealthState value Warning. The value is 4. - Error - Filter that matches input with HealthState value Error. The value is 8. - All - Filter that matches input with any HealthState value. The value is 65535. @param cluster_health_policy [ClusterHealthPolicy] Describes the health policies used to evaluate the health of a cluster or node. If not present, the health evaluation uses the health policy from cluster manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [NodeHealth] operation results.", "label": 1, "domain": "code", "token_count": 480, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0168", "text": "Translates geomagnetic ion velocities to those at footpoints and magnetic equator. Note ---- Presumes scalar values for mapping ion velocities are already in the inst, labeled by north_footpoint_zon_drifts_scalar, north_footpoint_mer_drifts_scalar, equ_mer_drifts_scalar, equ_zon_drifts_scalar. Also presumes that ion motions in the geomagnetic system are present and labeled as 'iv_mer' and 'iv_zon' for meridional and zonal ion motions. This naming scheme is used by the other pysat oriented routines in this package. Parameters ---------- inst : pysat.Instrument equ_mer_scalar : string Label used to identify equatorial scalar for meridional ion drift equ_zon_scalar : string Label used to identify equatorial scalar for zonal ion drift north_mer_scalar : string Label used to identify northern footpoint scalar for meridional ion drift north_zon_scalar : string Label used to identify northern footpoint scalar for zonal ion drift south_mer_scalar : string Label used to identify northern footpoint scalar for meridional ion drift south_zon_scalar : string Label used to identify southern footpoint scalar for zonal ion drift mer_drift : string Label used to identify meridional ion drifts within inst zon_drift : string Label used to identify zonal ion drifts within inst Returns ------- None Modifies pysat.Instrument object in place. Drifts mapped to the magnetic equator are labeled 'equ_mer_drift' and 'equ_zon_drift'. Mappings to the northern and southern footpoints are labeled 'south_footpoint_mer_drift' and 'south_footpoint_zon_drift'. Similarly for the northern hemisphere.", "label": 1, "domain": "code", "token_count": 355, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0169", "text": "Function path: Runtime.callFunctionOn Domain: Runtime Method name: callFunctionOn Parameters: Required arguments: 'functionDeclaration' (type: string) -> Declaration of the function to call. Optional arguments: 'objectId' (type: RemoteObjectId) -> Identifier of the object to call function on. Either objectId or executionContextId should be specified. 'arguments' (type: array) -> Call arguments. All call arguments must belong to the same JavaScript world as the target object. 'silent' (type: boolean) -> In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. 'returnByValue' (type: boolean) -> Whether the result is expected to be a JSON object which should be sent by value. 'generatePreview' (type: boolean) -> Whether preview should be generated for the result. 'userGesture' (type: boolean) -> Whether execution should be treated as initiated by user in the UI. 'awaitPromise' (type: boolean) -> Whether execution should await for resulting value and return once awaited promise is resolved. 'executionContextId' (type: ExecutionContextId) -> Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. 'objectGroup' (type: string) -> Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. Returns: 'result' (type: RemoteObject) -> Call result. 'exceptionDetails' (type: ExceptionDetails) -> Exception details. Description: Calls function with given declaration on the given object. Object group of the result is inherited from the target object.", "label": 1, "domain": "code", "token_count": 366, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0170", "text": "Find emails in a IMAP mailbox. Without any options, the 10 last received emails are returned. Possible options: mailbox: mailbox to search the email(s) in. The default is 'INBOX'. what: last or first emails. The default is :first. order: order of emails returned. Possible values are :asc or :desc. Default value is :asc. count: number of emails to retrieve. The default value is 10. A value of 1 returns an instance of Message, not an array of Message instances. read_only: will ensure that no writes are made to the inbox during the session. Specifically, if this is set to true, the code will use the EXAMINE command to retrieve the mail. If set to false, which is the default, a SELECT command will be used to retrieve the mail This is helpful when you don't want your messages to be set to read automatically. Default is false. delete_after_find: flag for whether to delete each retreived email after find. Default is false. Use #find_and_delete if you would like this to default to true. keys: are passed as criteria to the SEARCH command. They can either be a string holding the entire search string, or a single-dimension array of search keywords and arguments. Refer to [IMAP] section 6.4.4 for a full list The default is 'ALL' search_charset: charset to pass to IMAP server search. Omitted by default. Example: 'UTF-8' or 'ASCII'.", "label": 1, "domain": "code", "token_count": 313, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0171", "text": "Creates a new AppRole or update an existing AppRole with the given name and attributes. @example Vault.approle.set_role(\"testrole\", { secret_id_ttl: \"10m\", token_ttl: \"20m\", policies: \"default\", period: 3600, }) #=> true @param [String] name The name of the AppRole @param [Hash] options @option options [Boolean] :bind_secret_id Require secret_id to be presented when logging in using this AppRole. @option options [String] :bound_cidr_list Comma-separated list of CIDR blocks. Specifies blocks of IP addresses which can perform the login operation. @option options [String] :policies Comma-separated list of policies set on tokens issued via this AppRole. @option options [String] :secret_id_num_uses Number of times any particular SecretID can be used to fetch a token from this AppRole, after which the SecretID will expire. @option options [Fixnum, String] :secret_id_ttl The number of seconds or a golang-formatted timestamp like \"60m\" after which any SecretID expires. @option options [Fixnum, String] :token_ttl The number of seconds or a golang-formatted timestamp like \"60m\" to set as the TTL for issued tokens and at renewal time. @option options [Fixnum, String] :token_max_ttl The number of seconds or a golang-formatted timestamp like \"60m\" after which the issued token can no longer be renewed. @option options [Fixnum, String] :period The number of seconds or a golang-formatted timestamp like \"60m\". If set, the token generated using this AppRole is a periodic token. So long as it is renewed it never expires, but the TTL set on the token at each renewal is fixed to the value specified here. If this value is modified, the token will pick up the new value at its next renewal. @return [true]", "label": 1, "domain": "code", "token_count": 407, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0172", "text": "Gets the list of partitions of a Service Fabric service. Gets the list of partitions of a Service Fabric service. The response includes the partition ID, partitioning scheme information, keys supported by the partition, status, health, and other details about the partition. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the service name is \"fabric:/myapp/app1/svc1\", the service identity would be \"myapp~app1~svc1\" in 6.0+ and \"myapp/app1/svc1\" in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [PagedServicePartitionInfoList] operation results.", "label": 1, "domain": "code", "token_count": 334, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0173", "text": "Creates a new {@link SaslServer} and first tries the JVM built-in servers before falling back to {@link ShaSaslServer} implementations. The mechanisms are tried in the order they arrive. @param mechanism The non-null mechanism name. It must be an IANA-registered name of a SASL mechanism. (e.g. \"SCRAM-SHA512\", \"PLAIN\"). @param serverName The fully qualified host name of the server, or null if the server is not bound to any specific host name. If the mechanism does not allow an unbound server, a SaslException will be thrown. @param props The possibly null set of properties used to select the SASL mechanism and to configure the authentication exchange of the selected mechanism. For example, if props contains the Sasl.POLICY_NOPLAINTEXT property with the value \"true\", then the selected SASL mechanism must not be susceptible to simple plain passive attacks. In addition to the standard properties declared in this class, other, possibly mechanism-specific, properties can be included. Properties not relevant to the selected mechanism are ignored, including any map entries with non-String keys. @param cbh The possibly null callback handler to used by the SASL mechanisms to get further information from the application/library to complete the authentication. For example, a SASL mechanism might require the authentication ID, password and realm from the caller. The authentication ID is requested by using a NameCallback. The password is requested by using a PasswordCallback. The realm is requested by using a RealmChoiceCallback if there is a list of realms to choose from, and by using a RealmCallback if the realm must be entered. @return A possibly null SaslServer created using the parameters supplied. If null, cannot find a SaslServerFactory that will produce one. @throws SaslException If cannot create a SaslServer because of an error.", "label": 1, "domain": "code", "token_count": 381, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0174", "text": "Builds a checker function meant to be used with {@link module:lamb.validate|validate}.
Note that the function accepts multiple keyPaths as a means to compare their values. In other words all the received keyPaths will be passed as arguments to the predicate to run the test.
If you want to run the same single property check with multiple properties, you should build multiple checkers and combine them with {@link module:lamb.validate|validate}. @example var user = { name: \"John\", surname: \"Doe\", login: { username: \"jdoe\", password: \"abc123\", passwordConfirm: \"abc123\" } }; var pwdMatch = _.checker( _.areSame, \"Passwords don't match\", [\"login.password\", \"login.passwordConfirm\"] ); pwdMatch(user) // => [] var newUser = _.setPathIn(user, \"login.passwordConfirm\", \"avc123\"); pwdMatch(newUser) // => [\"Passwords don't match\", [\"login.password\", \"login.passwordConfirm\"]] @memberof module:lamb @category Object @see {@link module:lamb.validate|validate}, {@link module:lamb.validateWith|validateWith} @since 0.1.0 @param {Function} predicate - The predicate to test the object properties @param {String} message - The error message @param {String[]} keyPaths - The array of keys, or {@link module:lamb.getPathIn|paths}, to test. @param {String} [pathSeparator=\".\"] @returns {Function} A checker function which returns an error in the form [\"message\", [\"propertyA\", \"propertyB\"]] or an empty array.", "label": 1, "domain": "code", "token_count": 375, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0175", "text": "Write arbitrary data to a file defined by the passed entities and path patterns. Args: entities (dict): A dictionary of entities, with Entity names in keys and values for the desired file in values. path_patterns (list): Optional path patterns to use when building the filename. If None, the Layout-defined patterns will be used. contents (object): Contents to write to the generate file path. Can be any object serializable as text or binary data (as defined in the content_mode argument). conflicts (str): One of 'fail', 'skip', 'overwrite', or 'append' that defines the desired action when the output path already exists. 'fail' raises an exception; 'skip' does nothing; 'overwrite' overwrites the existing file; 'append' adds a suffix to each file copy, starting with 1. Default is 'fail'. strict (bool): If True, all entities must be matched inside a pattern in order to be a valid match. If False, extra entities will be ignored so long as all mandatory entities are found. domains (list): List of Domains to scan for path_patterns. Order determines precedence (i.e., earlier Domains will be scanned first). If None, all available domains are included. index (bool): If True, adds the generated file to the current index using the domains specified in index_domains. index_domains (list): List of domain names to attach the generated file to when indexing. Ignored if index == False. If None, All available domains are used.", "label": 1, "domain": "code", "token_count": 308, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0176", "text": "Construct a new User. A User must have an ID and can optionally have extra information associated with it. @constructor @param {string} userId Required. The ID of this user. @prop {string} userId The ID of the user. @prop {Object} info The info object supplied in the constructor. @prop {string} displayName The 'displayname' of the user if known. @prop {string} avatarUrl The 'avatar_url' of the user if known. @prop {string} presence The presence enum if known. @prop {string} presenceStatusMsg The presence status message if known. @prop {Number} lastActiveAgo The time elapsed in ms since the user interacted proactively with the server, or we saw a message from the user @prop {Number} lastPresenceTs Timestamp (ms since the epoch) for when we last received presence data for this user. We can subtract lastActiveAgo from this to approximate an absolute value for when a user was last active. @prop {Boolean} currentlyActive Whether we should consider lastActiveAgo to be an approximation and that the user should be seen as active 'now' @prop {string} _unstable_statusMessage The status message for the user, if known. This is different from the presenceStatusMsg in that this is not tied to the user's presence, and should be represented differently. @prop {Object} events The events describing this user. @prop {MatrixEvent} events.presence The m.presence event for this user.", "label": 1, "domain": "code", "token_count": 313, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0177", "text": "A pool of peers for handling all network activity. @alias module:net.Pool @constructor @param {Object} options @param {Chain} options.chain @param {Mempool?} options.mempool @param {Number?} [options.maxOutbound=8] - Maximum number of peers. @param {Boolean?} options.spv - Do an SPV sync. @param {Boolean?} options.noRelay - Whether to ask for relayed transactions. @param {Number?} [options.feeRate] - Fee filter rate. @param {Number?} [options.invTimeout=60000] - Timeout for broadcasted objects. @param {Boolean?} options.listen - Whether to spin up a server socket and listen for peers. @param {Boolean?} options.selfish - A selfish pool. Will not serve blocks, headers, hashes, utxos, or transactions to peers. @param {Boolean?} options.broadcast - Whether to automatically broadcast transactions accepted to our mempool. @param {String[]} options.seeds @param {Function?} options.createSocket - Custom function to create a socket. Must accept (port, host) and return a node-like socket. @param {Function?} options.createServer - Custom function to create a server. Must return a node-like server. @emits Pool#block @emits Pool#tx @emits Pool#peer @emits Pool#open @emits Pool#close @emits Pool#error @emits Pool#reject", "label": 1, "domain": "code", "token_count": 312, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0178", "text": "Node object hash API object @typedef {Object} API @memberOf module:node-object-hash @inner @property {Function} hash Returns object hash string (see {@link module:node-object-hash#hash}) @property {Function} sort Returns sorted object string (see {@link module:node-object-hash#sort}) Generates node-object-hash API object @param {Object} [options] Library options @param {boolean} [options.coerce=true] Performs type coercion @param {boolean} [options.sort=true] Performs array, object, etc. sorting @param {string} [options.alg=sha256] Default crypto algorithm to use (can be overridden) @param {string} [options.enc=hex] Hash string encoding (can be overridden) @return {module:node-object-hash~API} Node object hash API instance @memberOf module:node-object-hash @inner @example var apiConstructor = require('node-object-hash'); var hashSortCoerce = apiConstructor({sort:true, coerce:true}); // or var hashSort = apiConstructor({sort:true, coerce:false}); // or var hashCoerce = apiConstructor({sort:false, coerce:true}); var objects = { a: { a: [{c: 2, a: 1, b: {a: 3, c: 2, b: 0}}], b: [1, 'a', {}, null], }, b: { b: ['a', 1, {}, undefined], a: [{c: '2', b: {b: false, c: 2, a: '3'}, a: true}] }, c: ['4', true, 0, 2, 3] }; hashSortCoerce.hash(objects.a) === hashSortCoerce.hash(objects.b); // returns true hashSortCoerce.sort(object.c); // returns '[0,1,2,3,4]'", "label": 1, "domain": "code", "token_count": 390, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0179", "text": "/* private void valueOrdering() { int j = 0; for(int i = 0; i < this.getVariables().length; i++){ HashMap tempMapUnsorted = new HashMap(); String[] symbols = ((FuzzySymbolicDomain)((FuzzySymbolicVariable)this.getVariables()[i]).getDomain()).getSymbols(); double[] possibilities = ((FuzzySymbolicDomain)((FuzzySymbolicVariable)this.getVariables()[i]).getDomain()).getPossibilityDegrees(); for (int k = 0; k < symbols.length; k++) tempMapUnsorted.put(symbols[k], possibilities[k]); tempMap = SortHashmap(((FuzzySymbolicVariable)this.getVariables()[i]).getSymbolsAndPossibilities()); HashMap tempMap = SortHashmap(tempMapUnsorted); j = 0; Integer[] dtod = new Integer[((FuzzySymbolicDomain)((FuzzySymbolicVariable)this.getVariables()[i]).getDomain()).getSymbols().length]; for(String s: tempMap.keySet()){ if(Double.compare(tempMap.get(s), 0.0) == 0) continue; for(int k = 0; k < ((FuzzySymbolicDomain)((FuzzySymbolicVariable)this.getVariables()[i]).getDomain()).getSymbols().length; k++){ if(((FuzzySymbolicDomain)((FuzzySymbolicVariable)this.getVariables()[i]).getDomain()).getSymbols()[k] == s){ dtod[j] = k; break; } } if(j < ((FuzzySymbolicDomain)((FuzzySymbolicVariable)this.getVariables()[i]).getDomain()).getSymbols().length - 1) j++; } orderHash.put(this.getVariables()[i], dtod); } }", "label": 1, "domain": "code", "token_count": 364, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0180", "text": "

Perform an HTML5 level 1 (XML-style) escape operation on a String input, writing results to a Writer.

Level 1 means this method will only escape the five markup-significant characters: <, >, &, " and '. It is called XML-style in order to link it with JSP's escapeXml attribute in JSTL's <c:out ... /> tags.

Note this method may not produce the same results as {@link #escapeHtml4Xml(String, Writer)} because it will escape the apostrophe as &apos;, whereas in HTML 4 such NCR does not exist (the decimal numeric reference &#39; is used instead).

This method calls {@link #escapeHtml(String, Writer, HtmlEscapeType, HtmlEscapeLevel)} with the following preconfigured values:

  • type: {@link org.unbescape.html.HtmlEscapeType#HTML5_NAMED_REFERENCES_DEFAULT_TO_DECIMAL}
  • level: {@link org.unbescape.html.HtmlEscapeLevel#LEVEL_1_ONLY_MARKUP_SIGNIFICANT}

This method is thread-safe.

@param text the String to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 434, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0181", "text": "

Generates a stream by regrouping the elements of the provided stream and putting them in a substream. This grouping operation scans the elements of the stream using the open predicate. If this predicate is true, then it begins to add the elements of the stream in a substream. It will continue to add them until an element that matches the close predicate is met.

Adding the opening and the closing elements is controlled by the two boolean parameters openingElementIncluded and closingElementIncluded.

Example:

{@code Stream stream = Stream.of(\"o\", \"a0\", \"a1\", \"a2\", \"c\", \"a3\", \"a4, \"o\", \"a5\", \"c\"); Stream> groupingStream = StreamsUtils.group(stream, \"o\"::equals, false, \"c\"::equals, false); List> collect = groupingStream.map(st -> st.collect(Collectors.toList())).collect(Collectors.toList()); // The collect list is [[\"a0\", \"a1\", \"a2\"][\"a5\"]] }

If the provided stream is empty, then the returned stream contains an empty stream.

An IllegalArgumentException will also be thrown if the provided stream is not ORDERED

The returned stream has the same characteristics as the provided stream, and is thus ORDERED.

A {@code {@link NullPointerException}} is thrown if the stream to be grouped or one of the predicate is null.

@param stream The stream to be grouped. Will throw a NullPointerException if null. @param open The predicate used to check for an opening element. @param openingElementIncluded if true : includes the opening element in each substream @param close The predicate used to check for an closing element. @param closingElementIncluded if true : includes the closing element in each substream @param The type of the elements of the provided stream. @return A grouped stream of streams.", "label": 1, "domain": "code", "token_count": 467, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0182", "text": "A check that tests that a given value is a float (an integer will be accepted), and optionally - that it is between bounds. If the value is a string, then the conversion is done - if possible. Otherwise a VdtError is raised. This can accept negative values. >>> vtor = Validator() >>> vtor.check('float', '2') 2.0 From now on we multiply the value to avoid comparing decimals >>> vtor.check('float', '-6.8') * 10 -68.0 >>> vtor.check('float', '12.2') * 10 122.0 >>> vtor.check('float', 8.4) * 10 84.0 >>> vtor.check('float', 'a') # doctest: +SKIP Traceback (most recent call last): VdtTypeError: the value \"a\" is of the wrong type. >>> vtor.check('float(10.1)', '10.2') * 10 102.0 >>> vtor.check('float(max=20.2)', '15.1') * 10 151.0 >>> vtor.check('float(10.0)', '9.0') # doctest: +SKIP Traceback (most recent call last): VdtValueTooSmallError: the value \"9.0\" is too small. >>> vtor.check('float(max=20.0)', '35.0') # doctest: +SKIP Traceback (most recent call last): VdtValueTooBigError: the value \"35.0\" is too big.", "label": 1, "domain": "code", "token_count": 328, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0183", "text": "@example p a = Numo::NArray[0,1,2] # Numo::Int32#shape=[3] # [0, 1, 2] p a.tile(2) # Numo::Int32#shape=[6] # [0, 1, 2, 0, 1, 2] p a.tile(2,2) # Numo::Int32#shape=[2,6] # [[0, 1, 2, 0, 1, 2], # [0, 1, 2, 0, 1, 2]] p a.tile(2,1,2) # Numo::Int32#shape=[2,1,6] # [[[0, 1, 2, 0, 1, 2]], # [[0, 1, 2, 0, 1, 2]]] p b = Numo::NArray[[1, 2], [3, 4]] # Numo::Int32#shape=[2,2] # [[1, 2], # [3, 4]] p b.tile(2) # Numo::Int32#shape=[2,4] # [[1, 2, 1, 2], # [3, 4, 3, 4]] p b.tile(2,1) # Numo::Int32#shape=[4,2] # [[1, 2], # [3, 4], # [1, 2], # [3, 4]] p c = Numo::NArray[1,2,3,4] # Numo::Int32#shape=[4] # [1, 2, 3, 4] p c.tile(4,1) # Numo::Int32#shape=[4,4] # [[1, 2, 3, 4], # [1, 2, 3, 4], # [1, 2, 3, 4], # [1, 2, 3, 4]]", "label": 1, "domain": "code", "token_count": 451, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0184", "text": "Return the screen relative position of an element. @param {(string|Array|NodeList|HTMLCollection|Element)} element - The element. Note that it'll be passed to getElement to ensure there's only one. @return {(Object|boolean)} screenPosition - Element's screen position or false if no element found. @return {Object.top} top - Y-coordinate, relative to the viewport origin, of the top of the rectangle box. @return {Object.left} left - X-coordinate, relative to the viewport origin, of the left of the rectangle box. @example esnext import { setStyleProp, append, screenPosition } from 'chirashi' setStyleProp([document.documentElement, document.body], { position: 'relative', margin: 0, padding: 0 }) append(document.body, '.poulp') const poulp = setStyleProp('.poulp', { display: 'block', position: 'absolute', top: 200, left: 240, width: 100, height: 100, background: 'red' }) screenPosition(poulp) // returns: { top: 200, left: 240 } @example es5 Chirashi.setStyleProp([document.documentElement, document.body], { position: 'relative', margin: 0, padding: 0 }) Chirashi.append(document.body, '.poulp') var poulp = Chirashi.setStyleProp('.poulp', { display: 'block', position: 'absolute', top: 200, left: 240, width: 100, height: 100, background: 'red' }) Chirashi.screenPosition(poulp) // returns: { top: 200, left: 240 }", "label": 1, "domain": "code", "token_count": 360, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0185", "text": "The following rules apply for the cell information.
  • type: Is 0, if the cell is not a table cell.
  • rowIndex: Is null, if the cell is not a table cell or the SelectAll cell. The header rows and content rows have their own index areas. This means, that the index of the first content row starts from 0 again.
  • columnIndex: The index of the column in the columns aggregation. Is null, if the cell is not a table cell. Is -1 for row header cells (including the SelectAll cell). Is -2 for row action cells.
  • spanLength: Is null, if the cell is not a table cell. For all cells (including the SelectAll cell) other than column header cells the spanLength is always 1.
  • cell: Is null, if the cell is not a table cell.
@typedef {Object} sap.ui.table.TableUtils.CellInfo @property {sap.ui.table.TableUtils.CellType} [type] The type of the cell. @property {int | null} [rowIndex] The index of the row the cell is inside. @property {int | null} columnIndex The index of the column, in the columns aggregation, the cell is inside. @property {int | null} columnSpan The amount of columns the cell spans over. @property {jQuery | null} cell The jQuery reference to the table cell. @property {sap.ui.table.TableUtils.CellInfo#isOfType} isOfType Function to check for the type of the cell. Collects all available information of a table cell by reading the DOM and returns them in a single object. @param {jQuery | HTMLElement} oCellRef DOM reference of a table cell. @returns {sap.ui.table.TableUtils.CellInfo} An object containing information about the cell. @see sap.ui.table.TableUtils.CellInfo", "label": 1, "domain": "code", "token_count": 478, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0186", "text": "To get a list of SSH keys, run **GET** against */api/keys/* as authenticated user. A new SSH key can be created by any active users. Example of a valid request: .. code-block:: http POST /api/keys/ HTTP/1.1 Content-Type: application/json Accept: application/json Authorization: Token c84d653b9ec92c6cbac41c706593e66f567a7fa4 Host: example.com { \"name\": \"ssh_public_key1\", \"public_key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDURXDP5YhOQUYoDuTxJ84DuzqMJYJqJ8+SZT28 TtLm5yBDRLKAERqtlbH2gkrQ3US58gd2r8H9jAmQOydfvgwauxuJUE4eDpaMWupqquMYsYLB5f+vVGhdZbbzfc6DTQ2rY dknWoMoArlG7MvRMA/xQ0ye1muTv+mYMipnd7Z+WH0uVArYI9QBpqC/gpZRRIouQ4VIQIVWGoT6M4Kat5ZBXEa9yP+9du D2C05GX3gumoSAVyAcDHn/xgej9pYRXGha4l+LKkFdGwAoXdV1z79EG1+9ns7wXuqMJFHM2KDpxAizV0GkZcojISvDwuh vEAFdOJcqjyyH4FOGYa8usP1 jhon@example.com\", }", "label": 1, "domain": "code", "token_count": 379, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0187", "text": "Triggers restore of the state of the partition using the specified restore partition description. Restores the state of a of the stateful persisted partition using the specified backup point. In case the partition is already being periodically backed up, then by default the backup point is looked for in the storage specified in backup policy. One can also override the same by specifying the backup storage details as part of the restore partition description in body. Once the restore is initiated, its progress can be tracked using the GetRestoreProgress operation. In case, the operation times out, specify a greater restore timeout value in the query parameter. @param partition_id The identity of the partition. @param restore_partition_description [RestorePartitionDescription] Describes the parameters to restore the partition. @param restore_timeout [Integer] Specifies the maximum amount of time to wait, in minutes, for the restore operation to complete. Post that, the operation returns back with timeout error. However, in certain corner cases it could be that the restore operation goes through even though it completes with timeout. In case of timeout error, its recommended to invoke this operation again with a greater timeout value. the default value for the same is 10 minutes. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 326, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0188", "text": "TAP EVENTS AND GHOST CLICKS Why tap events? Mobile browsers detect a tap, then wait a moment (usually ~300ms) to see if you're double-tapping, and then fire a click event. This delay sucks and makes mobile apps feel unresponsive. So we detect touchstart, touchmove, touchcancel and touchend ourselves and determine when the user has tapped on something. What happens when the browser then generates a click event? The browser, of course, also detects the tap and fires a click after a delay. This results in tapping/clicking twice. So we do \"clickbusting\" to prevent it. How does it work? We attach global touchstart and click handlers, that run during the capture (early) phase. So the sequence for a tap is: - global touchstart: Sets an \"allowable region\" at the point touched. - element's touchstart: Starts a touch (- touchmove or touchcancel ends the touch, no click follows) - element's touchend: Determines if the tap is valid (didn't move too far away, didn't hold too long) and fires the user's tap handler. The touchend also calls preventGhostClick(). - preventGhostClick() removes the allowable region the global touchstart created. - The browser generates a click event. - The global click handler catches the click, and checks whether it was in an allowable region. - If preventGhostClick was called, the region will have been removed, the click is busted. - If the region is still there, the click proceeds normally. Therefore clicks on links and other elements without ngTap on them work normally. This is an ugly, terrible hack! Yeah, tell me about it. The alternatives are using the slow click events, or making our users deal with the ghost clicks, so I consider this the least of evils. Fortunately Angular encapsulates this ugly logic away from the user. Why not just put click handlers on the element? We do that too, just to be sure. The problem is that the tap event might have caused the DOM to change, so that the click fires in the same position but something else is there now. So the handlers are global and care only about coordinates and not elements. Checks if the coordinates are close enough to be within the region.", "label": 1, "domain": "code", "token_count": 468, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0189", "text": "Walk through a file directory and return an iterator of files that match requirements. Will autodetect if name has glob as magic characters. Note: For the example below, you can use find_files_list to return as a list, this is simply an easy way to show the output. .. code:: python list(reusables.find_files(name=\"ex\", match_case=True)) # ['C:\\\\example.pdf', # 'C:\\\\My_exam_score.txt'] list(reusables.find_files(name=\"*free*\")) # ['C:\\\\my_stuff\\\\Freedom_fight.pdf'] list(reusables.find_files(ext=\".pdf\")) # ['C:\\\\Example.pdf', # 'C:\\\\how_to_program.pdf', # 'C:\\\\Hunks_and_Chicks.pdf'] list(reusables.find_files(name=\"*chris*\")) # ['C:\\\\Christmas_card.docx', # 'C:\\\\chris_stuff.zip'] :param directory: Top location to recursively search for matching files :param ext: Extensions of the file you are looking for :param name: Part of the file name :param match_case: If name or ext has to be a direct match or not :param disable_glob: Do not look for globable names or use glob magic check :param depth: How many directories down to search :param abspath: Return files with their absolute paths :param enable_scandir: on python < 3.5 enable external scandir package :return: generator of all files in the specified directory", "label": 1, "domain": "code", "token_count": 301, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0190", "text": "@module thaliPullReplicationFromNotification @classdesc This class will listen for {@link module:thaliNotificationClient.event:peerAdvertisesDataForUs} events and then schedule replications. If we receive a notification for a peer that is on our list then we will check to see if we have already enqueued a job for them. If we have then we will have to kill it and create a new job since a second notification should really only have happened if some the values for the peer have changed. If there is no enqueued job or if there is a running job then we must enqueue a replication work item. Note: Functionality below is blocked on https://github.com/thaliproject/Thali_CordovaPlugin/issues/734 If we receive a notification that a peer is no longer available and there is a queued job for that peer then we will remove the queued job. If there is a running job then we will leave that job alone as presumably it will fail on its own or succeed since notifications that peers have gone isn't an exact science. It is possible for us to discover the same peer over two different transports (say Bluetooth and WiFi). In that case we treat each transport separately. In other words, we treat the combination of transport and user ID as a single value so that if we simultaneously find the same peer over two transports then we will schedule two replications. It is up to the peer pool manager to detect when we are trying to do the same action type for the same peer over two different transports and to then pick which one it prefers (if any, maybe it wants both). @public @param {PouchDB} PouchDB The factory we will use to create the database we will replicate all changes to. @param {string} localDbName The name of the local DB. The name of the remote DB could be either http://[host from discovery]:[port from discovery]/[BASE_DB_PATH]/[name] where name is taken from pouchDB.info's db_name field or where name is provided during runtime to {@link module:ThaliReplicationPeerAction.start} when it is being started. @param {module:thaliPeerPoolInterface~ThaliPeerPoolInterface} thaliPeerPoolInterface @param {Crypto.ECDH} ecdhForLocalDevice A Crypto.ECDH object initialized with the local device's public and private keys. @constructor", "label": 1, "domain": "code", "token_count": 494, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0191", "text": "Appends DOM elements to the given element as dictated by the layout structure object provided. If a name is provided, an additional CSS class, prepended with \"guac-keyboard-\", will be added to the top-level element. If the layout structure object is an array, all elements within that array will be recursively appended as children of a group, and the top-level element will be given the CSS class \"guac-keyboard-group\". If the layout structure object is an object, all properties within that object will be recursively appended as children of a group, and the top-level element will be given the CSS class \"guac-keyboard-group\". The name of each property will be applied as the name of each child object for the sake of CSS. Each property will be added in sorted order. If the layout structure object is a string, the key having that name will be appended. The key will be given the CSS class \"guac-keyboard-key\" and \"guac-keyboard-key-NAME\", where NAME is the name of the key. If the name of the key is a single character, this will first be transformed into the C-style hexadecimal literal for the Unicode codepoint of that character. For example, the key \"A\" would become \"guac-keyboard-key-0x41\". If the layout structure object is a number, a gap of that size will be inserted. The gap will be given the CSS class \"guac-keyboard-gap\", and will be scaled according to the same size units as each key. @private @param {Element} element The element to append elements to. @param {Array|Object|String|Number} object The layout structure object to use when constructing the elements to append. @param {String} [name] The name of the top-level element being appended, if any.", "label": 1, "domain": "code", "token_count": 372, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0192", "text": "Verifies a previously signed element crypto.verify sig, options, &block Must have the proper keys available. @param sig The signature itself. Must be possible to convert into a {GPGME::Data} object, so can be a file. @param [Hash] options * +:signed_text+ if the sign is detached, then must be the plain text for which the signature was created. * +:output+ where to store the result of the signature. Will be converted to a {GPGME::Data} object. * Any other option accepted by {GPGME::Ctx.new} @param &block In the block all the signatures are yielded, so one could verify them. See examples. @return [GPGME::Data] unless the sign is detached, the {GPGME::Data} object with the plain text. If the sign is detached, will return nil. @example simple verification sign = crypto.sign(\"Hi there\") data = crypto.verify(sign) { |signature| signature.valid? } data.read # => \"Hi there\" @example saving output to file sign = crypto.sign(\"Hi there\") out = File.open(\"test.asc\", \"w+\") crypto.verify(sign, :output => out) {|signature| signature.valid?} out.read # => \"Hi there\" @example verifying a detached signature sign = crypto.detach_sign(\"Hi there\") # Will fail crypto.verify(sign) { |signature| signature.valid? } # Will succeed crypto.verify(sign, :signed_text => \"hi there\") do |signature| signature.valid? end", "label": 1, "domain": "code", "token_count": 320, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0193", "text": "Get all prefix/suffix combinations from a list. It can extract just prefixes, just suffixes, or prefixes and suffixes of the same length. For example:
 List<String> items = Arrays.asList("a", "b", "c", "d"); System.out.println(CollectionUtils.getPrefixesAndSuffixes(items, 1, 2, null, true, true)); 
would print out:
 [[d], [a], [a, d], [d, c], [a, b], [a, b, c, d]] 
and
 List<String> items2 = Arrays.asList("a"); System.out.println(CollectionUtils.getPrefixesAndSuffixes(items2, 1, 2, null, true, true)); 
would print:
 [[a], [a], [a, a], [a, null], [a, null], [a, null, a, null]] 
@param The type of items contained in the list. @param items The list of items. @param minSize The minimum length of a prefix/suffix span (should be at least 1) @param maxSize The maximum length of a prefix/suffix span @param paddingSymbol Symbol to be included if we run out of bounds (e.g. if items has size 3 and we try to extract a span of length 4). @param includePrefixes whether to extract prefixes @param includeSuffixes whether to extract suffixes @return All prefix/suffix combinations of the given sizes.", "label": 1, "domain": "code", "token_count": 346, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0194", "text": "constructor: This class is still experimental, and more advanced use is likely to be buggy. Please report bugs. A DOMElement allows you to associate a HTMLElement with the display list. It will be transformed within the DOM as though it is child of the {{#crossLink \"Container\"}}{{/crossLink}} it is added to. However, it is not rendered to canvas, and as such will retain whatever z-index it has relative to the canvas (ie. it will be drawn in front of or behind the canvas). The position of a DOMElement is relative to their parent node in the DOM. It is recommended that the DOM Object be added to a div that also contains the canvas so that they share the same position on the page. DOMElement is useful for positioning HTML elements over top of canvas content, and for elements that you want to display outside the bounds of the canvas. For example, a tooltip with rich HTML content.

Mouse Interaction

DOMElement instances are not full EaselJS display objects, and do not participate in EaselJS mouse events or support methods like hitTest. To get mouse events from a DOMElement, you must instead add handlers to the htmlElement (note, this does not support EventDispatcher) var domElement = new createjs.DOMElement(htmlElement); domElement.htmlElement.onclick = function() { console.log(\"clicked\"); } Important: This class needs to be notified it is about to be drawn, this will happen automatically if you call stage.update, calling stage.draw or disabling tickEnabled will miss important steps and it will render stale information. @class DOMElement @extends DisplayObject @constructor @param {HTMLElement} htmlElement A reference or id for the DOM element to manage.", "label": 1, "domain": "code", "token_count": 362, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0195", "text": " Import the private RSA key stored in 'pem', and generate its public key (which will also be included in the returned rsakey object). In addition, a keyid identifier for the RSA key is generated. The object returned conforms to 'securesystemslib.formats.RSAKEY_SCHEMA' and has the form: {'keytype': 'rsa', 'scheme': 'rsassa-pss-sha256', 'keyid': keyid, 'keyval': {'public': '-----BEGIN RSA PUBLIC KEY----- ...', 'private': '-----BEGIN RSA PRIVATE KEY----- ...'}} The private key is a string in PEM format. >>> rsa_key = generate_rsa_key() >>> scheme = rsa_key['scheme'] >>> private = rsa_key['keyval']['private'] >>> passphrase = 'secret' >>> encrypted_pem = create_rsa_encrypted_pem(private, passphrase) >>> rsa_key2 = import_rsakey_from_private_pem(encrypted_pem, scheme, passphrase) >>> securesystemslib.formats.RSAKEY_SCHEMA.matches(rsa_key) True >>> securesystemslib.formats.RSAKEY_SCHEMA.matches(rsa_key2) True pem: A string in PEM format. The private key is extracted and returned in an rsakey object. scheme: The signature scheme used by the imported key. password: (optional) The password, or passphrase, to decrypt the private part of the RSA key if it is encrypted. 'password' is not used directly as the encryption key, a stronger encryption key is derived from it. securesystemslib.exceptions.FormatError, if the arguments are improperly formatted. securesystemslib.exceptions.UnsupportedAlgorithmError, if 'pem' specifies an unsupported key type. None. A dictionary containing the RSA keys and other identifying information. Conforms to 'securesystemslib.formats.RSAKEY_SCHEMA'.", "label": 1, "domain": "code", "token_count": 393, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0196", "text": "/*[deutsch]

Erzeugt eine neue Zeitspanne als Vereinigung dieser und der angegebenen Zeitspanne, wobei Beträge zu gleichen Zeiteinheiten addiert werden.

Um Zeitspannen mit verschiedenen Einheitstypen zu vereinigen, kann folgender Kniff angewandt werden:

 Duration<IsoUnit> zero = Duration.ofZero(); Duration<IsoUnit> result = zero.plus(this).plus(timespan); 

Hinweis zur Vorzeichenbehandlung: Wenn diese Dauer und die angegebene Zeitspanne verschiedene Vorzeichen haben, wird Time4J bei Bedarf eine automatische Normalisierung durchführen. Sind dann immer noch gemischte Vorzeichen für einzelne Dauerelemente vorhanden, wird eine Ausnahme geworfen. Es wird deshalb empfohlen, nur Zeitspannen mit gleichen Vorzeichen zusammenzuführen.

@param timespan other time span this duration will be merged with by adding the partial amounts @return new merged duration @throws IllegalStateException if the result gets mixed signs by adding the partial amounts @throws IllegalArgumentException if different units of same length exist @throws ArithmeticException in case of long overflow @see #union(TimeSpan)", "label": 1, "domain": "code", "token_count": 303, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0197", "text": "Joins the cluster.

Joining the cluster results in the local server being added to an existing cluster that has already been bootstrapped. The provided configuration will be used to connect to the existing cluster and submit a join request. Once the server has been added to the existing cluster's configuration, the join operation is complete.

Any {@link Member.Type type} of server may join a cluster. In order to join a cluster, the provided list of bootstrapped members must be non-empty and must include at least one active member of the cluster. If no member in the configuration is reachable, the server will continue to attempt to join the cluster until successful. If the provided cluster configuration is empty, the returned {@link CompletableFuture} will be completed exceptionally.

When the server joins the cluster, the local server will be transitioned into its initial state as defined by the configured {@link Member.Type}. Once the server has joined, it will immediately begin participating in Raft and asynchronous replication according to its configuration.

It's important to note that the provided cluster configuration will only be used the first time the server attempts to join the cluster. Thereafter, in the event that the server crashes and is restarted by {@code join}ing the cluster again, the last known configuration will be used assuming the server is configured with persistent storage. Only when the server leaves the cluster will its configuration and log be reset.

In order to preserve safety during configuration changes, Copycat leaders do not allow concurrent configuration changes. In the event that an existing configuration change (a server joining or leaving the cluster or a member being {@link Member#promote() promoted} or {@link Member#demote() demoted}) is under way, the local server will retry attempts to join the cluster until successful. If the server fails to reach the leader, the join will be retried until successful. @param cluster A collection of cluster member addresses to join. @return A completable future to be completed once the local server has joined the cluster.", "label": 1, "domain": "code", "token_count": 419, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0198", "text": "A check that tests that a given value is an integer (int, or long) and optionally, between bounds. A negative value is accepted, while a float will fail. If the value is a string, then the conversion is done - if possible. Otherwise a VdtError is raised. >>> vtor = Validator() >>> vtor.check('integer', '-1') -1 >>> vtor.check('integer', '0') 0 >>> vtor.check('integer', 9) 9 >>> vtor.check('integer', 'a') # doctest: +SKIP Traceback (most recent call last): VdtTypeError: the value \"a\" is of the wrong type. >>> vtor.check('integer', '2.2') # doctest: +SKIP Traceback (most recent call last): VdtTypeError: the value \"2.2\" is of the wrong type. >>> vtor.check('integer(10)', '20') 20 >>> vtor.check('integer(max=20)', '15') 15 >>> vtor.check('integer(10)', '9') # doctest: +SKIP Traceback (most recent call last): VdtValueTooSmallError: the value \"9\" is too small. >>> vtor.check('integer(10)', 9) # doctest: +SKIP Traceback (most recent call last): VdtValueTooSmallError: the value \"9\" is too small. >>> vtor.check('integer(max=20)', '35') # doctest: +SKIP Traceback (most recent call last): VdtValueTooBigError: the value \"35\" is too big. >>> vtor.check('integer(max=20)', 35) # doctest: +SKIP Traceback (most recent call last): VdtValueTooBigError: the value \"35\" is too big. >>> vtor.check('integer(0, 9)', False) 0", "label": 1, "domain": "code", "token_count": 398, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0199", "text": "/*[deutsch]

Interpretiert den angegebenen Text ab der angegebenen Position im Log.

Folgendes Beispiel demonstriert eine sinnvolle Anwendung, wenn es um die Massenverarbeitung geht:

 static final MultiFormatParser<PlainDate> MULTI_FORMAT_PARSER; static { ChronoFormatter<PlainDate> germanStyle = ChronoFormatter.ofDatePattern("d. MMMM uuuu", PatternType.CLDR, Locale.GERMAN); ChronoFormatter<PlainDate> frenchStyle = ChronoFormatter.ofDatePattern("d. MMMM uuuu", PatternType.CLDR, Locale.FRENCH); ChronoFormatter<PlainDate> usStyle = ChronoFormatter.ofDatePattern("MM/dd/uuuu", PatternType.CLDR, Locale.US); MULTI_FORMAT_PARSER = MultiFormatParser.of(germanStyle, frenchStyle, usStyle); } public Collection<PlainDate> parse(Collection<String> data) { Collection<PlainDate> parsedDates = new ArrayList<>(); ParseLog plog = new ParseLog(); int index = 0; for (String text : data) { PlainDate date = MULTI_FORMAT_PARSER.parse(text, plog); if ((date == null) || plog.isError()) { // Anwender werden ermuntert, ein gutes Logging-Framework ihrer Wahl hier zu verwenden System.out.println("Wrong entry found: " + text + " at position " + index); } else { parsedDates.add(date); } index++; } return Collections.unmodifiableCollection(parsedDates); } 

Hinweis: Die Methode toleriert nicht interpretierte Zeichen am Textende. Wenn dieses Verhalten nicht erwünscht ist, dann bitte die alternative Methode {@link #parse(CharSequence)} benutzen.

@param text text to be parsed @param status parser information (always as new instance) @return result or {@code null} if parsing does not work @throws IndexOutOfBoundsException if the start position is at end of text or even behind @since 3.14/4.11", "label": 1, "domain": "code", "token_count": 478, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0200", "text": "Gets the information about an application deployed on a Service Fabric node. Gets the information about an application deployed on a Service Fabric node. This query returns system application information if the application ID provided is for system application. Results encompass deployed applications in active, activating, and downloading states. This query requires that the node name corresponds to a node on the cluster. The query fails if the provided node name does not point to any active Service Fabric nodes on the cluster. @param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param include_health_state [Boolean] Include the health state of an entity. If this parameter is false or not specified, then the health state returned is \"Unknown\". When set to true, the query goes in parallel to the node and the health system service before the results are merged. As a result, the query is more expensive and may take a longer time. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 358, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0201", "text": "/* Method: morph This method will transform the current visualized graph into the new JSON representation passed in the method. The JSON object must at least have the root node in common with the current visualized graph. Parameters: json - (object) A json tree or graph structure. See also . opt - (object) Animation options. It's an object with optional properties described below type - (string) Default's *nothing*. Type of the animation. Can be \"nothing\", \"replot\", \"fade:con\". duration - Described in . fps - Described in . transition - Described in . hideLabels - (boolean) Default's *true*. Hide labels during the animation. id - (string) The shared id between both graphs. extraModes - (optional|object) When morphing with an animation, dollar prefixed data parameters are added to endData* and not *data* itself. This way you can animate dollar prefixed parameters during your morphing operation. For animating these extra-parameters you have to specify an object that has animation groups as keys and animation properties as values, just like specified in . Example: (start code js) ...json contains a tree or graph structure... var viz = new $jit.Viz(options); viz.op.morph(json, { type: 'fade', duration: 1000, hideLabels: false, transition: $jit.Trans.Quart.easeOut }); or also viz.op.morph(json, { type: 'fade', duration: 1500 }); if the json data contains dollar prefixed params like $width or $height these too can be animated viz.op.morph(json, { type: 'fade', duration: 1500 }, { 'node-property': ['width', 'height'] }); (end code)", "label": 1, "domain": "code", "token_count": 385, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0202", "text": "

Perform a CSS String level 1 (only basic set) escape operation on a char[] input.

Level 1 means this method will only escape the CSS String basic escape set:

  • The Backslash Escapes: \" (U+0022) and \' (U+0027).
  • Two ranges of non-displayable, control characters: U+0000 to U+001F and U+007F to U+009F.

This escape will be performed by using Backslash escapes whenever possible. For escaped characters that do not have an associated Backslash, default to \FF Hexadecimal Escapes.

This method calls {@link #escapeCssString(char[], int, int, java.io.Writer, CssStringEscapeType, CssStringEscapeLevel)} with the following preconfigured values:

  • type: {@link CssStringEscapeType#BACKSLASH_ESCAPES_DEFAULT_TO_COMPACT_HEXA}
  • level: {@link CssStringEscapeLevel#LEVEL_1_BASIC_ESCAPE_SET}

This method is thread-safe.

@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs", "label": 1, "domain": "code", "token_count": 462, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0203", "text": "rubocop:enable Metrics/ParameterLists Get the list of events matching name @param name [String] the name of the event (regex) @param not_found [Symbol] behaviour if there are no events matching name; :reject with exception, :return degenerate value, or :wait for a non-empty list @param found [Symbol] behaviour if there are already events matching name; :reject with exception, :return its current value, or :wait for its next value @return [Array[hash]] The list of { :name, :payload } hashes @param options [Hash] options parameter hash @note Events are sent via the gossip protocol; there is no guarantee of delivery success or order, but the local agent will store up to 256 events that do arrive. This method lists those events. It has the same semantics as Kv::get, except the value returned is a list i.e. the current value is all events up until now, the next value is the current list plus the next event to arrive. To get a specific event in the sequence, @see #get When trying to get a list of events matching a name, there are two possibilities: - The list doesn't (yet) exist / is empty - The list exists / is non-empty The combination of not_found and found behaviour gives maximum possible flexibility. For X: reject, R: return, W: wait - X X - meaningless; never return a value - X R - \"normal\" non-blocking get operation. Default - X W - get the next value only (must have a current value) - R X - meaningless; never return a meaningful value - R R - \"safe\" non-blocking, non-throwing get-or-default operation - R W - get the next value or a default - W X - get the first value only (must not have a current value) - W R - get the first or current value; always return something, but block only when necessary - W W - get the first or next value; wait until there is an update", "label": 1, "domain": "code", "token_count": 416, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0204", "text": "Lists report records by API Operations. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param filter [String] | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | |
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
@param top [Integer] Number of records to return. @param skip [Integer] Number of records to skip. @param orderby [String] OData order by query option. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ReportCollection] which provide lazy access to pages of the response.", "label": 1, "domain": "code", "token_count": 401, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0205", "text": "Calculates inverse profile - for given y returns x such that f(x) = y If given y is not found in the self.y, then interpolation is used. By default returns first result looking from left, if reverse argument set to True, looks from right. If y is outside range of self.y then np.nan is returned. Use inverse lookup to get x-coordinate of first point: >>> float(Profile([[0.0, 5.0], [0.1, 10.0], [0.2, 20.0], [0.3, 10.0]])\\ .x_at_y(5.)) 0.0 Use inverse lookup to get x-coordinate of second point, looking from left: >>> float(Profile([[0.0, 5.0], [0.1, 10.0], [0.2, 20.0], [0.3, 10.0]])\\ .x_at_y(10.)) 0.1 Use inverse lookup to get x-coordinate of fourth point, looking from right: >>> float(Profile([[0.0, 5.0], [0.1, 10.0], [0.2, 20.0], [0.3, 10.0]])\\ .x_at_y(10., reverse=True)) 0.3 Use interpolation between first two points: >>> float(Profile([[0.0, 5.0], [0.1, 10.0], [0.2, 20.0], [0.3, 10.0]])\\ .x_at_y(7.5)) 0.05 Looking for y below self.y range: >>> float(Profile([[0.0, 5.0], [0.1, 10.0], [0.2, 20.0], [0.3, 10.0]])\\ .x_at_y(2.0)) nan Looking for y above self.y range: >>> float(Profile([[0.0, 5.0], [0.1, 10.0], [0.2, 20.0], [0.3, 10.0]])\\ .x_at_y(22.0)) nan :param y: reference value :param reverse: boolean value - direction of lookup :return: x value corresponding to given y or NaN if not found", "label": 1, "domain": "code", "token_count": 496, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0206", "text": "Starts or stops a cluster node. Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To start a node, pass in \"Start\" for the NodeTransitionType parameter. To stop a node, pass in \"Stop\" for the NodeTransitionType parameter. This API starts the operation - when the API returns the node may not have finished transitioning yet. Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation. @param node_name [String] The name of the node. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param node_transition_type [NodeTransitionType] Indicates the type of transition to perform. NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop will stop a node that is up. Possible values include: 'Invalid', 'Start', 'Stop' @param node_instance_id [String] The node instance ID of the target node. This can be determined through GetNodeInfo API. @param stop_duration_in_seconds [Integer] The duration, in seconds, to keep the node stopped. The minimum value is 600, the maximum is 14400. After this time expires, the node will automatically come back up. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 350, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0207", "text": "Public: creates an envelope from a document directly without a template file_io - Optional: an opened file stream of data (if you don't want to save the file to the file system as an incremental step) file_path - Required if you don't provide a file_io stream, this is the local path of the file you wish to upload. Absolute paths recommended. file_name - The name you want to give to the file you are uploading content_type - (for the request body) application/json is what DocuSign is expecting email[subject] - (Optional) short subject line for the email email[body] - (Optional) custom text that will be injected into the DocuSign generated email email_settings[bcc_emails] - (Optional) array of emails to BCC. email_settings[reply_to_email] - (Optional) override the default reply to email for the account. email_settings[reply_to_name] - (Optional) override the default reply to name for the account. signers - A hash of users who should receive the document and need to sign it. More info about the options available for this method are documented above it's method definition. carbon_copies - An array of hashes that includes users names and email who should receive a copy of the document once it is complete. status - Options include: 'sent', 'created', 'voided' and determine if the envelope is sent out immediately or stored for sending at a later time customFields - (Optional) A hash of listCustomFields and textCustomFields. Each contains an array of corresponding customField hashes. For details, please see: http://bit.ly/1FnmRJx headers - Allows a client to pass in some headers wet_sign - (Optional) If true, the signer is allowed to print the document and sign it on paper. False if not defined. Returns a JSON parsed response object containing: envelopeId - The envelope's ID status - Sent, created, or voided statusDateTime - The date/time the envelope was created uri - The relative envelope uri", "label": 1, "domain": "code", "token_count": 416, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0208", "text": "Invoke container API on a container deployed on a Service Fabric node. Invoke container API on a container deployed on a Service Fabric node for the given code package. @param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_name [String] The name of code package specified in service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_instance_id [String] ID that uniquely identifies a code package instance deployed on a service fabric node. @param container_api_request_body [ContainerApiRequestBody] Parameters for making container API call @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 322, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0209", "text": "This operation generates a pre-paid UPS shipping label that you will use to ship your device to AWS for processing. See also: AWS API Documentation :example: response = client.get_shipping_label( jobIds=[ 'string', ], name='string', company='string', phoneNumber='string', country='string', stateOrProvince='string', city='string', postalCode='string', street1='string', street2='string', street3='string', APIVersion='string' ) :type jobIds: list :param jobIds: [REQUIRED] (string) -- :type name: string :param name: Specifies the name of the person responsible for shipping this package. :type company: string :param company: Specifies the name of the company that will ship this package. :type phoneNumber: string :param phoneNumber: Specifies the phone number of the person responsible for shipping this package. :type country: string :param country: Specifies the name of your country for the return address. :type stateOrProvince: string :param stateOrProvince: Specifies the name of your state or your province for the return address. :type city: string :param city: Specifies the name of your city for the return address. :type postalCode: string :param postalCode: Specifies the postal code for the return address. :type street1: string :param street1: Specifies the first part of the street address for the return address, for example 1234 Main Street. :type street2: string :param street2: Specifies the optional second part of the street address for the return address, for example Suite 100. :type street3: string :param street3: Specifies the optional third part of the street address for the return address, for example c/o Jane Doe. :type APIVersion: string :param APIVersion: Specifies the version of the client tool. :rtype: dict :return: { 'ShippingLabelURL': 'string', 'Warning': 'string' } :returns: (dict) -- ShippingLabelURL (string) -- Warning (string) --", "label": 1, "domain": "code", "token_count": 422, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0210", "text": "Given a point p, this function computes the point q1 on (or in) this OBB, closest to p and the point q2 on farest to p. @param cx x coordinate of the box center. @param cy y coordinate of the box center. @param cz z coordinate of the box center. @param axis1x x coordinate of the first axis of the box. @param axis1y y coordinate of the first axis of the box. @param axis1z z coordinate of the first axis of the box. @param axis2x x coordinate of the second axis of the box. @param axis2y y coordinate of the secons axis of the box. @param axis2z z coordinate of the second axis of the box. @param axis3x x coordinate of the second axis of the box. @param axis3y y coordinate of the secons axis of the box. @param axis3z z coordinate of the second axis of the box. @param axis1Extent extent of the first axis. @param axis2Extent extent of the second axis. @param axis3Extent extent of the third axis. @param x x coordinate of the point. @param y y coordinate of the point. @param z z coordinate of the point. @param closest set with the coordinates of the closest point, if not null. @param farthest set with the coordinates of the farthest point, if not null.", "label": 1, "domain": "code", "token_count": 304, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0211", "text": "Adds a row to the worksheet and updates auto fit data. @example - put a vanilla row in your spreadsheet ws.add_row [1, 'fish on my pl', '8'] @example - specify a fixed width for a column in your spreadsheet # The first column will ignore the content of this cell when calculating column autowidth. # The second column will include this text in calculating the columns autowidth # The third cell will set a fixed with of 80 for the column. # If you need to un-fix a column width, use :auto. That will recalculate the column width based on all content in the column ws.add_row ['I wish', 'for a fish', 'on my fish wish dish'], :widths=>[:ignore, :auto, 80] @example - specify a fixed height for a row ws.add_row ['I wish', 'for a fish', 'on my fish wish dish'], :height => 40 @example - create and use a style for all cells in the row blue = ws.styles.add_style :color => \"#00FF00\" ws.add_row [1, 2, 3], :style=>blue @example - only style some cells blue = ws.styles.add_style :color => \"#00FF00\" red = ws.styles.add_style :color => \"#FF0000\" big = ws.styles.add_style :sz => 40 ws.add_row [\"red fish\", \"blue fish\", \"one fish\", \"two fish\"], :style=>[red, blue, nil, big] # the last nil is optional @example - force the second cell to be a float value ws.add_row [3, 4, 5], :types => [nil, :float] @example - use << alias ws << [3, 4, 5], :types => [nil, :float] @see Worksheet#column_widths @return [Row] @option options [Array] values @option options [Array, Symbol] types @option options [Array, Integer] style @option options [Array] widths each member of the widths array will affect how auto_fit behavies. @option options [Float] height the row's height (in points)", "label": 1, "domain": "code", "token_count": 454, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0212", "text": "Return a sequence of mappings of attribute IDs to column values, to display to the user. nextPage/prevPage will strive never to skip items whose column values have not been returned by this method. This is best explained by a demonstration. Let's say you have a table viewing an item with attributes 'a' and 'b', like this: oid | a | b ----+---+-- 0 | 1 | 2 1 | 3 | 4 2 | 5 | 6 3 | 7 | 8 4 | 9 | 0 The table has 2 items per page. You call currentPage and receive a page which contains items oid 0 and oid 1. item oid 1 is deleted. If the next thing you do is to call nextPage, the result of currentPage following that will be items beginning with item oid 2. This is because although there are no longer enough items to populate a full page from 0-1, the user has never seen item #2 on a page, so the 'next' page from the user's point of view contains #2. If instead, at that same point, the next thing you did was to call currentPage, *then* nextPage and currentPage again, the first currentPage results would contain items #0 and #2; the following currentPage results would contain items #3 and #4. In this case, the user *has* seen #2 already, so the user expects to see the following item, not the same item again.", "label": 1, "domain": "code", "token_count": 312, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0213", "text": "Init the crawler @param options used to customize the crawler. The current options attributes are : - skipDuplicates : if true skips URLs that were already crawled - default is true - maxConnections : the number of connections used to crawl - default is 5 - rateLimits : number of milliseconds to delay between each requests (Default 0). Note that this option will force crawler to use only one connection - externalDomains : if true crawl the external domains. This option can crawl a lot of different linked domains, default = false. - externalHosts : if true crawl the others hosts on the same domain, default = false. - firstExternalLinkOnly : crawl only the first link found for external domains/hosts. externalHosts or externalDomains should be = true - scripts : if true crawl script tags - links : if true crawl link tags - linkTypes : the type of the links tags to crawl (match to the rel attribute), default : [\"canonical\", \"stylesheet\"] - images : if true crawl images - protocols : list of the protocols to crawl, default = [\"http\", \"https\"] - timeout : timeout per requests in milliseconds (Default 20000) - retries : number of retries if the request fails (default 3) - retryTimeout : number of milliseconds to wait before retrying (Default 10000) - depthLimit : the depth limit for the crawl - followRedirect : if true, the crawl will not return the 301, it will follow directly the redirection - proxyList : the list of proxies (see the project simple-proxies on npm) - storeModuleName : the npm nodule name used for the store implementation, by default : memory-store - storeParams : the params to pass to the store module when create it. - queueModuleName : the npm module name used for the job queue. By default : async-queue - queueParams : the params to pass to the job queue when create it. + all options provided by nodejs request : https://github.com/request/request @param callback() called when all URLs have been crawled @param proxies to used when making http requests (optional) @param logLevel : a new log level (eg. \"debug\") (optional, default value is info)", "label": 1, "domain": "code", "token_count": 451, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0214", "text": "Function for performing case folding. This function will take the input string s and return a copy of the string suitable for caseless comparisons. The input string must be of type 'unicode', otherwise a TypeError will be raised. For more information on case folding, see section 3.13 of the Unicode Standard. See also the following FAQ on the Unicode website: https://unicode.org/faq/casemap_charprop.htm By default, full case folding (where the string length may change) is done. It is possible to use simple case folding (single character mappings only) by setting the boolean parameter fullcasefold=False. By default, case folding does not handle the Turkic case of dotted vs dotless 'i'. To perform case folding using the special Turkic mappings, pass the boolean parameter useturkicmapping=True. For more info on the dotted vs dotless 'i', see the following web pages: https://en.wikipedia.org/wiki/Dotted_and_dotless_I http://www.i18nguy.com/unicode/turkish-i18n.html#problem :param s: String to transform :param fullcasefold: Boolean indicating if a full case fold (default is True) should be done. If False, a simple case fold will be performed. :param useturkicmapping: Boolean indicating if the special turkic mapping (default is False) for the dotted and dotless 'i' should be used. :return: Copy of string that has been transformed for caseless comparison.", "label": 1, "domain": "code", "token_count": 306, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0215", "text": "Creates diagrams of a nested sampling run's evolution as it iterates towards higher likelihoods, expressed as a function of log X, where X(L) is the fraction of the prior volume with likelihood greater than some value L. For a more detailed description and some example use cases, see 'nestcheck: diagnostic tests for nested sampling calculations\" (Higson et al. 2019). Parameters ---------- run_list: dict or list of dicts Nested sampling run(s) to plot. fthetas: list of functions, optional Quantities to plot. Each must map a 2d theta array to 1d ftheta array - i.e. map every sample's theta vector (every row) to a scalar quantity. E.g. use lambda x: x[:, 0] to plot the first parameter. labels: list of strs, optional Labels for each ftheta. ftheta_lims: dict, optional Plot limits for each ftheta. plot_means: bool, optional Should the mean value of each ftheta be plotted? n_simulate: int, optional Number of bootstrap replications to use for the fgivenx distributions. random_seed: int, optional Seed to make sure results are consistent and fgivenx caching can be used. logx_min: float, optional Lower limit of logx axis. figsize: tuple, optional Matplotlib figure size (in inches). colors: list of strs, optional Colors to plot run scatter plots with. colormaps: list of strs, optional Colormaps to plot run fgivenx plots with. npoints: int, optional How many points to have in the logx array used to calculate and plot analytical weights. cache: str or None Root for fgivenx caching (no caching if None). parallel: bool, optional fgivenx parallel optional point_size: float, optional size of markers on scatter plot (in pts) thin: float, optional factor by which to reduce the number of samples before plotting the scatter plot. Must be in half-closed interval (0, 1]. rasterize_contours: bool, optional fgivenx rasterize_contours option. tqdm_kwargs: dict, optional Keyword arguments to pass to the tqdm progress bar when it is used in fgivenx while plotting contours. Returns ------- fig: matplotlib figure", "label": 1, "domain": "code", "token_count": 465, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0216", "text": "Configures the given context with the given stage handling settings (if any) otherwise with the default stage handling settings partially overridden by the given stage handling options (if any), but only if stage handling is not already configured on the given context OR if forceConfiguration is true. The distinction between options and settings is that options are meant to contain only non-function properties typically loaded from a JSON file, whereas settings are meant to be constructed in code and hence can contain both non-function properties and functions if needed. @param {Object|StandardContext|StageHandling|Logger} context - the context to configure @param {StageHandlingSettings|undefined} [settings] - optional stage handling settings to use to configure stage handling @param {StageHandlingOptions|undefined} [options] - optional stage handling options to use to override default options @param {Object|StandardSettings|undefined} [otherSettings] - optional other settings to use to configure dependencies @param {LoggingSettings|undefined} [otherSettings.logging] - optional logging settings to use to configure logging @param {LoggingSettings|undefined} [otherSettings.loggingSettings] - LEGACY optional logging settings to use to configure logging (NB: otherSettings.loggingSettings will be ignored if otherSettings.logging is defined) @param {Object|StandardOptions|undefined} [otherOptions] - optional other options to use to configure dependencies if corresponding settings are not provided @param {LoggingOptions|undefined} [otherOptions.logging] - optional logging options to use to configure logging @param {LoggingOptions|undefined} [otherOptions.loggingOptions] - LEGACY optional logging options to use to configure logging (NB: otherOptions.loggingOptions will be ignored if otherOptions.logging is defined) @param {boolean|undefined} [forceConfiguration] - whether or not to force configuration of the given settings, which will override any previously configured stage handling settings on the given context @return {StageHandling|StandardContext} the given context object configured with stage handling settings and logging functionality", "label": 1, "domain": "code", "token_count": 402, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0217", "text": "Function takes devip ( ipv4 address ), ifIndex and pvid (vlanid) of specific device and 802.1q VLAN tag and issues a RESTFUL call to remove the specified VLAN from the target device. :param ifindex: str value of ifIndex for a specific interface on the device :param pvid: str value of dot1q VLAN desired to apply to the device :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :param devid: str requires devid of the target device :param devip: str of ipv4 address of the target device :return: int of 204 if successful or 409 if not succesful :rtype: int >>> from pyhpeimc.auth import * >>> from pyhpeimc.plat.vlanm import * >>> auth = IMCAuth(\"http://\", \"10.101.0.203\", \"8080\", \"admin\", \"admin\") >>> set_access_int_vlan = set_access_interface_pvid('9', '1', auth.creds, auth.url, devip='10.101.0.221') >>> set_access_int_vlan = set_access_interface_pvid('9', '10', auth.creds, auth.url, devip='10.101.0.221') >>> assert type(set_access_int_vlan) is int >>> assert set_access_int_vlan == 204 >>> set_access_int_vlan = set_access_interface_pvid('9', '1', auth.creds, auth.url, devip='10.101.0.221')", "label": 1, "domain": "code", "token_count": 349, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0218", "text": "Properties of a FileOptions. @memberof google.protobuf @interface IFileOptions @property {string|null} [javaPackage] FileOptions javaPackage @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor @property {string|null} [goPackage] FileOptions goPackage @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices @property {boolean|null} [deprecated] FileOptions deprecated @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix @property {string|null} [csharpNamespace] FileOptions csharpNamespace @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption Constructs a new FileOptions. @memberof google.protobuf @classdesc Represents a FileOptions. @implements IFileOptions @constructor @param {google.protobuf.IFileOptions=} [properties] Properties to set", "label": 1, "domain": "code", "token_count": 314, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0219", "text": "/*[deutsch]

Konstruiert einen musterbasierten Formatierer für allgemeine Chronologien.

Falls der Mustertyp gleich CLDR oder von CLDR abgeleitet ist, wird eine zusätzliche Musterprüfung ausgeführt, die folgende Symbolkombinationen ausschließt:

  • "h" oder "K" ohne "a" oder "b" oder "B" (12-Stunden-Uhr erfordert eine am/pm-Kennung oder einen Tagesabschnitt)
  • "Y" mit "M" oder "L" aber ohne "w" (Y als wochenbasiertes Jahr erfordert ein wochenbasiertes Format)
  • "D" mit "M" oder "L" aber ohne "d" (D ist der Tag des Jahres, nicht des Monats)

Hinweis: Diese Prüfung wird hier, aber nicht im {@code ChronoFormatter.Builder} durchgeführt (seit v4.20). Sie hat auch nicht den Anspruch, alle ungesunden Kombinationen zu finden, sondern soll lediglich einige besonders häufige Fehlerquellen abdecken.

@param generic chronological type @param pattern format pattern @param type the type of the pattern to be used @param locale format locale @param chronology chronology with format pattern support @return new {@code ChronoFormatter}-instance @throws IllegalArgumentException if resolving of pattern fails @see ChronoFormatter.Builder#addPattern(String, PatternType) @since 3.14/4.11", "label": 1, "domain": "code", "token_count": 419, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0220", "text": "Induces quorum loss for a given stateful service partition. Induces quorum loss for a given stateful service partition. This API is useful for a temporary quorum loss situation on your service. Call the GetQuorumLossProgress API with the same OperationId to return information on the operation started with this API. This can only be called on stateful persisted (HasPersistedState==true) services. Do not use this API on stateless services or stateful in-memory only services. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the service name is \"fabric:/myapp/app1/svc1\", the service identity would be \"myapp~app1~svc1\" in 6.0+ and \"myapp/app1/svc1\" in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param quorum_loss_mode [QuorumLossMode] This enum is passed to the StartQuorumLoss API to indicate what type of quorum loss to induce. Possible values include: 'Invalid', 'QuorumReplicas', 'AllReplicas' @param quorum_loss_duration [Integer] The amount of time for which the partition will be kept in quorum loss. This must be specified in seconds. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.", "label": 1, "domain": "code", "token_count": 392, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0221", "text": "Gets a Service-related events. The response is list of ServiceEvent objects. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the service name is \"fabric:/myapp/app1/svc1\", the service identity would be \"myapp~app1~svc1\" in 6.0+ and \"myapp/app1/svc1\" in previous versions. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 345, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0222", "text": "/#/snippet webDollarFuncs /#snippet extrasDollarFuncs /*$ @id wait @group EVENTS @configurable default @requires promise @name $.wait() @syntax $.wait() @syntax $.wait(durationMs) @syntax $.wait(durationMs, args) @module WEB+UTIL Creates a new ##promise#Promise## that will be fulfilled as soon as the specified number of milliseconds have passed. This is mainly useful for animation, because it allows you to chain delays into your animation chain. The operation can be interrupted by calling the promise's ##stop() function. @example Chained animation using Promise callbacks. The element is first moved to the position 200/0, then to 200/200, waits for 50ms and finally moves to 100/100.
 var div = $('#myMovingDiv').set({$left: '0px', $top: '0px'}); div.animate({$left: '200px', $top: '0px'}, 600, 0) .then(function() { div.animate({$left: '200px', $top: '200px'}, 800, 0); }).then(function() { return _.wait(50); }).then(function() { div.animate({$left: '100px', $top: '100px'}, 400); }); }); 
@param durationMs optional the number of milliseconds to wait. If omitted, the promise will be fulfilled as soon as the browser can run it from the event loop. @param args optional an array or list of arguments to pass to the promise handler @return a ##promise#Promise## object that will be fulfilled when the time is over, or fail when the promise's ##stop() has been called. The promise argument of a fulfilled promise is the args parameter as given to wait(). The returned promise supports ##stop() to interrupt the promise.", "label": 1, "domain": "code", "token_count": 402, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0223", "text": "Set value in ini file @function $file~ini/set @param {string} file - Ini File to write the value to @param {string} section - Section in which to add the key (null if global section) @param {string} key @param {string} value @param {Object} [options] @param {string} [options.encoding=utf-8] - Encoding used to read the file @param {boolean} [options.retryOnENOENT=true] - Retry if writing files because of the parent directory does not exists @throws Will throw an error if the path is not a file @example // Set a single property 'opcache.enable' under the 'opcache' section to 1 $file.ini.set('etc/php.ini', 'opcache', 'opcache.enable', 1); Set value in ini file @function $file~ini/set² @param {string} file - Ini File to write the value to @param {string} section - Section in which to add the key (null if global section) @param {Object} keyMapping - key-value map to set in the file @param {Object} [options] @param {string} [options.encoding=utf-8] - Encoding used to read the file @param {boolean} [options.retryOnENOENT=true] - Retry if writing files because of the parent directory does not exists @throws Will throw an error if the path is not a file @example // Set several properties under the 'opcache' section to 1 $file.ini.set('etc/php.ini', 'opcache', {'opcache.enable': 1, 'opcache.enable_cli': 1});", "label": 1, "domain": "code", "token_count": 342, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0224", "text": "Deletes an existing Service Fabric application. Deletes an existing Service Fabric application. An application must be created before it can be deleted. Deleting an application will delete all services that are part of that application. By default, Service Fabric will try to close service replicas in a graceful manner and then delete the service. However, if a service is having issues closing the replica gracefully, the delete operation may take a long time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully delete the application and all of the its services. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.", "label": 1, "domain": "code", "token_count": 329, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0225", "text": "Replies if two lines are parallel.

The given two lines are described respectivaly by two points, i.e. {@code (x1,y1,z1)} and {@code (x2,y2,z2)} for the first line, and {@code (x3,y3,z3)} and {@code (x4,y4,z4)} for the second line.

If you are interested to test if the two lines are colinear, see {@link #isCollinearLines(double, double, double, double, double, double, double, double, double, double, double, double)}. @param x1 is the X coordinate of the first point of the first line. @param y1 is the Y coordinate of the first point of the first line. @param z1 is the Z coordinate of the first point of the first line. @param x2 is the X coordinate of the second point of the first line. @param y2 is the Y coordinate of the second point of the first line. @param z2 is the Z coordinate of the second point of the first line. @param x3 is the X coordinate of the first point of the second line. @param y3 is the Y coordinate of the first point of the second line. @param z3 is the Z coordinate of the first point of the second line. @param x4 is the X coordinate of the second point of the second line. @param y4 is the Y coordinate of the second point of the second line. @param z4 is the Z coordinate of the second point of the second line. @return true if the two given lines are parallel. @see #isCollinearLines(double, double, double, double, double, double, double, double, double, double, double, double)", "label": 1, "domain": "code", "token_count": 380, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0226", "text": "Draw an image onto the main using the canvas api @name drawImage @memberOf me.CanvasRenderer.prototype @function @param {Image} image An element to draw into the context. The specification permits any canvas image source (CanvasImageSource), specifically, a CSSImageValue, an HTMLImageElement, an SVGImageElement, an HTMLVideoElement, an HTMLCanvasElement, an ImageBitmap, or an OffscreenCanvas. @param {Number} sx The X coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. @param {Number} sy The Y coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. @param {Number} sw The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used. @param {Number} sh The height of the sub-rectangle of the source image to draw into the destination context. @param {Number} dx The X coordinate in the destination canvas at which to place the top-left corner of the source image. @param {Number} dy The Y coordinate in the destination canvas at which to place the top-left corner of the source image. @param {Number} dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn. @param {Number} dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn. @example // Position the image on the canvas: renderer.drawImage(image, dx, dy); // Position the image on the canvas, and specify width and height of the image: renderer.drawImage(image, dx, dy, dWidth, dHeight); // Clip the image and position the clipped part on the canvas: renderer.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight);", "label": 1, "domain": "code", "token_count": 437, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0227", "text": "Executes ping on the device and returns a dictionary with the result :param destination: Host or IP Address of the destination :param source (optional): Source address of echo request :param ttl (optional): Maximum number of hops :param timeout (optional): Maximum seconds to wait after sending final packet :param size (optional): Size of request (bytes) :param count (optional): Number of ping request to send Output dictionary has one of following keys: * success * error In case of success, inner dictionary will have the followin keys: * probes_sent (int) * packet_loss (int) * rtt_min (float) * rtt_max (float) * rtt_avg (float) * rtt_stddev (float) * results (list) 'results' is a list of dictionaries with the following keys: * ip_address (str) * rtt (float) Example:: { 'success': { 'probes_sent': 5, 'packet_loss': 0, 'rtt_min': 72.158, 'rtt_max': 72.433, 'rtt_avg': 72.268, 'rtt_stddev': 0.094, 'results': [ { 'ip_address': u'1.1.1.1', 'rtt': 72.248 }, { 'ip_address': '2.2.2.2', 'rtt': 72.299 } ] } } OR { 'error': 'unknown host 8.8.8.8.8' }", "label": 1, "domain": "code", "token_count": 317, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0228", "text": "

Perform an HTML5 level 2 (result is ASCII) escape operation on a String input, writing results to a Writer.

Level 2 means this method will escape:

  • The five markup-significant characters: <, >, &, " and '
  • All non ASCII characters.

This escape will be performed by replacing those chars by the corresponding HTML5 Named Character References (e.g. '&acute;') when such NCR exists for the replaced character, and replacing by a decimal character reference (e.g. '&#8345;') when there there is no NCR for the replaced character.

This method calls {@link #escapeHtml(String, Writer, HtmlEscapeType, HtmlEscapeLevel)} with the following preconfigured values:

  • type: {@link org.unbescape.html.HtmlEscapeType#HTML5_NAMED_REFERENCES_DEFAULT_TO_DECIMAL}
  • level: {@link org.unbescape.html.HtmlEscapeLevel#LEVEL_2_ALL_NON_ASCII_PLUS_MARKUP_SIGNIFICANT}

This method is thread-safe.

@param text the String to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 411, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0229", "text": "Insert a variable of the names of the (sub)devices of the logged sequences into the given NetCDF file (1) We prepare a |NetCDFVariableBase| subclass with fixed (sub)device names: >>> from hydpy.core.netcdftools import NetCDFVariableBase, chars2str >>> from hydpy import make_abc_testable, TestIO >>> from hydpy.core.netcdftools import netcdf4 >>> Var = make_abc_testable(NetCDFVariableBase) >>> Var.subdevicenames = 'element1', 'element_2' (2) Without isolating variables, |NetCDFVariableBase.insert_subdevices| prefixes the name of the |NetCDFVariableBase| object to the name of the inserted variable and its dimensions. The first dimension corresponds to the number of (sub)devices, the second dimension to the number of characters of the longest (sub)device name: >>> var1 = Var('var1', isolate=False, timeaxis=1) >>> with TestIO(): ... file1 = netcdf4.Dataset('model1.nc', 'w') >>> var1.insert_subdevices(file1) >>> file1['var1_station_id'].dimensions ('var1_stations', 'var1_char_leng_name') >>> file1['var1_station_id'].shape (2, 9) >>> chars2str(file1['var1_station_id'][:]) ['element1', 'element_2'] >>> file1.close() (3) When isolating variables, we omit the prefix: >>> var2 = Var('var2', isolate=True, timeaxis=1) >>> with TestIO(): ... file2 = netcdf4.Dataset('model2.nc', 'w') >>> var2.insert_subdevices(file2) >>> file2['station_id'].dimensions ('stations', 'char_leng_name') >>> file2['station_id'].shape (2, 9) >>> chars2str(file2['station_id'][:]) ['element1', 'element_2'] >>> file2.close()", "label": 1, "domain": "code", "token_count": 422, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0230", "text": "Get interval pattern for a given skeleton format. The format string does contain pattern symbols (e.g. \"yMMMd\" or \"Hms\") and will be converted into the pattern in the used locale, which matches the wanted symbols best. The symbols must be in canonical order, that is: Era (G), Year (y/Y), Quarter (q/Q), Month (M/L), Week (w/W), Day-Of-Week (E/e/c), Day (d/D), Hour (h/H/k/K/), Minute (m), Second (s), Timezone (z/Z/v/V/O/X/x) See http://unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems @param {string} sSkeleton the wanted skeleton format for the datetime pattern @param {object|string} vGreatestDiff is either a string which represents the symbol matching the greatest difference in the two dates to format or an object which contains key-value pairs. The value is always true. The key is one of the date field symbol groups whose value are different between the two dates. The key can only be set with 'Year', 'Quarter', 'Month', 'Week', 'Day', 'DayPeriod', 'Hour', 'Minute', or 'Second'. @param {sap.ui.core.CalendarType} [sCalendarType] the type of calendar. If it's not set, it falls back to the calendar type either set in configuration or calculated from locale. @returns {string|string[]} the best matching interval pattern if interval difference is given otherwise an array with all possible interval patterns which match the given skeleton format @since 1.46 @public", "label": 1, "domain": "code", "token_count": 337, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0231", "text": "

Returns a {@link Transformer} that allows processing of the source stream to be defined in a state machine where transitions of the state machine may also emit items to downstream that are buffered if necessary when backpressure is requested. flatMap is part of the processing chain so the source may experience requests for more items than are strictly required by the endpoint subscriber.

\"marble @param initialStateFactory the factory to create the initial state of the state machine. @param transition defines state transitions and consequent emissions to downstream when an item arrives from upstream. The {@link Subscriber} is called with the emissions to downstream. You can optionally call {@link Subscriber#isUnsubscribed()} to check if you can stop emitting from the transition. If you do wish to terminate the Observable then call {@link Subscriber#unsubscribe()} and return anything (say {@code null} from the transition (as the next state which will not be used). You can also complete the Observable by calling {@link Subscriber#onCompleted} or {@link Subscriber#onError} from within the transition and return anything from the transition (will not be used). The transition should run synchronously so that completion of a call to the transition should also signify all emissions from that transition have been made. @param completion defines activity that should happen based on the final state just before downstream onCompleted() is called. For example any buffered emissions in state could be emitted at this point. Don't call observer.onCompleted() as it is called for you after the action completes if and only if you return true from this function. @param backpressureStrategy is applied to the emissions from one call of transition and should enforce backpressure. @param the class representing the state of the state machine @param the input observable type @param the output observable type @throws NullPointerException if {@code initialStateFactory} or {@code transition},or {@code completionAction} is null @return a backpressure supporting transformer that implements the state machine specified by the parameters", "label": 1, "domain": "code", "token_count": 456, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0232", "text": "Returns the top and left offset of an element. Offset is relative to web page. @param {(string|Array|NodeList|HTMLCollection|Element)} element - The element. Note that it'll be passed to getElement to ensure there's only one. @return {(Object|boolean)} offset - Offset object or false if no element found. @return {Object.top} top - Top offset in pixels. @return {Object.left} left - Left offset in pixels. @example //esnext import { setStyleProp, append, offset } setStyleProp([document.documentElement, document.body], { position: 'relative', margin: 0, padding: 0 }) append(document.body, '.sushi') const sushi = setStyleProp('.sushi', { display: 'block', width: 100, height: 100, position: 'absolute', top: 200, left: 240, background: 'red' }) offset(sushi) // returns: { top: 200, left: 240 } @example //es5 Chirashi.setStyleProp([document.documentElement, document.body], { position: 'relative', margin: 0, padding: 0 }) Chirashi.append(document.body, '.sushi') var sushi = Chirashi.setStyleProp('.sushi', { display: 'block', width: 100, height: 100, position: 'absolute', top: 200, left: 240, background: 'red' }) Chirashi.offset(sushi) // returns: { top: 200, left: 240 }", "label": 1, "domain": "code", "token_count": 324, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0233", "text": "Takes the table with a event_number column and returns chunks with the size up to chunk_size. The chunks are chosen in a way that the events are not splitted. Additional parameters can be set to increase the readout speed. Events between a certain range can be selected. Also the start and the stop indices limiting the table size can be specified to improve performance. The event_number column must be sorted. In case of try_speedup is True, it is important to create an index of event_number column with pytables before using this function. Otherwise the queries are slowed down. Parameters ---------- table : pytables.table The data. start_event_number : int The retruned data contains events with event number >= start_event_number. If None, no limit is set. stop_event_number : int The retruned data contains events with event number < stop_event_number. If None, no limit is set. start_index : int Start index of data. If None, no limit is set. stop_index : int Stop index of data. If None, no limit is set. chunk_size : int Maximum chunk size per read. try_speedup : bool If True, try to reduce the index range to read by searching for the indices of start and stop event number. If these event numbers are usually not in the data this speedup can even slow down the function! The following parameters are not used when try_speedup is True: first_event_aligned : bool If True, assuming that the first event is aligned to the data chunk and will be added. If False, the lowest event number of the first chunk will not be read out. fail_on_missing_events : bool If True, an error is given when start_event_number or stop_event_number is not part of the data. Returns ------- Iterator of tuples Data of the actual data chunk and start index for the next chunk. Example ------- start_index = 0 for scan_parameter in scan_parameter_range: start_event_number, stop_event_number = event_select_function(scan_parameter) for data, start_index in data_aligned_at_events(table, start_event_number=start_event_number, stop_event_number=stop_event_number, start_index=start_index): do_something(data) for data, index in data_aligned_at_events(table): do_something(data)", "label": 1, "domain": "code", "token_count": 455, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0234", "text": "Lists the usage details by billingAccountId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later. @param billing_account_id [String] BillingAccount ID @param expand [String] May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. @param filter [String] May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName, properties/instanceId or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). @param skiptoken [String] Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. @param top [Integer] May be used to limit the number of results to the most recent N usageDetails. @param query_options [QueryOptions] Additional parameters for the operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 322, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0235", "text": "Set an option based on a String array in the style of commandline flags. The option may be either one known by the Options object, or one recognized by the TreebankLangParserParams which has already been set up inside the Options object, and then the option is set in the language-particular TreebankLangParserParams. Note that despite this method being an instance method, many flags are actually set as static class variables in the Train and Test classes (this should be fixed some day). Some options (there are many others; see the source code):

  • -maxLength n set the maximum length sentence to parse (inclusively)
  • -printTT print the training trees in raw, annotated, and annotated+binarized form. Useful for debugging and other miscellany.
  • -printAnnotated filename use only in conjunction with -printTT. Redirects printing of annotated training trees to filename.
  • -forceTags when the parser is tested against a set of gold standard trees, use the tagged yield, instead of just the yield, as input.
@param flags An array of options arguments, command-line style. E.g. {\"-maxLength\", \"50\"}. @param i The index in flags to start at when processing an option @return The index in flags of the position after the last element used in processing this option. @throws IllegalArgumentException If the current array position cannot be processed as a valid option", "label": 1, "domain": "code", "token_count": 325, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0236", "text": "@type {Object} @typedef Access @property {Date} expiration - Date object which represents when the access token expires. @property {String} accessToken - A token to be used for requests to the Smartcar API @property {String} refreshToken - A token which is used to renew access when the current access token expires, expires in 60 days @property {Date} refreshExpiration - Date object which represents when the refresh token expires. @example { expiration: new Date('2017-05-26T01:21:27.070Z'), accessToken: '88704225-9f6c-4919-93e7-e0cec71317ce', refreshToken: '60a9e801-6d26-4d88-926e-5c7f9fc13486', refreshExpiration: new Date('2017-05-26T01:21:27.070Z'), } Create a Smartcar OAuth client for your application. @constructor @param {Object} options @param {String} options.clientId - Application client id obtained from [Smartcar Developer Portal](https://developer.smartcar.com). If you do not have access to the dashboard, please [request access](https://smartcar.com/subscribe). @param {String} options.clientSecret - The application's client secret. @param {String} options.redirectUri - Redirect URI registered in the [application settings](https://developer.smartcar.com/apps). The given URL must exactly match one of the registered URLs. @param {String[]} [options.scope=all] - List of permissions your application requires. This will default to requiring all scopes. The valid permission names are found in the [API Reference](https://smartcar.com/docs#get-all-vehicles). @param {Boolean} [options.testMode=false] - Launch the Smartcar auth flow in test mode. [API Reference](https://smartcar.com/docs#request-authorization). @param {Boolean} [options.development=false] - DEPRECATED: Launch Smartcar auth in development mode to enable mock vehicle brands.", "label": 1, "domain": "code", "token_count": 425, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0237", "text": "

Fills a Java object with the provided value. The key of the entry corresponds to the name of the property to set. The value of the entry corresponds to the value to set on the Java object.

The keys can contain '.' to set nested values.

Override parameter allows to indicate which source has higher priority:
  • If true, then the value provided in the entry will be always set on the bean
  • If false then there are two cases:
    • If the property value of the bean is null, then the value that comes from the entry is used
    • If the property value of the bean is not null, then this value is unchanged and the value in the entry is not used
Skip unknown parameter allows to indicate if execution should fail or not:
  • If true and a property provided in the entry doesn't exist, then there is no failure and no change is applied to the bean
  • If false and a property provided in the entry doesn't exist, then the method fails immediately.
@param bean the bean to populate @param entry the name/value pair @param options options used to @throws BeanException when the bean couldn't be populated @throws InvocationTargetException when the setter method can't be called @throws IllegalAccessException when the field can't be accessed due to security restrictions", "label": 1, "domain": "code", "token_count": 305, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0238", "text": "Gets the health of a Service Fabric stateful service replica or stateless service instance. Gets the health of a Service Fabric replica. Use EventsHealthStateFilter to filter the collection of health events reported on the replica based on the health state. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. - Default - Default value. Matches any HealthState. The value is zero. - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. - Ok - Filter that matches input with HealthState value Ok. The value is 2. - Warning - Filter that matches input with HealthState value Warning. The value is 4. - Error - Filter that matches input with HealthState value Error. The value is 8. - All - Filter that matches input with any HealthState value. The value is 65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ReplicaHealth] operation results.", "label": 1, "domain": "code", "token_count": 406, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0239", "text": "/*[deutsch]

Erzeugt eine Kopie mit der angegebenen Zeitzone, die beim Formatieren oder Parsen verwendet werden soll.

Die Zeitzone ist nur für den Typ {@link net.time4j.Moment} von Bedeutung. Beim Formatieren wandelt sie die UTC-Darstellung in eine zonale Repräsentation um. Beim Parsen dient sie entweder als Ersatzwert, wenn im zu interpretierenden Text keine Zeitzone gefunden werden konnte. Oder sie dient zur Auflösung von möglicherweise mehrdeutigen Zoneninformationen. Beispiel:

 // IST kann auch Dublin/Ireland oder Kolkata/India sein String input = "Dec 31 07:30:00 IST 2016"; ChronoFormatter<Moment> f = ChronoFormatter.setUp(Moment.axis(), Locale.ENGLISH) .addPattern("MMM dd HH:mm:ss z yyyy", PatternType.CLDR) .build(); assertThat( f.withTimezone(ASIA.JERUSALEM).parse(input), // hier Vorrang für Israel-Zeit gewählt is(PlainTimestamp.of(2016, 12, 31, 5, 30).atUTC())); 
@param tz timezone @return changed copy with the new or changed timezone while this instance remains unaffected @see Attributes#TIMEZONE_ID @see Attributes#TRANSITION_STRATEGY @since 3.11/4.8", "label": 1, "domain": "code", "token_count": 342, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0240", "text": "Returns the number of timesteps possible, given the registered arrays and a memory budget defined by bytes_available Arguments ---------------- bytes_available : int The memory budget, or available number of bytes for solving the problem. arrays : list List of dictionaries describing the arrays template : dict Dictionary containing key-values that will be used to replace any string representations of dimensions and types. slvr.template_dict() will return something suitable. dim_ord : list list of dimension string names that the problem should be subdivided by. e.g. ['ntime', 'nbl', 'nchan']. Multple dimensions can be reduced simultaneously using the following syntax 'nbl&na'. This is mostly useful for the baseline-antenna equivalence. nsolvers : int Number of solvers to budget for. Defaults to one. Returns ---------- A tuple (boolean, dict). The boolean is True if the problem can fit within the supplied budget, False otherwise. THe dictionary contains the reduced dimensions as key and the reduced size as value. e.g. (True, { 'time' : 1, 'nbl' : 1 }) For a dim_ord = ['ntime', 'nbl', 'nchan'], this method will try and fit a ntime x nbl x nchan problem into the available number of bytes. If this is not possible, it will first set ntime=1, and then try fit an 1 x nbl x nchan problem into the budget, then a 1 x 1 x nchan problem. One can specify reductions for specific dimensions. For e.g. ['ntime=20', 'nbl=1&na=2', 'nchan=50%'] will reduce ntime to 20, but no lower. nbl=1&na=2 sets both nbl and na to 1 and 2 in the same operation respectively. nchan=50\\% will continuously halve the nchan dimension until it reaches a value of 1.", "label": 1, "domain": "code", "token_count": 403, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0241", "text": "

Perform an HTML 4 level 2 (result is ASCII) escape operation on a String input, writing results to a Writer.

Level 2 means this method will escape:

  • The five markup-significant characters: <, >, &, " and '
  • All non ASCII characters.

This escape will be performed by replacing those chars by the corresponding HTML 4 Named Character References (e.g. '&acute;') when such NCR exists for the replaced character, and replacing by a decimal character reference (e.g. '&#8345;') when there there is no NCR for the replaced character.

This method calls {@link #escapeHtml(String, Writer, HtmlEscapeType, HtmlEscapeLevel)} with the following preconfigured values:

  • type: {@link org.unbescape.html.HtmlEscapeType#HTML4_NAMED_REFERENCES_DEFAULT_TO_DECIMAL}
  • level: {@link org.unbescape.html.HtmlEscapeLevel#LEVEL_2_ALL_NON_ASCII_PLUS_MARKUP_SIGNIFICANT}

This method is thread-safe.

@param text the String to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 413, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0242", "text": "Read the next interval histogram from the log, if interval falls within an absolute or relative time range. Timestamps are assumed to appear in order in the log file, and as such this method will return a null upon encountering a timestamp larger than range_end_time_sec. Relative time range: the range is assumed to be in seconds relative to the actual timestamp value found in each interval line in the log Absolute time range: Absolute timestamps are calculated by adding the timestamp found with the recorded interval to the [latest, optional] start time found in the log. The start time is indicated in the log with a \"#[StartTime: \" followed by the start time in seconds. Params: dest_histogram if None, created a new histogram, else adds the new interval histogram to it range_start_time_sec The absolute or relative start of the expected time range, in seconds. range_start_time_sec The absolute or relative end of the expected time range, in seconds. absolute Defines if the passed range is absolute or relative Return: Returns an histogram object if an interval line was found with an associated start timestamp value that falls between start_time_sec and end_time_sec, or null if no such interval line is found. Upon encountering any unexpected format errors in reading the next interval from the file, this method will return None. The histogram returned will have it's timestamp set to the absolute timestamp calculated from adding the interval's indicated timestamp value to the latest [optional] start time found in the log. Exceptions: ValueError if there is a syntax error in one of the float fields", "label": 1, "domain": "code", "token_count": 309, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0243", "text": "Gets the list of transitions that can be run on the given object. Valid requirement options: * :from - One or more states being transitioned from. If none are specified, then this will be the object's current state. * :to - One or more states being transitioned to. If none are specified, then this will match any to state. * :on - One or more events that fire the transition. If none are specified, then this will match any event. * :guard - Whether to guard transitions with the if/unless conditionals defined for each one. Default is true. == Examples class Vehicle state_machine :initial => :parked do event :park do transition :idling => :parked end event :ignite do transition :parked => :idling end end end events = Vehicle.state_machine.events vehicle = Vehicle.new # => # events.transitions_for(vehicle) # => [#] vehicle.state = 'idling' events.transitions_for(vehicle) # => [#] # Search for explicit transitions regardless of the current state events.transitions_for(vehicle, :from => :parked) # => [#]", "label": 1, "domain": "code", "token_count": 358, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0244", "text": "This function drives the initiating side of the context establishment process. It is expected to be called in tandem with the {@link #acceptSecContext(byte[], int, int) acceptSecContext} function.
The behavior of context establishment process can be modified by {@link GSSConstants#GSS_MODE GSSConstants.GSS_MODE}, {@link GSSConstants#DELEGATION_TYPE GSSConstants.DELEGATION_TYPE}, and {@link GSSConstants#REJECT_LIMITED_PROXY GSSConstants.REJECT_LIMITED_PROXY} context options. If the {@link GSSConstants#GSS_MODE GSSConstants.GSS_MODE} option is set to {@link GSIConstants#MODE_SSL GSIConstants.MODE_SSL} the context establishment process will be compatible with regular SSL (no credential delegation support). If the option is set to {@link GSIConstants#MODE_GSI GSIConstants.GSS_MODE_GSI} credential delegation during context establishment process will performed. The delegation type to be performed can be set using the {@link GSSConstants#DELEGATION_TYPE GSSConstants.DELEGATION_TYPE} context option. If the {@link GSSConstants#REJECT_LIMITED_PROXY GSSConstants.REJECT_LIMITED_PROXY} option is enabled, a peer presenting limited proxy credential will be automatically rejected and the context establishment process will be aborted. @return a byte[] containing the token to be sent to the peer. null indicates that no token is generated (needs more data).", "label": 1, "domain": "code", "token_count": 300, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0245", "text": "@!group Actions @example Request syntax with placeholder values object_acl.put({ acl: \"private\", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control access_control_policy: { grants: [ { grantee: { display_name: \"DisplayName\", email_address: \"EmailAddress\", id: \"ID\", type: \"CanonicalUser\", # required, accepts CanonicalUser, AmazonCustomerByEmail, Group uri: \"URI\", }, permission: \"FULL_CONTROL\", # accepts FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP }, ], owner: { display_name: \"DisplayName\", id: \"ID\", }, }, content_md5: \"ContentMD5\", grant_full_control: \"GrantFullControl\", grant_read: \"GrantRead\", grant_read_acp: \"GrantReadACP\", grant_write: \"GrantWrite\", grant_write_acp: \"GrantWriteACP\", request_payer: \"requester\", # accepts requester version_id: \"ObjectVersionId\", }) @param [Hash] options ({}) @option options [String] :acl The canned ACL to apply to the object. @option options [Types::AccessControlPolicy] :access_control_policy @option options [String] :content_md5 @option options [String] :grant_full_control Allows grantee the read, write, read ACP, and write ACP permissions on the bucket. @option options [String] :grant_read Allows grantee to list the objects in the bucket. @option options [String] :grant_read_acp Allows grantee to read the bucket ACL. @option options [String] :grant_write Allows grantee to create, overwrite, and delete any object in the bucket. @option options [String] :grant_write_acp Allows grantee to write the ACL for the applicable bucket. @option options [String] :request_payer Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html @option options [String] :version_id VersionId used to reference a specific version of the object. @return [Types::PutObjectAclOutput]", "label": 1, "domain": "code", "token_count": 484, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0246", "text": " Determine whether the private key corresponding to 'public_key' produced 'signature'. verify_signature() will use the public key, the 'scheme' and 'sig', and 'data' arguments to complete the verification. >>> public, private = generate_public_and_private() >>> data = b'The quick brown fox jumps over the lazy dog' >>> scheme = 'ed25519' >>> signature, scheme = \\ create_signature(public, private, data, scheme) >>> verify_signature(public, scheme, signature, data, use_pynacl=False) True >>> verify_signature(public, scheme, signature, data, use_pynacl=True) True >>> bad_data = b'The sly brown fox jumps over the lazy dog' >>> bad_signature, scheme = \\ create_signature(public, private, bad_data, scheme) >>> verify_signature(public, scheme, bad_signature, data, use_pynacl=False) False public_key: The public key is a 32-byte string. scheme: 'ed25519' signature scheme used by either the pure python implementation (i.e., ed25519.py) or PyNacl (i.e., 'nacl'). signature: The signature is a 64-byte string. data: Data object used by securesystemslib.ed25519_keys.create_signature() to generate 'signature'. 'data' is needed here to verify the signature. use_pynacl: True, if the ed25519 signature should be verified by PyNaCl. False, if the signature should be verified with the pure Python implementation of ed25519 (slower). securesystemslib.exceptions.UnsupportedAlgorithmError. Raised if the signature scheme 'scheme' is not one supported by securesystemslib.ed25519_keys.create_signature(). securesystemslib.exceptions.FormatError. Raised if the arguments are improperly formatted. securesystemslib._vendor.ed25519.ed25519.checkvalid() called to do the actual verification. nacl.signing.VerifyKey.verify() called if 'use_pynacl' is True. Boolean. True if the signature is valid, False otherwise.", "label": 1, "domain": "code", "token_count": 434, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0247", "text": ">>> import pprint >>> input_line = '[2017-08-30T06:27:19,158] [WARN ][o.e.m.j.JvmGcMonitorService] [Glsuj_2] [gc][296816] overhead, spent [1.2s] collecting in the last [1.3s]' >>> output_line = elasticsearch(input_line) >>> pprint.pprint(output_line) {'data': {'garbage_collector': 'gc', 'gc_count': 296816.0, 'level': 'WARN', 'message': 'o.e.m.j.JvmGcMonitorService', 'plugin': 'Glsuj_2', 'query_time_ms': 1200.0, 'resp_time_ms': 1300.0, 'timestamp': '2017-08-30T06:27:19,158'}, 'event': 'o.e.m.j.JvmGcMonitorService', 'level': 'WARN ', 'timestamp': '2017-08-30T06:27:19,158', 'type': 'metric'} Case 2: [2017-09-13T23:15:00,415][WARN ][o.e.i.e.Engine ] [Glsuj_2] [filebeat-2017.09.09][3] failed engine [index] java.nio.file.FileSystemException: /home/user/elasticsearch/data/nodes/0/indices/jsVSO6f3Rl-wwBpQyNRCbQ/3/index/_0.fdx: Too many open files at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) ~[?:?]", "label": 1, "domain": "code", "token_count": 347, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0248", "text": "Defines that this controller belongs to another resource. belongs_to :projects == Options * :parent_class - Allows you to specify what is the parent class. belongs_to :project, :parent_class => AdminProject * :class_name - Also allows you to specify the parent class, but you should give a string. Added for ActiveRecord belongs to compatibility. * :instance_name - The instance variable name. By default is the name of the association. belongs_to :project, :instance_name => :my_project * :finder - Specifies which method should be called to instantiate the parent. belongs_to :project, :finder => :find_by_title! This will make your projects be instantiated as: Project.find_by_title!(params[:project_id]) Instead of: Project.find(params[:project_id]) * :param - Allows you to specify params key to retrieve the id. Default is :association_id, which in this case is :project_id. * :route_name - Allows you to specify what is the route name in your url helper. By default is association name. * :collection_name - Tell how to retrieve the next collection. Let's suppose you have Tasks which belongs to Projects which belongs to companies. This will do somewhere down the road: @company.projects But if you want to retrieve instead: @company.admin_projects You supply the collection name. * :polymorphic - Tell the association is polymorphic. * :singleton - Tell it's a singleton association. * :optional - Tell the association is optional (it's a special type of polymorphic association)", "label": 1, "domain": "code", "token_count": 363, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0249", "text": "Creates a proxy certificate from the certificate request. (Signs a certificate request creating a new certificate) @see #createProxyCertificate(X509Certificate, PrivateKey, PublicKey, int, int, X509ExtensionSet, String) createProxyCertificate @param certRequestInputStream the input stream to read the certificate request from. @param cert the issuer certificate @param privateKey the private key to sign the new certificate with. @param lifetime lifetime of the new certificate in seconds. If 0 (or less then) the new certificate will have the same lifetime as the issuing certificate. @param certType the type of proxy credential to create @param extSet a set of X.509 extensions to be included in the new proxy certificate. Can be null. If delegation mode is {@link org.globus.gsi.GSIConstants.CertificateType#GSI_3_RESTRICTED_PROXY GSIConstants.CertificateType.GSI_3_RESTRICTED_PROXY} or {@link org.globus.gsi.GSIConstants.CertificateType#GSI_4_RESTRICTED_PROXY GSIConstants.CertificateType.GSI_4_RESTRICTED_PROXY} then {@link org.globus.gsi.proxy.ext.ProxyCertInfoExtension ProxyCertInfoExtension} must be present in the extension set. @param cnValue the value of the CN component of the subject of the new certificate. If null, the defaults will be used depending on the proxy certificate type created. @return X509Certificate the new proxy certificate @exception IOException if error reading the certificate request @exception GeneralSecurityException if a security error occurs.", "label": 1, "domain": "code", "token_count": 324, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0250", "text": "Defines a child node of OOXML object. === Parameters * +klass+ - Class (descendant of RubyXL::OOXMLObject) of the child nodes. Child node objects will be produced by calling +parse+ method of that class. * +extra_parameters+ - Hash of optional parameters as follows: * +:accessor+ - Name of the accessor for this attribute to be defined on the object. If not provided, defaults to classidied +attribute_name+. * +:node_name+ - Node name for the child node, in case it does not match the one defined by the +klass+. * +:collection+ - Whether the child node should be treated as a single node or a collection of nodes: * +false+ (default) - child node is directly accessible through the respective accessor; * +true+ - a collection of child nodes is accessed as +Array+ through the respective accessor; * +:with_count+ - same as +true+, but in addition, the attribute +count+ is defined on the current object, that will be automatically set to the number of elements in the collection at the start of +write_xml+ call. ==== Examples define_child_node(RubyXL::Alignment) Define a singular child node parsed by the RubyXL::BorderEdge.parse() and accessed by the default obj.alignment accessor define_child_node(RubyXL::Hyperlink, :collection => true, :accessor => :hyperlinks) Define an array of nodes accessed by obj.hyperlinks accessor, each of which will be parsed by the RubyXL::Hyperlink.parse() define_child_node(RubyXL::BorderEdge, :node_name => :left) define_child_node(RubyXL::BorderEdge, :node_name => :right) Use class RubyXL::BorderEdge when parsing both the elements and elements. define_child_node(RubyXL::Font, :collection => :with_count, :accessor => :fonts) Upon writing of the object this was defined on, its count attribute will be set to the count of nodes in fonts array", "label": 1, "domain": "code", "token_count": 458, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0251", "text": "Generate default routes for standard data modal @static @memberof openbiz.routers.ModelRouter @param {string} routePrefix - the route name of this resource @param {openbiz.controllers.ModelController} modelController - the controller which map this route to @param {string} [permission] - the permission which default to protect this resource @return {object} Route rules object @example //inside a module router e.g. /cubi/routes/account.js var routes = openbiz.ModelRouter.getDefaultRoutes('/accounts', openbiz.getController(cubi.account.AccountCountroller), 'cubi-account-manage'); module.exports = routes; // routes entity will looks like below: // { // \"post /accounts\" : [ openbiz.ensurePermission(\"cubi-account-manage\"), // openbiz.getController(\"cubi.account.AccountController\").create], // // \"get /accounts/:id\" : [ openbiz.ensurePermission(\"cubi-account-manage\"), // openbiz.getController(\"cubi.account.AccountController\").ensureExists, // openbiz.getController(\"cubi.account.AccountController\").findById], // // \"put /accounts/:id\" : [ openbiz.ensurePermission(\"cubi-account-manage\"), // openbiz.getController(\"cubi.account.AccountController\").ensureExists, // openbiz.getController(\"cubi.account.AccountController\").update], // // \"delete /accounts/:id\" : [ openbiz.ensurePermission(\"cubi-account-manage\"), // openbiz.getController(\"cubi.account.AccountController\").ensureExists, // openbiz.getController(\"cubi.account.AccountController\").delete], // }", "label": 1, "domain": "code", "token_count": 324, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0252", "text": ">>> from logagg.forwarders import InfluxDBForwarder >>> idbf = InfluxDBForwarder('no_host', '8086', 'deadpool', ... 'chimichanga', 'logs', 'collection') >>> valid_log = [{u'data': {u'_force_this_as_field': 'CXNS CNS nbkbsd', ... u'a': 1, ... u'b': 2, ... u'msg': u'this is a dummy log'}, ... u'error': False, ... u'error_tb': u'', ... u'event': u'some_log', ... u'file': u'/var/log/sample.log', ... u'formatter': u'logagg.formatters.basescript', ... u'host': u'deepcompute', ... u'id': u'20180409T095924_aec36d313bdc11e89da654e1ad04f45e', ... u'level': u'info', ... u'raw': u'{...}', ... u'timestamp': u'2018-04-09T09:59:24.733945Z', ... u'type': u'metric'}] >>> pointvalues = idbf._parse_msg_for_influxdb(valid_log) >>> from pprint import pprint >>> pprint(pointvalues) [{'fields': {u'data._force_this_as_field': \"'CXNS CNS nbkbsd'\", u'data.a': 1, u'data.b': 2}, 'measurement': u'some_log', 'tags': {u'data.msg': u'this is a dummy log', u'error_tb': u'', u'file': u'/var/log/sample.log', u'formatter': u'logagg.formatters.basescript', u'host': u'deepcompute', u'level': u'info'}, 'time': u'2018-04-09T09:59:24.733945Z'}] >>> invalid_log = valid_log >>> invalid_log[0]['error'] = True >>> pointvalues = idbf._parse_msg_for_influxdb(invalid_log) >>> pprint(pointvalues) [] >>> invalid_log = valid_log >>> invalid_log[0]['type'] = 'log' >>> pointvalues = idbf._parse_msg_for_influxdb(invalid_log) >>> pprint(pointvalues) []", "label": 1, "domain": "code", "token_count": 486, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0253", "text": "This operation extracts a rich set of visual features based on the image content. Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong. @param image An image stream. @param visual_features [Array] A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include: Categories - categorizes image content according to a taxonomy defined in documentation. Tags - tags the image with a detailed list of words related to the image content. Description - describes the image content with a complete English sentence. Faces - detects if faces are present. If present, generate coordinates, gender and age. ImageType - detects if image is clipart or a line drawing. Color - determines the accent color, dominant color, and whether an image is black&white. Adult - detects if the image is pornographic in nature (depicts nudity or a sex act). Sexually suggestive content is also detected. Objects - detects various objects within an image, including the approximate location. The Objects argument is only available in English. Brands - detects various brands within an image, including the approximate location. The Brands argument is only available in English. @param details [Array
] A string indicating which domain-specific details to return. Multiple values should be comma-separated. Valid visual feature types include: Celebrities - identifies celebrities if detected in the image, Landmarks - identifies notable landmarks in the image. @param language [Enum] The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh' @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 475, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0254", "text": "@example Request syntax with placeholder values user = iam.create_user({ path: \"pathType\", user_name: \"userNameType\", # required permissions_boundary: \"arnType\", tags: [ { key: \"tagKeyType\", # required value: \"tagValueType\", # required }, ], }) @param [Hash] options ({}) @option options [String] :path The path for the user name. For more information about paths, see [IAM Identifiers][1] in the *IAM User Guide*. This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its [regex pattern][2]) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\\\\u0021) through the DEL character (\\\\u007F), including most punctuation characters, digits, and upper and lowercased letters. [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html [2]: http://wikipedia.org/wiki/regex @option options [required, String] :user_name The name of the user to create. This parameter allows (through its [regex pattern][1]) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: \\_+=,.@-. User names are not distinguished by case. For example, you cannot create users named both \"TESTUSER\" and \"testuser\". [1]: http://wikipedia.org/wiki/regex @option options [String] :permissions_boundary The ARN of the policy that is used to set the permissions boundary for the user. @option options [Array] :tags A list of tags that you want to attach to the newly created user. Each tag consists of a key name and an associated value. For more information about tagging, see [Tagging IAM Identities][1] in the *IAM User Guide*. If any one of the tags is invalid or if you exceed the allowed number of tags per user, then the entire request fails and the user is not created. [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html @return [User]", "label": 1, "domain": "code", "token_count": 481, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0255", "text": "Set up and return Session object that is set up with retrying. Requires either global user agent to be set or appropriate user agent parameter(s) to be completed. Args: user_agent (Optional[str]): User agent string. HDXPythonUtilities/X.X.X- is prefixed. user_agent_config_yaml (Optional[str]): Path to YAML user agent configuration. Ignored if user_agent supplied. Defaults to ~/.useragent.yml. user_agent_lookup (Optional[str]): Lookup key for YAML. Ignored if user_agent supplied. **kwargs: See below auth (Tuple[str, str]): Authorisation information in tuple form (user, pass) OR basic_auth (str): Authorisation information in basic auth string form (Basic xxxxxxxxxxxxxxxx) OR basic_auth_file (str): Path to file containing authorisation information in basic auth string form (Basic xxxxxxxxxxxxxxxx) extra_params_dict (Dict): Extra parameters to put on end of url as a dictionary OR extra_params_json (str): Path to JSON file containing extra parameters to put on end of url OR extra_params_yaml (str): Path to YAML file containing extra parameters to put on end of url extra_params_lookup (str): Lookup key for parameters. If not given assumes parameters are at root of the dict. status_forcelist (iterable): HTTP statuses for which to force retry. Defaults to [429, 500, 502, 503, 504]. method_whitelist (iterable): HTTP methods for which to force retry. Defaults t0 frozenset(['GET']).", "label": 1, "domain": "code", "token_count": 311, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0256", "text": "Gets the list of backup entities that are associated with this policy. Returns a list of Service Fabric application, service or partition which are associated with this backup policy. @param backup_policy_name [String] The name of the backup policy. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [PagedBackupEntityList] operation results.", "label": 1, "domain": "code", "token_count": 320, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0257", "text": "Lists the usage details based on departmentId for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. @param department_id [String] Department ID @param billing_period_name [String] Billing Period Name. @param expand [String] May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. @param filter [String] May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). @param skiptoken [String] Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. @param top [Integer] May be used to limit the number of results to the most recent N usageDetails. @param query_options [QueryOptions] Additional parameters for the operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 326, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0258", "text": "Returns the input subsequence captured by the given group during the previous match operation.

For a matcher m, input sequence s, and group index g, the expressions m.group(g) and s.substring(m.start(g), m.end(g)) are equivalent.

Capturing groups are indexed from left to right, starting at one. Group zero denotes the entire pattern, so the expression m.group(0) is equivalent to m.group().

If the match was successful but the group specified failed to match any part of the input sequence, then null is returned. Note that some groups, for example (a*), match the empty string. This method will return the empty string when such a group successfully matches the empty string in the input.

@param group The index of a capturing group in this matcher's pattern @return The (possibly empty) subsequence captured by the group during the previous match, or \"\" if the group failed to match part of the input", "label": 1, "domain": "code", "token_count": 328, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0259", "text": "Constructs a triangle mesh. @alias TriangleMesh @constructor @augments AbstractMesh @classdesc Represents a 3D triangle mesh.

Altitudes within the mesh's positions are interpreted according to the mesh's altitude mode, which can be one of the following:

  • [WorldWind.ABSOLUTE]{@link WorldWind#ABSOLUTE}
  • [WorldWind.RELATIVE_TO_GROUND]{@link WorldWind#RELATIVE_TO_GROUND}
  • [WorldWind.CLAMP_TO_GROUND]{@link WorldWind#CLAMP_TO_GROUND}
If the latter, the mesh positions' altitudes are ignored. (If the mesh should be draped onto the terrain, you might want to use {@link SurfacePolygon} instead.)

Meshes have separate attributes for normal display and highlighted display. They use the interior and outline attributes of {@link ShapeAttributes}. If those attributes identify an image, that image is applied to the mesh. Texture coordinates for the image may be specified, but if not specified the full image is stretched over the full mesh. If texture coordinates are specified, there must be one texture coordinate for each vertex in the mesh. @param {Position[]} positions An array containing the mesh vertices. There must be no more than 65536 positions. Use [split]{@link TriangleMesh#split} to subdivide large meshes into smaller ones that fit this limit. @param {Number[]} indices An array of integers identifying the positions of each mesh triangle. Each sequence of three indices defines one triangle in the mesh. The indices identify the index of the position in the associated positions array. The indices for each triangle should be in counter-clockwise order to identify the triangles as front-facing. @param {ShapeAttributes} attributes The attributes to associate with this mesh. May be null, in which case default attributes are associated. @throws {ArgumentError} If the specified positions array is null, empty or undefined, the number of indices is less than 3 or too many positions are specified (limit is 65536).", "label": 1, "domain": "code", "token_count": 430, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0260", "text": "

Perform a CSS String level 2 (basic set and all non-ASCII chars) escape operation on a String input.

Level 2 means this method will escape:

  • The CSS String basic escape set:
    • The Backslash Escapes: \" (U+0022) and \' (U+0027).
    • Two ranges of non-displayable, control characters: U+0000 to U+001F and U+007F to U+009F.
  • All non ASCII characters.

This escape will be performed by using Backslash escapes whenever possible. For escaped characters that do not have an associated Backslash, default to \FF Hexadecimal Escapes.

This method calls {@link #escapeCssString(String, CssStringEscapeType, CssStringEscapeLevel)} with the following preconfigured values:

  • type: {@link CssStringEscapeType#BACKSLASH_ESCAPES_DEFAULT_TO_COMPACT_HEXA}
  • level: {@link CssStringEscapeLevel#LEVEL_2_ALL_NON_ASCII_PLUS_BASIC_ESCAPE_SET}

This method is thread-safe.

@param text the String to be escaped. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null.", "label": 1, "domain": "code", "token_count": 467, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0261", "text": "Produce padded (with gaps) queries according to the CIGAR string and reference sequence length for each matching query sequence. @param rcSuffix: A C{str} to add to the end of query names that are reverse complemented. This is added before the /1, /2, etc., that are added for duplicated ids (if there are duplicates and C{allowDuplicateIds} is C{False}. @param rcNeeded: If C{True}, queries that are flagged as matching when reverse complemented should have reverse complementing when preparing the output sequences. This must be used if the program that created the SAM/BAM input flags reversed matches but does not also store the reverse complemented query. @param padChar: A C{str} of length one to use to pad queries with to make them the same length as the reference sequence. @param queryInsertionChar: A C{str} of length one to use to insert into queries when the CIGAR string indicates that the alignment of a query would cause a deletion in the reference. This character is inserted as a 'missing' query character (i.e., a base that can be assumed to have been lost due to an error) whose existence is necessary for the match to continue. @param unknownQualityChar: The character to put into the quality string when unknown bases are inserted in the query or the query is padded on the left/right with gaps. @param allowDuplicateIds: If C{True}, repeated query ids (due to secondary or supplemental matches) will not have /1, /2, etc. appended to their ids. So repeated ids may appear in the yielded FASTA. @param addAlignment: If C{True} the reads yielded by the returned generator will also have an C{alignment} attribute, being the C{pysam.AlignedSegment} for the query. @raises InvalidSAM: If a query has an empty SEQ field and either there is no previous alignment or the alignment is not marked as secondary or supplementary. @return: A generator that yields C{Read} instances that are padded with gap characters to align them to the length of the reference sequence. See C{addAlignment}, above, to yield reads with the corresponding C{pysam.AlignedSegment}.", "label": 1, "domain": "code", "token_count": 464, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0262", "text": "

Perform a Java Properties Value level 1 (only basic set) escape operation on a char[] input.

Level 1 means this method will only escape the Java Properties basic escape set:

  • The Single Escape Characters: \t (U+0009), \n (U+000A), \f (U+000C), \r (U+000D) and \\ (U+005C).
  • Two ranges of non-displayable, control characters (some of which are already part of the single escape characters list): U+0000 to U+001F and U+007F to U+009F.

This method calls {@link #escapePropertiesValue(char[], int, int, java.io.Writer, PropertiesValueEscapeLevel)} with the following preconfigured values:

  • level: {@link PropertiesValueEscapeLevel#LEVEL_1_BASIC_ESCAPE_SET}

This method is thread-safe.

@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs", "label": 1, "domain": "code", "token_count": 457, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0263", "text": "Define a new command. This can be done in a few ways, but the most common method is to pass a symbol (or Array of symbols) representing the command name (or names) and a block. The block will be given an instance of the Command that was created. You then may call methods on this object to define aspects of that Command. Alternatively, you can call this with a one element Hash, where the key is the symbol representing the name of the command, and the value being an Array of symbols representing the commands to call in order, as a chained or compound command. Note that these commands must exist already, and that only those command-specific options defined in *this* command will be parsed and passed to the chained commands. This might not be what you expect +names+:: a String or Symbol, or an Array of String or Symbol that represent all the different names and aliases for this command *or* a Hash, as described above. ==Examples # Make a command named list command :list do |c| c.action do |global_options,options,args| # your command code end end # Make a command named list, callable by ls as well command [:list,:ls] do |c| c.action do |global_options,options,args| # your command code end end # Make a command named all, that calls list and list_contexts command :all => [ :list, :list_contexts ] # Make a command named all, aliased as :a:, that calls list and list_contexts command [:all,:a] => [ :list, :list_contexts ]", "label": 1, "domain": "code", "token_count": 324, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0264", "text": "Configures the given context as a standard context (for API Gateway exposed and other types of Lambdas) with stage handling, logging, custom settings, an optional Kinesis instance, an optional DynamoDB.DocumentClient instance, the current region, the given AWS event, given AWS context and the resolved stage based on the given settings and options. The distinction between options and settings is that options are meant to contain only non-function properties typically loaded from a JSON file, whereas settings are meant to be constructed in code and hence can contain both non-function properties and functions if needed. Note that if either the given event or AWS context are undefined, then everything other than the event, AWS context & stage will be configured. This missing configuration can be configured at a later point in your code by invoking {@linkcode configureEventAwsContextAndStage}. This separation of configuration is primarily useful for unit testing. @param {Object|StandardContext} context - the context to configure as a standard context @param {StandardSettings|undefined} [settings] - settings to use to configure a standard context @param {StandardOptions|undefined} [options] - options to use to configure a standard context @param {AWSEvent|undefined} [event] - the AWS event, which was passed to your lambda @param {AWSContext|undefined} [awsContext] - the AWS context, which was passed to your lambda @param {boolean|undefined} [forceConfiguration] - whether or not to force configuration of the given settings and options, which will ONLY override any previously configured stage handling settings on the given context @return {StandardContext} the given context configured as a standard context @throws {Error} an error if the stage cannot be resolved", "label": 1, "domain": "code", "token_count": 348, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0265", "text": "Constructor: OpenLayers.Layer.WMS Create a new WMS layer object Examples: The code below creates a simple WMS layer using the image/jpeg format. (code) var wms = new OpenLayers.Layer.WMS(\"NASA Global Mosaic\", \"http://wms.jpl.nasa.gov/wms.cgi\", {layers: \"modis,global_mosaic\"}); (end) Note the 3rd argument (params). Properties added to this object will be added to the WMS GetMap requests used for this layer's tiles. The only mandatory parameter is \"layers\". Other common WMS params include \"transparent\", \"styles\" and \"format\". Note that the \"srs\" param will always be ignored. Instead, it will be derived from the baseLayer's or map's projection. The code below creates a transparent WMS layer with additional options. (code) var wms = new OpenLayers.Layer.WMS(\"NASA Global Mosaic\", \"http://wms.jpl.nasa.gov/wms.cgi\", { layers: \"modis,global_mosaic\", transparent: true }, { opacity: 0.5, singleTile: true }); (end) Note that by default, a WMS layer is configured as baseLayer. Setting the \"transparent\" param to true will apply some magic (see ). The default image format changes from image/jpeg to image/png, and the layer is not configured as baseLayer. Parameters: name - {String} A name for the layer url - {String} Base url for the WMS (e.g. http://wms.jpl.nasa.gov/wms.cgi) params - {Object} An object with key/value pairs representing the GetMap query string parameters and parameter values. options - {Object} Hashtable of extra options to tag onto the layer. These options include all properties listed above, plus the ones inherited from superclasses.", "label": 1, "domain": "code", "token_count": 385, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0266", "text": "Execute a read or write operation on a device's flash memory. As writing / reading flash is both hard and has some overlap between the read and write operation, this convenience function handles flash memory keys as well as address calculation and actual driver call generation. @param {DeviceFirmwareBundle} bundle The bundle with the device to perform the flash memory operation on. @param {Number} startAddress The starting address where the flash operation (read or write) should start. @param {Number} lengthInts The size of the data to read or write. This should be reported in number of integers (4 byte pieces). @param {Number} sizeInts The size of the block to read or write. Should be specific to the region of flash memory being operated on. @param {Number} ptrAddress The memory pointer modbus address to use to index into the desired section of flash memory. Should be a constant like T7_MA_EXF_pREAD. This is a modbus address not a flash address. @param {Number} flashAddress The memory modbus address to index into to get to the desired sectin of flash memory. Should be a constants like T7_MA_EXF_READ. This is a modbus address not a flash address. @param {bool} isReadOp Indicate if this is a read operation. If false, this is a write operation. @param {Number} key The key specific to the section of flash memory used to authorize / validate this memory operation. Should be a constant. @param {Buffer} data If a write operation, this is the data to write to the flash memory. Does not need to be provided if a read operation. @param {q.promise} A promise that resolves when the operation finishes or rejects in case of error. Will resolve to the data written or the the data read.", "label": 1, "domain": "code", "token_count": 375, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0267", "text": " Import the PEM file in 'filepath' containing the private key. If password is passed use passed password for decryption. If prompt is True use entered password for decryption. If no password is passed and either prompt is False or if the password entered at the prompt is an empty string, omit decryption, treating the key as if it is not encrypted. If password is passed and prompt is True, an error is raised. (See below.) The returned key is an object in the 'securesystemslib.formats.RSAKEY_SCHEMA' format. filepath: file, an RSA encrypted PEM file. Unlike the public RSA PEM key file, 'filepath' does not have an extension. password: The passphrase to decrypt 'filepath'. scheme: The signature scheme used by the imported key. prompt: If True the user is prompted for a passphrase to decrypt 'filepath'. Default is False. ValueError, if 'password' is passed and 'prompt' is True. ValueError, if 'password' is passed and it is an empty string. securesystemslib.exceptions.FormatError, if the arguments are improperly formatted. securesystemslib.exceptions.FormatError, if the entered password is improperly formatted. IOError, if 'filepath' can't be loaded. securesystemslib.exceptions.CryptoError, if a password is available and 'filepath' is not a valid key file encrypted using that password. securesystemslib.exceptions.CryptoError, if no password is available and 'filepath' is not a valid non-encrypted key file. The contents of 'filepath' are read, optionally decrypted, and returned. An RSA key object, conformant to 'securesystemslib.formats.RSAKEY_SCHEMA'.", "label": 1, "domain": "code", "token_count": 359, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0268", "text": "/* Add or subtract two >=0 integers in byte arrays

This routine performs the calculation:

 C=A+(B*M) 
Where M is in the range -9 through +9

If M<0 then A>=B must be true, so the result is always non-negative. Leading zeros are not removed after a subtraction. The result is either the same length as the longer of A and B, or 1 longer than that (if a carry occurred). A is not altered unless Arg6 is 1. B is never altered. Arg1 is A Arg2 is A length to use (if longer than A, pad with 0's) Arg3 is B Arg4 is B length to use (if longer than B, pad with 0's) Arg5 is M, the multiplier Arg6 is 1 if A can be used to build the result (if it fits) This routine is severely performance-critical; *any* change here must be measured (timed) to assure no performance degradation. 1996.02.20 -- enhanced version of DMSRCN algorithm (1981) 1997.10.05 -- changed to byte arrays (from char arrays) 1998.07.01 -- changed to allow destructive reuse of LHS 1998.07.01 -- changed to allow virtual lengths for the arrays 1998.12.29 -- use lookaside for digit/carry calculation 1999.08.07 -- avoid multiply when mult=1, and make db an int 1999.12.22 -- special case m=-1, also drop 0 special case --private static final byte[] byteaddsub(byte a[],int avlen,byte b[],int bvlen,int m,boolean reuse){", "label": 1, "domain": "code", "token_count": 372, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0269", "text": "Create new VLAN :param environment_id: ID for Environment. :param name: The name of VLAN. :param description: Some description to VLAN. :param number: Number of Vlan :param acl_file: Acl IPv4 File name to VLAN. :param acl_file_v6: Acl IPv6 File name to VLAN. :param network_ipv4: responsible for generating a network attribute ipv4 automatically. :param network_ipv6: responsible for generating a network attribute ipv6 automatically. :return: Following dictionary: :: {'vlan': {'id': < id_vlan >, 'nome': < nome_vlan >, 'num_vlan': < num_vlan >, 'id_ambiente': < id_ambiente >, 'descricao': < descricao >, 'acl_file_name': < acl_file_name >, 'acl_valida': < acl_valida >, 'ativada': < ativada > 'acl_file_name_v6': < acl_file_name_v6 >, 'acl_valida_v6': < acl_valida_v6 >, } } :raise VlanError: VLAN name already exists, VLAN name already exists, DC division of the environment invalid or does not exist VLAN number available. :raise VlanNaoExisteError: VLAN not found. :raise AmbienteNaoExisteError: Environment not registered. :raise InvalidParameterError: Name of Vlan and/or the identifier of the Environment is null or invalid. :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XML response.", "label": 1, "domain": "code", "token_count": 325, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0270", "text": "@ #Crafty.removeAssets @category Assets @kind Method @sign public void Crafty.removeAssets(Object assets) @param data - Object JSON formatted (or JSON string), with assets to remove (accepts sounds, images and sprites) Removes assets (audio, images, sprites - and related sprite components) in order to allow the browser to free memory. Recieves a JSON fomatted object (or JSON string) containing 'audio', 'images' and/or 'sprites' properties with assets to be deleted. Follows a similar format as Crafty.load 'data' argument. If you pass the exact same object passed to Crafty.load, that will delete everything loaded that way. For sprites, if you want to keep some specific component, just don't pass that component's name in the sprite 'map'. Note that in order to remove the sprite components related to a given sprite, it's required to pass the 'map' property of that sprite, and although its own properties's values (the properties refer to sprite components) are not used in the removing process, omitting them will cause an error (since 'map' is an object, thus it's properties can NOT omitted - however, they can be null, or undefined). It will work as long as the 'map' objects' properties have any value. Or if you define 'map' itself as an array, like: \"map\": [ \"car\", \"truck\" ] instead of \"map\": { \"car\": [0,0], \"truck\": [0,1] }. This is examplified below (\"animals.png\" VS. \"vehicles.png\" sprites). @example ~~~ var assetsToRemoveObj = { \"audio\": { \"beep\": [\"beep.wav\", \"beep.mp3\", \"beep.ogg\"], \"boop\": \"boop.wav\" }, \"images\": [\"badguy.bmp\", \"goodguy.png\"], \"sprites\": { \"animals.png\": { \"map\": { \"ladybug\": [0,0], \"lazycat\": [0,1] }, }, \"vehicles.png\": { \"map\": [ \"car\", \"truck\" ] } } } Crafty.removeAssets(assetsToRemoveObj); ~~~ @see Crafty.load", "label": 1, "domain": "code", "token_count": 462, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0271", "text": "Attaches to an existing tag @constructor @param {!jQueryObject} $input @param {!function(string):($.Promise|Array.<*>|{error:?string}} options.resultProvider Given the current search text, returns an an array of result objects, an error object, or a Promise that yields one of those. If the Promise is still outstanding when the query next changes, resultProvider() will be called again (without waiting for the earlier Promise), and the Promise's result will be ignored. If the provider yields [], or a non-null error string, input is decorated with \".no-results\"; if the provider yields a null error string, input is not decorated. @param {!function(*, string):string} options.formatter Converts one result object to a string of HTML text. Passed the item and the current query. The outermost element must be

  • . The \".highlight\" class can be ignored as it is applied automatically. @param {!function(?*, string):void} options.onCommit Called when an item is selected by clicking or pressing Enter. Passed the item and the current query. If the current result list is not up to date with the query text at the time Enter is pressed, waits until it is before running this callback. If Enter pressed with no results, passed null. The popup remains open after this event. @param {!function(*, string, boolean):void} options.onHighlight Called when an item is highlighted in the list. Passed the item, the current query, and a flag that is true if the item was highlighted explicitly (arrow keys), not simply due to a results list update. Since the top item in the list is always initially highlighted, every time the list is updated onHighlight() is called with the top item and with the explicit flag set to false. @param {?number} options.maxResults Maximum number of items from resultProvider() to display in the popup. @param {?number} options.verticalAdjust Number of pixels to position the popup below where $input is when constructor is called. Useful if UI is going to animate position after construction, but QuickSearchField may receive input before the animation is done. @param {?number} options.firstHighlightIndex Index of the result that is highlighted by default. null to not highlight any result.", "label": 1, "domain": "code", "token_count": 464, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0272", "text": "Calculates the distance between apex locations mapping to the input location. Using the input location, the apex location is calculated. Also from the input location, a step along both the positive and negative vector_directions is taken, and the apex locations for those points are calculated. The difference in position between these apex locations is the total centered distance between magnetic field lines at the magnetic apex when starting locally with a field line half distance of edge_length. An alternative method has been implemented, then commented out. This technique takes multiple steps from the origin apex towards the apex locations identified along vector_direction. In principle this is more accurate but more computationally intensive, similar to the footpoint model. A comparison is planned. Note ---- vector direction refers to the magnetic unit vector direction Parameters ---------- glats : list-like of floats (degrees) Geodetic (WGS84) latitude glons : list-like of floats (degrees) Geodetic (WGS84) longitude alts : list-like of floats (km) Geodetic (WGS84) altitude, height above surface dates : list-like of datetimes Date and time for determination of scalars vector_direction : string 'meridional' or 'zonal' unit vector directions step_size : float (km) Step size (km) used for field line integration max_steps : int Number of steps taken for field line integration edge_length : float (km) Half of total edge length (step) taken at footpoint location. edge_length step in both positive and negative directions. edge_steps : int Number of steps taken from footpoint towards new field line in a given direction (positive/negative) along unit vector Returns ------- np.array, ### np.array, np.array The change in field line apex locations. ## Pending ## The return edge length through input location is provided. ## Pending ## The distances of closest approach for the positive step along vector direction, and the negative step are returned.", "label": 1, "domain": "code", "token_count": 389, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0273", "text": "Make an HTML table showing inter-sequence distances. @param tableData: A C{defaultdict(dict)} keyed by read ids, whose values are the dictionaries returned by compareDNAReads. @param reads1: An C{OrderedDict} of C{str} read ids whose values are C{Read} instances. These will be the rows of the table. @param reads2: An C{OrderedDict} of C{str} read ids whose values are C{Read} instances. These will be the columns of the table. @param square: If C{True} we are making a square table of a set of sequences against themselves (in which case we show nothing on the diagonal). @param matchAmbiguous: If C{True}, count ambiguous nucleotides that are possibly correct as actually being correct. Otherwise, we are strict and insist that only non-ambiguous nucleotides can contribute to the matching nucleotide count. @param colors: A C{list} of (threshold, color) tuples, where threshold is a C{float} and color is a C{str} to be used as a cell background. This is as returned by C{parseColors}. @param concise: If C{True}, do not show match details. @param showLengths: If C{True}, include the lengths of sequences. @param showGaps: If C{True}, include the number of gaps in sequences. @param showGaps: If C{True}, include the number of N characters in sequences. @param footer: If C{True}, incude a footer row giving the same information as found in the table header. @param div: If C{True}, return an HTML
    fragment only, not a full HTML document. @param gapChars: A C{str} of sequence characters considered to be gaps. @return: An HTML C{str} showing inter-sequence distances.", "label": 1, "domain": "code", "token_count": 397, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0274", "text": "Read the next interval histogram from the log, if interval falls within an absolute or relative time range, and add it to the destination histogram (or to the reference histogram if dest_histogram is None) Timestamps are assumed to appear in order in the log file, and as such this method will return a null upon encountering a timestamp larger than range_end_time_sec. Relative time range: the range is assumed to be in seconds relative to the actual timestamp value found in each interval line in the log Absolute time range: Absolute timestamps are calculated by adding the timestamp found with the recorded interval to the [latest, optional] start time found in the log. The start time is indicated in the log with a \"#[StartTime: \" followed by the start time in seconds. Params: dest_histogram where to add the next interval histogram, if None the interal histogram will be added to the reference histogram passed in the constructor range_start_time_sec The absolute or relative start of the expected time range, in seconds. range_start_time_sec The absolute or relative end of the expected time range, in seconds. absolute Defines if the passed range is absolute or relative Return: Returns the destination histogram if an interval line was found with an associated start timestamp value that falls between start_time_sec and end_time_sec, or None if no such interval line is found. Upon encountering any unexpected format errors in reading the next interval from the file, this method will return None. The histogram returned will have it's timestamp set to the absolute timestamp calculated from adding the interval's indicated timestamp value to the latest [optional] start time found in the log. Exceptions: ValueError if there is a syntax error in one of the float fields", "label": 1, "domain": "code", "token_count": 337, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0275", "text": "Add new networkipv6 :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_tipo_rede: Identifier of the NetworkType. Integer value and greater than zero. :param id_ambiente_vip: Identifier of the Environment Vip. Integer value and greater than zero. :param prefix: Prefix. :return: Following dictionary: :: {'vlan': {'id': < id_vlan >, 'nome': < nome_vlan >, 'num_vlan': < num_vlan >, 'id_tipo_rede': < id_tipo_rede >, 'id_ambiente': < id_ambiente >, 'rede_oct1': < rede_oct1 >, 'rede_oct2': < rede_oct2 >, 'rede_oct3': < rede_oct3 >, 'rede_oct4': < rede_oct4 >, 'rede_oct5': < rede_oct4 >, 'rede_oct6': < rede_oct4 >, 'rede_oct7': < rede_oct4 >, 'rede_oct8': < rede_oct4 >, 'bloco': < bloco >, 'mascara_oct1': < mascara_oct1 >, 'mascara_oct2': < mascara_oct2 >, 'mascara_oct3': < mascara_oct3 >, 'mascara_oct4': < mascara_oct4 >, 'mascara_oct5': < mascara_oct4 >, 'mascara_oct6': < mascara_oct4 >, 'mascara_oct7': < mascara_oct4 >, 'mascara_oct8': < mascara_oct4 >, 'broadcast': < broadcast >, 'descricao': < descricao >, 'acl_file_name': < acl_file_name >, 'acl_valida': < acl_valida >, 'ativada': < ativada >}} :raise TipoRedeNaoExisteError: NetworkType not found. :raise InvalidParameterError: Invalid ID for Vlan or NetworkType. :raise EnvironmentVipNotFoundError: Environment VIP not registered. :raise IPNaoDisponivelError: Network address unavailable to create a NetworkIPv6. :raise ConfigEnvironmentInvalidError: Invalid Environment Configuration or not registered :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XML response.", "label": 1, "domain": "code", "token_count": 483, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0276", "text": "Allocate an IP on a network to an equipment. Insert new IP for network and associate to the equipment :param id_network_ipv6: ID for NetworkIPv6. :param id_equip: ID for Equipment. :param description: Description for IP. :return: Following dictionary: :: {'ip': {'id': < id_ip >, 'id_network_ipv6': < id_network_ipv6 >, 'bloco1': < bloco1 >, 'bloco2': < bloco2 >, 'bloco3': < bloco3 >, 'bloco4': < bloco4 >, 'bloco5': < bloco5 >, 'bloco6': < bloco6 >, 'bloco7': < bloco7 >, 'bloco8': < bloco8 >, 'descricao': < descricao >}} :raise InvalidParameterError: NetworkIPv6 identifier or Equipament identifier is null and invalid, :raise InvalidParameterError: The value of description is invalid. :raise EquipamentoNaoExisteError: Equipment not found. :raise RedeIPv6NaoExisteError: NetworkIPv6 not found. :raise IPNaoDisponivelError: There is no network address is available to create the VLAN. :raise ConfigEnvironmentInvalidError: Invalid Environment Configuration or not registered :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XML response.", "label": 1, "domain": "code", "token_count": 303, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0277", "text": "

    Perform am URI path escape operation on a String input.

    The following are the only allowed chars in an URI path (will not be escaped):

    • A-Z a-z 0-9
    • - . _ ~
    • ! $ & ' ( ) * + , ; =
    • : @
    • /

    All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.

    This method is thread-safe.

    @param text the String to be escaped. @param encoding the encoding to be used for unescaping. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null.", "label": 1, "domain": "code", "token_count": 314, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0278", "text": "Constructs a tiled image layer. @alias TiledImageLayer @constructor @classdesc Provides a layer that displays multi-resolution imagery arranged as adjacent tiles in a pyramid. This is the primary WorldWind base class for displaying imagery of this type. While it may be used as a stand-alone class, it is typically subclassed by classes that identify the remote image server.

    While the image tiles for this class are typically drawn from a remote server such as a WMS server. The actual retrieval protocol is independent of this class and encapsulated by a class implementing the {@link UrlBuilder} interface and associated with instances of this class as a property.

    There is no requirement that image tiles of this class be remote, they may be local or procedurally generated. For such cases the subclass overrides this class' [retrieveTileImage]{@link TiledImageLayer#retrieveTileImage} method.

    Layers of this type are by default not pickable. Their pick-enabled flag is initialized to false. @augments Layer @param {Sector} sector The sector this layer covers. @param {Location} levelZeroDelta The size in latitude and longitude of level zero (lowest resolution) tiles. @param {Number} numLevels The number of levels to define for the layer. Each level is successively one power of two higher resolution than the next lower-numbered level. (0 is the lowest resolution level, 1 is twice that resolution, etc.) Each level contains four times as many tiles as the next lower-numbered level, each 1/4 the geographic size. @param {String} imageFormat The mime type of the image format for the layer's tiles, e.g., image/png. @param {String} cachePath A string uniquely identifying this layer relative to other layers. @param {Number} tileWidth The horizontal size of image tiles in pixels. @param {Number} tileHeight The vertical size of image tiles in pixels. @throws {ArgumentError} If any of the specified sector, level-zero delta, cache path or image format arguments are null or undefined, or if the specified number of levels, tile width or tile height is less than 1.", "label": 1, "domain": "code", "token_count": 452, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0279", "text": "指定模板单发 only v2 deprecated 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 mobile String 是 接收的手机号(针对国际短信,mobile参数会自动格式化到E.164格式,可能会造成传入mobile参数跟后续的状态报告中的号码不一致。E.164格式说明,参见: https://en.wikipedia.org/wiki/E.164) 15205201314 tpl_id Long 是 模板id 1 tpl_value String 是 变量名和变量值对。请先对您的变量名和变量值分别进行urlencode再传递。使用参考:代码示例。 注:变量名和变量值都不能为空 模板: 【#company#】您的验证码是#code#。 最终发送结果: 【云片网】您的验证码是1234。 tplvalue=urlencode(\"#code#\") + \"=\" + urlencode(\"1234\") + \"&\" + urlencode(\"#company#\") + \"=\" + urlencode(\"云片网\"); 若您直接发送报文请求则使用下面这种形式 tplvalue=urlencode(urlencode(\"#code#\") + \"=\" + urlencode(\"1234\") + \"&\" + urlencode(\"#company#\") + \"=\" + urlencode(\"云片网\")); extend String 否 扩展号。默认不开放,如有需要请联系客服申请 001 uid String 否 用户自定义唯一id。最大长度不超过256的字符串。 默认不开放,如有需要请联系客服申请 10001 Args: param: Results: Result", "label": 1, "domain": "code", "token_count": 353, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0280", "text": "绑定物理刚体 @param {View} view 要绑定的view @param {Object} cfg 物理参数 @param {String} cfg.type 形状类型,SHAPE_RECT|SHAPE_CIRCLE|SHAPE_POLYGEN , 默认矩形 @param {Number} cfg.restitution 弹力,默认0.4 @param {Number} cfg.friction 摩擦力,默认1 @param {Number} cfg.mass 质量,默认1 @param {Number} cfg.collisionType 碰撞类型,默认1 @param {Uint} cfg.group 碰撞组标识,默认为0,零组与任何组都碰撞,相同的非零组之间不会互相碰撞 @param {Uint} cfg.layers 碰撞层的掩码,默认为~0,两个层的按位与不为0时(a.layers & b.layers != 0)会发生碰撞 @param {Boolean} cfg.isStatic 是否静态刚体,默认false @param {Number} cfg.width 宽,type为SHAPE_RECT时有效,默认为view宽 @param {Number} cfg.height 高,type为SHAPE_RECT时有效,默认为view高 @param {Number} cfg.radius 半径,type为SHAPE_CIRCLE时有效,默认为view宽的一半 @param {Array} cfg.boundsArea 顶点数组,type为SHAPE_POLYGEN时有效, 顶点顺序必须逆时针,[{x:0, y:0}, {x:100, y:0}, {x:50, y:50}]", "label": 1, "domain": "code", "token_count": 339, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0281", "text": "Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. @param resource_group_name [String] The name of the Azure resource group that contains the Data Lake Analytics account. @param account_name [String] The name of the Data Lake Analytics account for which to list Azure Storage accounts. @param filter [String] The OData filter. Optional. @param top [Integer] The number of items to return. Optional. @param skip [Integer] The number of items to skip over before returning elements. Optional. @param expand [String] OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. @param select [String] OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. @param orderby [String] OrderBy clause. One or more comma-separated expressions with an optional \"asc\" (the default) or \"desc\" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. @param count [Boolean] The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. @param search [String] A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. @param format [String] The desired return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 419, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0282", "text": "This method accepts both a single key and an array of keys. When passed a single key, if it exists and its associated value is either present or the singleton +false+, returns said value: ActionController::Parameters.new(person: { name: \"Francesco\" }).require(:person) # => \"Francesco\"} permitted: false> Otherwise raises ActionController::ParameterMissing: ActionController::Parameters.new.require(:person) # ActionController::ParameterMissing: param is missing or the value is empty: person ActionController::Parameters.new(person: nil).require(:person) # ActionController::ParameterMissing: param is missing or the value is empty: person ActionController::Parameters.new(person: \"\\t\").require(:person) # ActionController::ParameterMissing: param is missing or the value is empty: person ActionController::Parameters.new(person: {}).require(:person) # ActionController::ParameterMissing: param is missing or the value is empty: person When given an array of keys, the method tries to require each one of them in order. If it succeeds, an array with the respective return values is returned: params = ActionController::Parameters.new(user: { ... }, profile: { ... }) user_params, profile_params = params.require([:user, :profile]) Otherwise, the method re-raises the first exception found: params = ActionController::Parameters.new(user: {}, profile: {}) user_params, profile_params = params.require([:user, :profile]) # ActionController::ParameterMissing: param is missing or the value is empty: user Technically this method can be used to fetch terminal values: # CAREFUL params = ActionController::Parameters.new(person: { name: \"Finn\" }) name = params.require(:person).require(:name) # CAREFUL but take into account that at some point those ones have to be permitted: def person_params params.require(:person).permit(:name).tap do |person_params| person_params.require(:name) # SAFER end end for example.", "label": 1, "domain": "code", "token_count": 407, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0283", "text": "add the year of the given calendar field. @method addYear @param {Number} amount the signed amount to add to field. add the month of the given calendar field. @method addMonth @param {Number} amount the signed amount to add to field. add the day of month of the given calendar field. @method addDayOfMonth @param {Number} amount the signed amount to add to field. add the hour of day of the given calendar field. @method addHourOfDay @param {Number} amount the signed amount to add to field. add the minute of the given calendar field. @method addMinute @param {Number} amount the signed amount to add to field. add the second of the given calendar field. @method addSecond @param {Number} amount the signed amount to add to field. add the millisecond of the given calendar field. @method addMilliSecond @param {Number} amount the signed amount to add to field. add the week of year of the given calendar field. @method addWeekOfYear @param {Number} amount the signed amount to add to field. add the week of month of the given calendar field. @method addWeekOfMonth @param {Number} amount the signed amount to add to field. add the day of year of the given calendar field. @method addDayOfYear @param {Number} amount the signed amount to add to field. add the day of week of the given calendar field. @method addDayOfWeek @param {Number} amount the signed amount to add to field. add the day of week in month of the given calendar field. @method addDayOfWeekInMonth @param {Number} amount the signed amount to add to field. Get rolled value for the field @protected", "label": 1, "domain": "code", "token_count": 360, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0284", "text": "Method that calculates difference between 2 curves (or subclasses of curves). Domain of self must be in domain of curve2 what means min(self.x) >= min(curve2.x) and max(self.x) <= max(curve2.x). Might modify self, and can return the result or None Use subtract as -= operator, check whether returned value is None: >>> Curve([[0, 0], [1, 1], [2, 2], [3, 1]]).subtract(\\ Curve([[-1, 1], [5, 1]])) is None True Use subtract again but return a new object this time. >>> Curve([[0, 0], [1, 1], [2, 2], [3, 1]]).subtract(\\ Curve([[-1, 1], [5, 1]]), new_obj=True).y DataSet([-1., 0., 1., 0.]) Try using wrong inputs to create a new object, and check whether it throws an exception: >>> Curve([[0, 0], [1, 1], [2, 2], [3, 1]]).subtract(\\ Curve([[1, -1], [2, -1]]), new_obj=True) is None Traceback (most recent call last): ... Exception: curve2 does not include self domain :param curve2: second object to calculate difference :param new_obj: if True, method is creating new object instead of modifying self :return: None if new_obj is False (but will modify self) or type(self) object containing the result", "label": 1, "domain": "code", "token_count": 329, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0285", "text": "Replaces non-ASCII characters with an ASCII approximation, or if none exists, a replacement character which defaults to \"?\". transliterate('Ærøskøbing') # => \"AEroskobing\" Default approximations are provided for Western/Latin characters, e.g, \"ø\", \"ñ\", \"é\", \"ß\", etc. This method is I18n aware, so you can set up custom approximations for a locale. This can be useful, for example, to transliterate German's \"ü\" and \"ö\" to \"ue\" and \"oe\", or to add support for transliterating Russian to ASCII. In order to make your custom transliterations available, you must set them as the i18n.transliterate.rule i18n key: # Store the transliterations in locales/de.yml i18n: transliterate: rule: ü: \"ue\" ö: \"oe\" # Or set them using Ruby I18n.backend.store_translations(:de, i18n: { transliterate: { rule: { 'ü' => 'ue', 'ö' => 'oe' } } }) The value for i18n.transliterate.rule can be a simple Hash that maps characters to ASCII approximations as shown above, or, for more complex requirements, a Proc: I18n.backend.store_translations(:de, i18n: { transliterate: { rule: ->(string) { MyTransliterator.transliterate(string) } } }) Now you can have different transliterations for each locale: transliterate('Jürgen', locale: :en) # => \"Jurgen\" transliterate('Jürgen', locale: :de) # => \"Juergen\"", "label": 1, "domain": "code", "token_count": 366, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0286", "text": "Compute Pgen for the amino acid sequence CDR3_seq. Conditioned on the V genes/alleles indicated in V_usage_mask_in and the J genes/alleles in J_usage_mask_in. (Examples are TCRB sequences/model) Parameters ---------- CDR3_seq : str CDR3 sequence composed of 'amino acids' -- the standard amino acids, plus any custom symbols for an expanded codon alphabet (note the standard ambiguous amino acids -- B, J, X, and Z -- are included by default). V_usage_mask_in : str or list An object to indicate which V alleles should be considered. The default input is None which returns the list of all productive V alleles. J_usage_mask_in : str or list An object to indicate which J alleles should be considered. The default input is None which returns the list of all productive J alleles. print_warnings : bool Determines whether warnings are printed or not. Default ON. Returns ------- pgen : float The generation probability (Pgen) of the sequence Examples -------- >>> generation_probability.compute_aa_CDR3_pgen('CAWSVAPDRGGYTF') 1.5756106696284584e-10 >>> generation_probability.compute_aa_CDR3_pgen('CAWSVAPDRGGYTF', 'TRBV30*01', 'TRBJ1-2*01') 1.203646865765782e-10 >>> generation_probability.compute_aa_CDR3_pgen('CAWXXXXXXXGYTF') 7.8102586432014974e-05", "label": 1, "domain": "code", "token_count": 317, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0287", "text": "Examine an HSP and return information about where the query and subject match begins and ends. Return a dict with keys that allow the query to be displayed against the subject. The returned readStartInSubject and readEndInSubject indices are offsets into the subject. I.e., they indicate where in the subject the query falls. In the returned object, all indices are suitable for Python string slicing etc. We must be careful to convert from the 1-based offsets found in BLAST output properly. hsp['frame'] is a (query, subject) 2-tuple, with both values coming from {-3, -2, -1, 1, 2, 3}. The sign indicates negative or positive sense (i.e., the direction of reading through the query or subject to get the alignment). The value is the nucleotide match offset modulo 3, plus one (i.e., it tells us which of the 3 possible reading frames is used in the match). The value is redundant because that information could also be obtained from the mod 3 value of the match offset. NOTE: the returned readStartInSubject value may be negative. We consider the hit sequence to start at offset 0. So if the read string has sufficient additional nucleotides before the start of the alignment match, it may protrude to the left of the hit. Similarly, the returned readEndInSubject can be greater than the subjectEnd. @param hsp: an HSP in the form of a C{dict}, built from a BLAST record. All passed hsp offsets are 1-based. @param readLen: the length of the read sequence. @param blastApplication: The C{str} command line program that was run (e.g., 'blastn', 'blastx').", "label": 1, "domain": "code", "token_count": 367, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0288", "text": "Create Export Request Export normalized messages. The following input combinations are supported:<br/><table><tr><th>Combination</th><th>Parameters</th><th>Description</th></tr><tr><td>Get by users</td><td>uids</td><td>Search by a list of User IDs. For each user in the list, the current authenticated user must have read access over the specified user.</td></tr><tr><td>Get by devices</td><td>sdids</td><td>Search by Source Device IDs.</td></tr><tr><td>Get by device types</td><td>uids,sdtids</td><td>Search by list of Source Device Type IDs for the given list of users.</td></tr><tr><td>Get by trial</td><td>trialId</td><td>Search by Trial ID.</td></tr><tr><td>Get by combination of parameters</td><td>uids,sdids,sdtids</td><td>Search by list of Source Device IDs. Each Device ID must belong to a Source Device Type ID and a User ID.</td></tr><tr><td>Common</td><td>startDate,endDate,order,format,url,csvHeaders</td><td>Parameters that can be used with the above combinations.</td></tr></table> @param exportRequestInfo ExportRequest object that is passed in the body (required) @return ApiResponse<ExportRequestResponse> @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "label": 1, "domain": "code", "token_count": 495, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0289", "text": "Compiles the given String into a Pattern that can be used to match text. The syntax is normal for Java, including backslashes as part of regex syntax, like the digit shorthand \"\\d\", escaped twice to \"\\\\d\" (so the double-quoted String itself doesn't try to interpret the backslash).
    This variant allows flags to be passed as an String. The flag string should consist of letters 'i','m','s','x','u','X'(the case is significant) and a hyphen or plus. The meaning of letters:

    • i - case insensitivity, corresponds to REFlags.IGNORE_CASE;
    • m - multiline treatment(BOLs and EOLs affect the '^' and '$'), corresponds to REFlags.MULTILINE flag;
    • s - single line treatment('.' matches \\r's and \\n's),corresponds to REFlags.DOTALL;
    • x - extended whitespace comments (spaces and eols in the expression are ignored), corresponds to REFlags.IGNORE_SPACES.
    • u - predefined classes are regarded as belonging to Unicode, corresponds to REFlags.UNICODE; this may yield some performance penalty.
    • X - compatibility with XML Schema, corresponds to REFlags.XML_SCHEMA.
    • - - turn off the specified flags; normally has no effect unless something adds the flags.
    • + - turn on the specified flags; normally is no different from just using the letters.
    @param regex a String in normal Java regular expression format @param flags integer flags that are constructed via bitwise OR from the flag constants in REFlags. @return a newly constructed Pattern object that can be used to match text that fits the given regular expression @throws PatternSyntaxException when there is a syntax error in the Pattern", "label": 1, "domain": "code", "token_count": 419, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0290", "text": "Reloads the record from the database. This method finds the record by its primary key (which could be assigned manually) and modifies the receiver in-place: account = Account.new # => # account.id = 1 account.reload # Account Load (1.2ms) SELECT \"accounts\".* FROM \"accounts\" WHERE \"accounts\".\"id\" = $1 LIMIT 1 [[\"id\", 1]] # => # Attributes are reloaded from the database, and caches busted, in particular the associations cache and the QueryCache. If the record no longer exists in the database ActiveRecord::RecordNotFound is raised. Otherwise, in addition to the in-place modification the method returns +self+ for convenience. The optional :lock flag option allows you to lock the reloaded record: reload(lock: true) # reload with pessimistic locking Reloading is commonly used in test suites to test something is actually written to the database, or when some action modifies the corresponding row in the database but not the object in memory: assert account.deposit!(25) assert_equal 25, account.credit # check it is updated in memory assert_equal 25, account.reload.credit # check it is also persisted Another common use case is optimistic locking handling: def with_optimistic_retry begin yield rescue ActiveRecord::StaleObjectError begin # Reload lock_version in particular. reload rescue ActiveRecord::RecordNotFound # If the record is gone there is nothing to do. else retry end end end", "label": 1, "domain": "code", "token_count": 322, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0291", "text": "List all VLANs from an environment. ** The itens returning from network is there to be compatible with other system ** :param id_ambiente: Environment identifier. :return: Following dictionary: :: {'vlan': [{'id': < id_vlan >, 'nome': < nome_vlan >, 'num_vlan': < num_vlan >, 'ambiente': < id_ambiente >, 'descricao': < descricao >, 'acl_file_name': < acl_file_name >, 'acl_valida': < acl_valida >, 'acl_file_name_v6': < acl_file_name_v6 >, 'acl_valida_v6': < acl_valida_v6 >, 'ativada': < ativada >, 'id_tipo_rede': < id_tipo_rede >, 'rede_oct1': < rede_oct1 >, 'rede_oct2': < rede_oct2 >, 'rede_oct3': < rede_oct3 >, 'rede_oct4': < rede_oct4 >, 'bloco': < bloco >, 'mascara_oct1': < mascara_oct1 >, 'mascara_oct2': < mascara_oct2 >, 'mascara_oct3': < mascara_oct3 >, 'mascara_oct4': < mascara_oct4 >, 'broadcast': < broadcast >,} , ... other vlans ... ]} :raise InvalidParameterError: Environment id is none or invalid. :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XML response.", "label": 1, "domain": "code", "token_count": 322, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0292", "text": "Refresh the input log sequence for the different MA processes. Required derived parameters: |Nmb| |MA_Order| Required flux sequence: |QPIn| Updated log sequence: |LogIn| Example: Assume there are three response functions, involving one, two and three MA coefficients respectively: >>> from hydpy.models.arma import * >>> parameterstep() >>> derived.nmb(3) >>> derived.ma_order.shape = 3 >>> derived.ma_order = 1, 2, 3 >>> fluxes.qpin.shape = 3 >>> logs.login.shape = (3, 3) The \"memory values\" of the different MA processes are defined as follows (one row for each process): >>> logs.login = ((1.0, nan, nan), ... (2.0, 3.0, nan), ... (4.0, 5.0, 6.0)) These are the new inflow discharge portions to be included into the memories of the different processes: >>> fluxes.qpin = 7.0, 8.0, 9.0 Through applying method |calc_login_v1| all values already existing are shifted to the right (\"into the past\"). Values, which are no longer required due to the limited order or the different MA processes, are discarded. The new values are inserted in the first column: >>> model.calc_login_v1() >>> logs.login login([[7.0, nan, nan], [8.0, 2.0, nan], [9.0, 4.0, 5.0]])", "label": 1, "domain": "code", "token_count": 323, "matched_pair_id": null, "split": "test"} +{"id": "code_docs_test_pos_0293", "text": "Options for {@link nodecat}. @typedef {{ fileStreams: (Object|undefined), outStream: (stream.Writable|undefined), errStream: (stream.Writable|undefined) }} CommandOptions @property {Object=} fileStreams Mapping from file names to readable streams which will be read for the named file. If the file appears multiple times, the stream is only read once. @property {stream.Writable=} outStream Stream to which concatenated output is written. (default: process.stdout) @property {stream.Writable=} errStream Stream to which errors (and non-output status messages) are written. (default: process.stderr) var NodecatOptions; Concatenate named files. @param {!Array} fileNames Names of files to be concatenated, in the order in which their content will appear. Files may appear multiple times. If the Array is empty, no output will be written. @param {NodecatOptions=} options Options. @param {?function(Error)=} callback Callback with the first Error which occurred, if any. Note that concatenation continues after errors. Required if global.Promise is not defined. @return {Promise|undefined} If callback is not given and global.Promise is defined, a Promise which resolves once all output has been written.", "label": 1, "domain": "code", "token_count": 307, "matched_pair_id": null, "split": "test"}