query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public PeriodicEvent runEvery(Runnable task, float delay, float period, int repetitions) { if (repetitions < 1) { return null; } else if (repetitions == 1) { // Better to burn a handful of CPU cycles than to churn memory by // creating a new callback return runAfter(task, delay); } else { return runEvery(task, delay, period, new RunFor(repetitions)); } }
[ "Run a task periodically, for a set number of times.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@param repetitions\nRepeat count\n@return {@code null} if {@code repetitions < 1}; otherwise, an interface\nthat lets you query the status; cancel; or reschedule the event." ]
[ "Inspects the object and all superclasses for public, non-final, accessible methods and returns a\ncollection containing all the attributes found.\n\n@param classToInspect the class under inspection.", "Read the domain controller's data from an input stream.\n\n@param instream the input stream\n@throws Exception", "Creates a new deployment for the URL. The target server will require access to the URL.\n\n@param url the URL representing the content\n\n@return the deployment", "Get random geographical location\n@return 2-Tuple of ints (latitude, longitude)", "Shrinks the alert message body so that the resulting payload\nmessage fits within the passed expected payload length.\n\nThis method performs best-effort approach, and its behavior\nis unspecified when handling alerts where the payload\nwithout body is already longer than the permitted size, or\nif the break occurs within word.\n\n@param payloadLength the expected max size of the payload\n@param postfix for the truncated body, e.g. \"...\"\n@return this", "Use this API to count dnszone_domain_binding resources configued on NetScaler.", "Set the HomeAsUpIndicator that is visible when user navigate to a fragment child\n@param indicator the resource drawable to use as indicator", "Generate a Jongo query regarding a set of parameters.\n\n@param params Map<queryKey, queryValue> of query parameters\n@return String", "Synchronize the required files to a slave HC from the master DC if this is required.\n@param fileRepository the HostFileRepository of the HC.\n@param contentRepository the ContentRepository of the HC.\n@param backup inidcates if this is a DC backup HC.\n@param oldHash the hash of the deployment to be replaced.\n@return true if the content should be pulled by the slave HC - false otherwise." ]
private static OriginatorType mapOriginator(Originator originator) { if (originator == null) { return null; } OriginatorType origType = new OriginatorType(); origType.setProcessId(originator.getProcessId()); origType.setIp(originator.getIp()); origType.setHostname(originator.getHostname()); origType.setCustomId(originator.getCustomId()); origType.setPrincipal(originator.getPrincipal()); return origType; }
[ "Mapping originator.\n\n@param originator the originator\n@return the originator type" ]
[ "Asynchronous call that begins execution of the task\nand returns immediately.", "Start the chain of execution running.\n\n@throws IllegalStateException\nif the chain of execution has already been started.", "Unlink the specified reference from this object.\nMore info see OJB doc.\n\n@param obj Object with reference\n@param ord the ObjectReferenceDescriptor of the reference\n@param insert flag signals insert operation", "Use this API to clear nssimpleacl.", "Use this API to delete nsip6 of given name.", "Counts a single pair of coordinates in all datasets.\n\n@param xCoord\n@param yCoord\n@param itemDocument", "Return a copy of the new fragment and set the variable above.", "Deletes the disabled marker file in the directory of the specified version.\n\n@param version to enable\n@throws PersistenceFailureException if the marker file could not be deleted (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).", "This method permanently removes a webhook. Note that it may be possible\nto receive a request that was already in flight after deleting the\nwebhook, but no further requests will be issued.\n\n@param webhook The webhook to delete.\n@return Request object" ]
@Override public void solve(DMatrixRBlock B, DMatrixRBlock X) { if( B.blockLength != blockLength ) throw new IllegalArgumentException("Unexpected blocklength in B."); DSubmatrixD1 L = new DSubmatrixD1(decomposer.getT(null)); if( X != null ) { if( X.blockLength != blockLength ) throw new IllegalArgumentException("Unexpected blocklength in X."); if( X.numRows != L.col1 ) throw new IllegalArgumentException("Not enough rows in X"); } if( B.numRows != L.col1 ) throw new IllegalArgumentException("Not enough rows in B"); // L * L^T*X = B // Solve for Y: L*Y = B TriangularSolver_DDRB.solve(blockLength,false,L,new DSubmatrixD1(B),false); // L^T * X = Y TriangularSolver_DDRB.solve(blockLength,false,L,new DSubmatrixD1(B),true); if( X != null ) { // copy the solution from B into X MatrixOps_DDRB.extractAligned(B,X); } }
[ "If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X." ]
[ "Start watching the fluo app uuid. If it changes or goes away then halt the process.", "Returns true if the given candidate is a group that is filtered due to rule parameters in the current call graph.", "This is private. It is a helper function for the utils.", "Try to provide an escaped, ready-to-use shell line to repeat a given command line.", "Helper method for variance calculations.\n@return The sum of the squares of the differences between\neach value and the arithmetic mean.\n@throws EmptyDataSetException If the data set is empty.", "Creates a CostRateTable instance from a block of data.\n\n@param resource parent resource\n@param index cost rate table index\n@param data data block", "Initialize the container for the current application deployment\n\n@param deploymentManager\n@param deploymentServices", "Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param text the text of the item to be added\n@param reload perform a 'material select' reload to update the DOM.", "Use this API to change appfwsignatures." ]
public static transformpolicy[] get(nitro_service service) throws Exception{ transformpolicy obj = new transformpolicy(); transformpolicy[] response = (transformpolicy[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the transformpolicy resources that are configured on netscaler." ]
[ "Returns a factory that vends DelimitRegExIterators that reads the contents of the\ngiven Reader, splits on the specified delimiter, applies op, then returns the result.", "Adds a procedure argument definition to this class descriptor.\n\n@param argDef The procedure argument definition", "Saves changes in properties file. It reads the property file into memory, modifies it and saves it back to the file.\n\n@throws IOException", "Casts a ray into the scene graph, and returns the objects it intersects.\n\nThe ray is defined by its origin {@code [ox, oy, oz]} and its direction\n{@code [dx, dy, dz]}.\n\n<p>\nThe ray origin may be [0, 0, 0] and the direction components should be\nnormalized from -1 to 1: Note that the y direction runs from -1 at the\nbottom to 1 at the top. To construct a picking ray originating at the\nuser's head and pointing into the scene along the camera lookat vector,\npass in 0, 0, 0 for the origin and 0, 0, -1 for the direction.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is doing a ray cast into a particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n<p>\nDepending on the type of collider, that the hit location may not be exactly\nwhere the ray would intersect the scene object itself. Rather, it is\nwhere the ray intersects the collision geometry associated with the collider.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@param ox\nThe x coordinate of the ray origin.\n\n@param oy\nThe y coordinate of the ray origin.\n\n@param oz\nThe z coordinate of the ray origin.\n\n@param dx\nThe x vector of the ray direction.\n\n@param dy\nThe y vector of the ray direction.\n\n@param dz\nThe z vector of the ray direction.\n@return A list of {@link GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6", "Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store", "Creates a new empty HTML document tree.\n@throws ParserConfigurationException", "Calls a function script associated with this component.\nThe function is called even if the component\nis not enabled and not attached to a scene object.\n@param funcName name of script function to call.\n@param args function parameters as an array of objects.\n@return true if function was called, false if no such function\n@see org.gearvrf.script.GVRScriptFile#invokeFunction(String, Object[]) invokeFunction", "Extract data for a single task.\n\n@param parent task parent\n@param row Synchro task data", "Method indicating whether a day is a working or non-working day.\n\n@param day required day\n@return true if this is a working day" ]
private void readRelationships(Storepoint phoenixProject) { for (Relationship relation : phoenixProject.getRelationships().getRelationship()) { readRelation(relation); } }
[ "Read task relationships from a Phoenix file.\n\n@param phoenixProject Phoenix project data" ]
[ "Runs a method call with retries.\n@param pjp a {@link ProceedingJoinPoint} representing an annotated\nmethod call.\n@param retryableAnnotation the {@link org.fishwife.jrugged.aspects.Retryable}\nannotation that wrapped the method.\n@throws Throwable if the method invocation itself throws one during execution.\n@return The return value from the method call.", "Create a transformation which takes the alignment settings into account.", "Determine whether all references are available locally.\n\n@param domain the domain model\n@param hostElement the host path element\n@return whether to a sync with the master is required", "A static method that provides an easy way to create a list of a\ncertain parametric type.\nThis static constructor works better with generics.\n\n@param list The list to pad\n@param padding The padding element (may be null)\n@return The padded list", "Add assertions to tests execution.", "Do some magic to turn request parameters into a context object", "Returns a handle to the pool. Useful to obtain a handle to the\nstatistics for example.\n@return pool", "Finds out which dump files of the given type have been downloaded\nalready. The result is a list of objects that describe the available dump\nfiles, in descending order by their date. Not all of the dumps included\nmight be actually available.\n\n@param dumpContentType\nthe type of dump to consider\n@return list of objects that provide information on available dumps", "Sets the color of the drop shadow.\n\n@param color The color of the drop shadow." ]
public static String normalizeWS(String value) { char[] tmp = new char[value.length()]; int pos = 0; boolean prevws = false; for (int ix = 0; ix < tmp.length; ix++) { char ch = value.charAt(ix); if (ch != ' ' && ch != '\t' && ch != '\n' && ch != '\r') { if (prevws && pos != 0) tmp[pos++] = ' '; tmp[pos++] = ch; prevws = false; } else prevws = true; } return new String(tmp, 0, pos); }
[ "Removes trailing and leading whitespace, and also reduces each\nsequence of internal whitespace to a single space." ]
[ "Create an embedded host controller.\n\n@param jbossHomePath the location of the root of the host controller installation. Cannot be {@code null} or empty.\n@param modulePath the location of the root of the module repository. May be {@code null} if the standard\nlocation under {@code jbossHomePath} should be used\n@param systemPackages names of any packages that must be treated as system packages, with the same classes\nvisible to the caller's classloader visible to host-controller-side classes loaded from\nthe server's modular classloader\n@param cmdargs any additional arguments to pass to the embedded host controller (e.g. -b=192.168.100.10)\n@return the server. Will not be {@code null}", "Solve the using the lower triangular matrix in LU. Diagonal elements are assumed\nto be 1", "2-D Perlin noise function.\n\n@param x X Value.\n@param y Y Value.\n@return Returns function's value at point xy.", "Creates a map between a work pattern ID and a list of time entry rows.\n\n@param rows time entry rows\n@return time entry map", "Computes the decomposition of the provided matrix. If no errors are detected then true is returned,\nfalse otherwise.\n@param A The matrix that is being decomposed. Not modified.\n@return If it detects any errors or not.", "Check invariant.\n\n@param browser The browser.\n@return Whether the condition is satisfied or <code>false</code> when it it isn't or a\n{@link CrawljaxException} occurs.", "Checks if a given number is in the range of a short.\n\n@param number\na number which should be in the range of a short (positive or negative)\n\n@see java.lang.Short#MIN_VALUE\n@see java.lang.Short#MAX_VALUE\n\n@return number as a short (rounding might occur)", "Returns the corresponding mac section, or null if this address section does not correspond to a mac section.\nIf this address section has a prefix length it is ignored.\n\n@param extended\n@return", "Restores the dropout descriptor to a previously saved-off state" ]
public void commit() { if (directory == null) return; try { if (reader != null) reader.close(); // it turns out that IndexWriter.optimize actually slows // searches down, because it invalidates the cache. therefore // not calling it any more. // http://www.searchworkings.org/blog/-/blogs/uwe-says%3A-is-your-reader-atomic // iwriter.optimize(); iwriter.commit(); openSearchers(); } catch (IOException e) { throw new DukeException(e); } }
[ "Flushes all changes to disk." ]
[ "Apply the remote domain model to the local host controller.\n\n@param bootOperations the result of the remote read-domain-model op\n@return {@code true} if the model was applied successfully, {@code false} otherwise", "Register the DAO with the cache. This will allow folks to build a DAO externally and then register so it can be\nused internally as necessary.\n\n<p>\n<b>NOTE:</b> By default this registers the DAO to be associated with the class that it uses. If you need to\nregister multiple dao's that use different {@link DatabaseTableConfig}s then you should use\n{@link #registerDaoWithTableConfig(ConnectionSource, Dao)}.\n</p>\n\n<p>\n<b>NOTE:</b> You should maybe use the {@link DatabaseTable#daoClass()} and have the DaoManager construct the DAO\nif possible.\n</p>", "Clear all overrides, reset repeat counts for a request path\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@throws Exception exception", "Retrieve configuration details for a given custom field.\n\n@param field required custom field\n@return configuration detail", "Shortcut for mapping the output of an arbitrary observable to one returning an instance of a specific type, using the IO scheduler.\n@param fromObservable the source observable\n@param toValue the value to emit to the observer\n@param <T> the type of the value to emit\n@return an observable emitting the specified value", "Read recurring data for a calendar exception.\n\n@param bce MPXJ calendar exception\n@param exception XML calendar exception", "Computes an MD4 hash for the password.\n\n@param password the password for which to compute the hash\n@throws NoSuchAlgorithmException\n@throws InvalidKeyException\n\n@return the password hash", "Whether the address is IPv4-compatible\n\n@see java.net.Inet6Address#isIPv4CompatibleAddress()", "Adds a row for the given component at the end of the group.\n\n@param component the component to wrap in the row to be added" ]
public static base_response update(nitro_service client, nsspparams resource) throws Exception { nsspparams updateresource = new nsspparams(); updateresource.basethreshold = resource.basethreshold; updateresource.throttle = resource.throttle; return updateresource.update_resource(client); }
[ "Use this API to update nsspparams." ]
[ "Add the set with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The set of all packages to add.", "Crop the image between two points.\n\n@param top Top bound.\n@param left Left bound.\n@param bottom Bottom bound.\n@param right Right bound.\n@throws IllegalArgumentException if {@code top} or {@code left} are less than zero or {@code\nbottom} or {@code right} are less than one or less than {@code top} or {@code left},\nrespectively.", "Initializes the locales that can be selected via the language switcher in the bundle editor.\n@return the locales for which keys can be edited.", "Only meant to be called once\n\n@throws Exception exception", "Click handler for bottom drawer items.", "This method takes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent\n@param belief_name\nThe name of the belief inside agent's adf\n@param connector\nThe connector to get the external access\n@return belief_value The value of the requested belief", "This method extracts calendar data from a Planner file.\n\n@param project Root node of the Planner file", "Read an exception day for a calendar.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day ConceptDraw PROJECT exception day", "1-D Integer array to double array.\n\n@param array Integer array.\n@return Double array." ]
private static int getTrimmedXStart(BufferedImage img) { int height = img.getHeight(); int width = img.getWidth(); int xStart = width; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { if (img.getRGB(j, i) != Color.WHITE.getRGB() && j < xStart) { xStart = j; break; } } } return xStart; }
[ "Get the first non-white X point\n@param img Image n memory\n@return the x start" ]
[ "Checks to see if all the provided matrices are the expected size for an SVD. If an error is encountered\nthen an exception is thrown. This automatically handles compact and non-compact formats", "New REST client uses new REST service", "Get a value as a string.\n\n@param key the key for looking up the value.\n@param type the type of the object\n@param <V> the type", "Unilaterally merge an update description into this update description.\n@param otherDescription the update description to merge into this\n@return this merged update description", "Runs the command session.\nCreate the Shell, then run this method to listen to the user,\nand the Shell will invoke Handler's methods.\n@throws java.io.IOException when can't readLine() from input.", "Generate an ordered set of column definitions from an ordered set of column names.\n\n@param columns column definitions\n@param order column names\n@return ordered set of column definitions", "Fired whenever a browser event is received.\n@param event Event to process", "Removes the specified objects.\n\n@param collection The collection to remove.", "If you have priorities based on enums, this is the recommended prioritizer to use as it will prevent\nstarvation of low priority items\n\n@param groupClass\n@return" ]
public void setGroupName(String name, int id) { PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement( "UPDATE " + Constants.DB_TABLE_SERVER_GROUPS + " SET " + Constants.GENERIC_NAME + " = ?" + " WHERE " + Constants.GENERIC_ID + " = ?" ); statement.setString(1, name); statement.setInt(2, id); statement.executeUpdate(); statement.close(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (statement != null) { statement.close(); } } catch (Exception e) { } } }
[ "Set the group name\n\n@param name new name of server group\n@param id ID of group" ]
[ "Wrapper delayed emission, based on delayProvider.\n\n@param event the event to emit\n@param milliseconds the delay in milliseconds\n@param <T> the type of event\n@return delayed observable", "Adds a submodule to the module.\n\n<P>\nINFO: If the module is promoted, all added submodule will be promoted.\n\n@param submodule Module", "Write a date field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Builds the HTML code for a select widget given a bean containing the select options\n\n@param htmlAttributes html attributes for the select widget\n@param options the bean containing the select options\n\n@return the HTML for the select box", "Creates a general purpose solver. Use this if you are not sure what you need.\n\n@param numRows The number of rows that the decomposition is optimized for.\n@param numCols The number of columns that the decomposition is optimized for.", "Instantiates an instance of input Java shader class,\nwhich must be derived from GVRShader or GVRShaderTemplate.\n@param id Java class which implements shaders of this type.\n@param ctx GVRContext shader belongs to\n@return GVRShader subclass which implements this shader type", "Use this API to delete linkset of given name.", "Returns the value of the element with the largest value\n@param A (Input) Matrix. Not modified.\n@return scalar", "Parse the URI and get all the parameters in map form. Query name -&gt; List of Query values.\n\n@param rawQuery query portion of the uri to analyze." ]
private String alterPrefix(String word, String oldPrefix, String newPrefix) { if (word.startsWith(oldPrefix)) { return word.replaceFirst(oldPrefix, newPrefix); } return (newPrefix + word); }
[ "Manipulates a string by cutting of a prefix, if present, and adding a new prefix.\n\n@param word the string to be manipulated\n@param oldPrefix the old prefix that should be replaced\n@param newPrefix the new prefix that is added\n@return the manipulated string" ]
[ "Get the value of a primitive type from the request data.\n\n@param fieldName the name of the attribute to get from the request data.\n@param pAtt the primitive attribute.\n@param requestData the data to retrieve the value from.", "Sets selected page implicitly\n@param page new selected page\n@return true if the page has been selected successfully", "Return a copy of the zoom level scale denominators. Scales are sorted greatest to least.", "Optional operations to do before the multiple-threads start indexing\n\n@param backend", "When using a map rotation, there might be tiles that are outside the rotated map area. To avoid to load\nthese tiles, this method checks if a tile is really required to draw the map.", "Produces the Soundex key for the given string.", "Copy the contents of the given byte array to the given OutputStream.\nLeaves the stream open when done.\n@param in the byte array to copy from\n@param out the OutputStream to copy to\n@throws IOException in case of I/O errors", "Set the model used by the left table.\n\n@param model table model", "Checks if is file exist.\n\n@param filePath\nthe file path\n@return true, if is file exist" ]
public String getProperty(String key, String defaultValue) { return mProperties.getProperty(key, defaultValue); }
[ "Gets a property with a default value.\n@param key\nThe key string.\n@param defaultValue\nThe default value.\n@return The property string." ]
[ "this method looks up the appropriate JDOClass for a given persistent Class.\nIt uses the JDOModel to perfom this lookup.\n@param c the persistent Class\n@return the JDOCLass object", "Returns a new iterator filtering any null references.\n\n@param unfiltered\nthe unfiltered iterator. May not be <code>null</code>.\n@return an unmodifiable iterator containing all elements of the original iterator without any <code>null</code>\nreferences. Never <code>null</code>.", "Adds the deploy operation as a step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment to deploy", "Unregister the mbean with the given name from the platform mbean server\n\n@param name The name of the mbean to unregister", "Adds all pairs from 'fromMap' to 'toMap' excluding once that matching the pattern", "Use this API to update snmpuser.", "Returns the configured page size, or the default page size if it is not configured.\n@return The configured page size, or the default page size if it is not configured.", "Checks to see if the token is an integer scalar\n\n@return true if integer or false if not", "Use this API to delete appfwlearningdata." ]
@SuppressWarnings("WeakerAccess") public int segmentHeight(final int segment, final boolean front) { final ByteBuffer bytes = getData(); if (isColor) { final int base = segment * 6; final int frontHeight = Util.unsign(bytes.get(base + 5)); if (front) { return frontHeight; } else { return Math.max(frontHeight, Math.max(Util.unsign(bytes.get(base + 3)), Util.unsign(bytes.get(base + 4)))); } } else { return getData().get(segment * 2) & 0x1f; } }
[ "Determine the height of the preview given an index into it.\n\n@param segment the index of the waveform preview segment to examine\n@param front if {@code true} the height of the front (brighter) segment of a color waveform preview is returned,\notherwise the height of the back (dimmer) segment is returned. Has no effect for blue previews.\n\n@return a value from 0 to 31 representing the height of the waveform at that segment, which may be an average\nof a number of values starting there, determined by the scale" ]
[ "This continuously tries to reconnect in a separate thread and will only stop if the connection was established\nsuccessfully or the server gets shutdown. If there is currently a reconnect task active the connection paramaters\nand callback will get updated.\n\n@param reconnectUri the updated connection uri\n@param authKey the updated authentication key\n@param callback the current callback", "Merge a new subsystem from the global registration.\n\n@param registry the global registry\n@param subsystemName the subsystem name\n@param version the subsystem version", "Adjusts beforeIndex to account for the possibility that the given widget is\nalready a child of this panel.\n\n@param child the widget that might be an existing child\n@param beforeIndex the index at which it will be added to this panel\n@return the modified index", "Adds an EJB descriptor to the maps\n\n@param ejbDescriptor The EJB descriptor to add", "Add an executable \"post-run\" dependent for this model.\n\n@param executable the executable \"post-run\" dependent\n@return the key to be used as parameter to taskResult(string) method to retrieve result of executing\nthe executable \"post-run\" dependent", "Append the given path segments to the existing path of this builder.\nEach given path segment may contain URI template variables.\n@param pathSegments the URI path segments\n@return this UriComponentsBuilder", "Extent aware Delete by Query\n@param query\n@param cld\n@throws PersistenceBrokerException", "Constructs a valid request and passes it on to the next handler. It also\ncreates the 'StoreClient' object corresponding to the store name\nspecified in the REST request.\n\n@param requestValidator The Validator object used to construct the\nrequest object\n@param ctx Context of the Netty channel\n@param messageEvent Message Event used to write the response / exception", "Computes the power of a complex number in polar notation\n\n@param a Complex number\n@param N Power it is to be multiplied by\n@param result Result" ]
public static base_response update(nitro_service client, dospolicy resource) throws Exception { dospolicy updateresource = new dospolicy(); updateresource.name = resource.name; updateresource.qdepth = resource.qdepth; updateresource.cltdetectrate = resource.cltdetectrate; return updateresource.update_resource(client); }
[ "Use this API to update dospolicy." ]
[ "Add tags to a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param tags\nThe tags\n@throws FlickrException", "Use this API to fetch the statistics of all dos_stats resources that are configured on netscaler.", "Check that each emitted notification is properly described by its source.", "Mark objects no longer available in collection for delete and new objects for insert.\n\n@param broker the PB to persist all objects", "Mapping originator.\n\n@param originator the originator\n@return the originator type", "Use this API to unset the properties of sslservice resource.\nProperties that need to be unset are specified in args array.", "Returns the list of the configured sort options, or the empty list if no sort options are configured.\n@return The list of the configured sort options, or the empty list if no sort options are configured.", "Append data to JSON response.\n@param param\n@param value", "Get an array of property ids.\n\nNot all property ids need be returned. Those properties\nwhose ids are not returned are considered non-enumerable.\n\n@return an array of Objects. Each entry in the array is either\na java.lang.String or a java.lang.Number" ]
public AT_Row setPaddingLeftChar(Character paddingLeftChar) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingLeftChar(paddingLeftChar); } } return this; }
[ "Sets the left padding character for all cells in the row.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining" ]
[ "Use this API to update transformpolicy.", "Use this API to update gslbservice resources.", "Gets container with alls groups of a certain user.\n\n@param cms cmsobject\n@param user to find groups for\n@param caption caption property\n@param iconProp property\n@param ou ou\n@param propStatus status property\n@param iconProvider the icon provider\n@return Indexed Container", "Normalizes the matrix such that the Frobenius norm is equal to one.\n\n@param A The matrix that is to be normalized.", "Execute pull docker image on agent\n\n@param launcher\n@param imageTag\n@param username\n@param password\n@param host\n@return\n@throws IOException\n@throws InterruptedException", "Checks the preconditions for creating a new ForbidSubStr processor with a List of forbidden substrings.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif forbiddenSubStrings is null\n@throws IllegalArgumentException\nif forbiddenSubStrings is empty", "Set the individual dates where the event should take place.\n@param dates the dates to set.", "Checks if the given project exists or not.\n\n@param name project name\n@return true/false\n@throws IllegalArgumentException", "Convert any number class to array of integer.\n\n@param <T> Type.\n@param array Array.\n@return Integer array." ]
public ItemRequest<Section> delete(String section) { String path = String.format("/sections/%s", section); return new ItemRequest<Section>(this, Section.class, path, "DELETE"); }
[ "A specific, existing section can be deleted by making a DELETE request\non the URL for that section.\n\nNote that sections must be empty to be deleted.\n\nThe last remaining section in a board view cannot be deleted.\n\nReturns an empty data block.\n\n@param section The section to delete.\n@return Request object" ]
[ "Retrieve all Collection attributes of a given instance\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs", "Creates the DAO if we have config information cached and caches the DAO.", "Use this API to fetch sslocspresponder resource of given name .", "private HttpServletResponse headers;", "Returns iterable with all enterprise assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all enterprise assignments.", "Start with specifying the groupId", "Use this API to fetch authenticationldappolicy_vpnglobal_binding resources of given name .", "Converts an MPXJ Duration instance into the string representation\nof a Planner duration.\n\nPlanner represents durations as a number of seconds in its\nfile format, however it displays durations as days and hours,\nand seems to assume that a working day is 8 hours.\n\n@param value string representation of a duration\n@return Duration instance", "Removes and returns a random element from the set.\n@return the removed element, or <code>null</code> when the key does not exist." ]
private synchronized void setFactoryMethod(Method newMethod) { if (newMethod != null) { // make sure it's a no argument method if (newMethod.getParameterTypes().length > 0) { throw new MetadataException( "Factory methods must be zero argument methods: " + newMethod.getClass().getName() + "." + newMethod.getName()); } // make it accessible if it's not already if (!newMethod.isAccessible()) { newMethod.setAccessible(true); } } this.factoryMethod = newMethod; }
[ "Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass" ]
[ "Add parameter to testCase\n\n@param context which can be changed", "Removes 'original' and places 'target' at the same location", "Return primary key values of given Identity object.\n\n@param cld\n@param oid\n@return Object[]\n@throws PersistenceBrokerException", "Internally undo recorded changes we did so far.\n\n@return whether the state required undo actions", "Removes all resources deployed using this class.", "Notify our own event listeners of a Z-Wave event.\n@param event the event to send.", "Close off the connection.\n\n@throws SQLException", "Parse a boolean.\n\n@param value boolean\n@return Boolean value", "Writes batch of data to the source\n@param batch\n@throws InterruptedException" ]
public ProteusApplication addDefaultRoutes(RoutingHandler router) { if (config.hasPath("health.statusPath")) { try { final String statusPath = config.getString("health.statusPath"); router.add(Methods.GET, statusPath, (final HttpServerExchange exchange) -> { exchange.getResponseHeaders().add(Headers.CONTENT_TYPE, MediaType.TEXT_PLAIN); exchange.getResponseSender().send("OK"); }); this.registeredEndpoints.add(EndpointInfo.builder().withConsumes("*/*").withProduces("text/plain").withPathTemplate(statusPath).withControllerName("Internal").withMethod(Methods.GET).build()); } catch (Exception e) { log.error("Error adding health status route.", e.getMessage()); } } if (config.hasPath("application.favicon")) { try { final ByteBuffer faviconImageBuffer; final File faviconFile = new File(config.getString("application.favicon")); if (!faviconFile.exists()) { try (final InputStream stream = this.getClass().getResourceAsStream(config.getString("application.favicon"))) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] buffer = new byte[4096]; int read = 0; while (read != -1) { read = stream.read(buffer); if (read > 0) { baos.write(buffer, 0, read); } } faviconImageBuffer = ByteBuffer.wrap(baos.toByteArray()); } } else { try (final InputStream stream = Files.newInputStream(Paths.get(config.getString("application.favicon")))) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] buffer = new byte[4096]; int read = 0; while (read != -1) { read = stream.read(buffer); if (read > 0) { baos.write(buffer, 0, read); } } faviconImageBuffer = ByteBuffer.wrap(baos.toByteArray()); } } router.add(Methods.GET, "favicon.ico", (final HttpServerExchange exchange) -> { exchange.getResponseHeaders().add(Headers.CONTENT_TYPE, io.sinistral.proteus.server.MediaType.IMAGE_X_ICON.toString()); exchange.getResponseSender().send(faviconImageBuffer); }); } catch (Exception e) { log.error("Error adding favicon route.", e.getMessage()); } } return this; }
[ "Add utility routes the router\n\n@param router" ]
[ "Set the weekdays at which the event should take place.\n@param weekDays the weekdays at which the event should take place.", "Returns the ARGB components for all pixels in this image\n\n@return an array containing an array for each ARGB components in that order.", "static expansion helpers", "Convert a collection of objects to a JSON array with the string representations of that objects.\n@param collection the collection of objects.\n@return the JSON array with the string representations.", "Decides what the Map Web provider should be used and generates a builder for it.\n\n@return The AirMapViewBuilder for the selected Map Web provider.", "Create a patch representing what we actually processed. This may contain some fixed content hashes for removed\nmodules.\n\n@param original the original\n@return the processed patch", "Helper method for formatting connection establishment messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@return A formatted message in the format:\n\"[&lt;connectionName&gt;] remote host[&lt;host&gt;] &lt;connectionReason&gt;\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG.", "Prints text to output stream, replacing parameter start and end\nplaceholders\n\n@param text the String to print", "This method extracts predecessor data from an MSPDI file.\n\n@param task Task data" ]
public boolean decompose(DMatrixRMaj mat , int indexStart , int n ) { double m[] = mat.data; double el_ii; double div_el_ii=0; for( int i = 0; i < n; i++ ) { for( int j = i; j < n; j++ ) { double sum = m[indexStart+i*mat.numCols+j]; int iEl = i*n; int jEl = j*n; int end = iEl+i; // k = 0:i-1 for( ; iEl<end; iEl++,jEl++ ) { // sum -= el[i*n+k]*el[j*n+k]; sum -= el[iEl]*el[jEl]; } if( i == j ) { // is it positive-definate? if( sum <= 0.0 ) return false; el_ii = Math.sqrt(sum); el[i*n+i] = el_ii; m[indexStart+i*mat.numCols+i] = el_ii; div_el_ii = 1.0/el_ii; } else { double v = sum*div_el_ii; el[j*n+i] = v; m[indexStart+j*mat.numCols+i] = v; } } } return true; }
[ "Decomposes a submatrix. The results are written to the submatrix\nand to its internal matrix L.\n\n@param mat A matrix which has a submatrix that needs to be inverted\n@param indexStart the first index of the submatrix\n@param n The width of the submatrix that is to be inverted.\n@return True if it was able to finish the decomposition." ]
[ "Locate the no arg constructor for the class.", "Get a scalar value for the DOM diversity using the Robust Tree Edit Distance\n\n@param dom1\n@param dom2\n@return", "Get a TokenizerFactory that does Penn Treebank tokenization.\nThis is now the recommended factory method to use.\n\n@param factory A TokenFactory that determines what form of token is returned by the Tokenizer\n@param options A String specifying options (see the class javadoc for details)\n@param <T> The type of the tokens built by the LexedTokenFactory\n@return A TokenizerFactory that does Penn Treebank tokenization", "Adds a chain of vertices to the end of this list.", "Take four bytes from the specified position in the specified\nblock and convert them into a 32-bit int, using the big-endian\nconvention.\n@param bytes The data to read from.\n@param offset The position to start reading the 4-byte int from.\n@return The 32-bit integer represented by the four bytes.", "Create an LBuffer from a given file.\n@param file\n@return\n@throws IOException", "Gets a SerialMessage with the BASIC SET command\n@param the level to set.\n@return the serial message", "Calculate the first argument raised to the power of the second.\nThis method only supports non-negative powers.\n@param value The number to be raised.\n@param power The exponent (must be positive).\n@return {@code value} raised to {@code power}.", "For creating regular columns\n@return" ]
@NonNull private List<String> mapObsoleteElements(List<String> names) { List<String> elementsToRemove = new ArrayList<>(names.size()); for (String name : names) { if (name.startsWith("android")) continue; elementsToRemove.add(name); } return elementsToRemove; }
[ "Maps all views that don't start with \"android\" namespace.\n\n@param names All shared element names.\n@return The obsolete shared element names." ]
[ "Get a log file and last relevant date, and check if the log file is relevant\n@param currentLogFile The log file\n@param lastRelevantDate The last date which files should be keeping since\n@return false if the file should be deleted, true if it does not.", "Set the url for the shape file.\n\n@param url shape file url\n@throws LayerException file cannot be accessed\n@since 1.7.1", "Associate a type with the given resource model.", "Get stream for URL only\n\n@param stringUrl URL to get content\n@return the input stream\n@throws IOException I/O error happened", "Use this API to fetch appfwhtmlerrorpage resource of given name .", "Returns the version of Jenkins Artifactory Plugin or empty string if not found\n\n@return the version of Jenkins Artifactory Plugin or empty string if not found", "Method to read our client's plain text\n\n@param file_name\n@return the filereader to translate client's plain text into our files\n@throws BeastException\nif any problem is found whit the file", "Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance", "Creates a Bytes object by copying the value of the given String with a given charset" ]
private SubProject readSubProject(byte[] data, int uniqueIDOffset, int filePathOffset, int fileNameOffset, int subprojectIndex) { try { SubProject sp = new SubProject(); int type = SUBPROJECT_TASKUNIQUEID0; if (uniqueIDOffset != -1) { int value = MPPUtility.getInt(data, uniqueIDOffset); type = MPPUtility.getInt(data, uniqueIDOffset + 4); switch (type) { case SUBPROJECT_TASKUNIQUEID0: case SUBPROJECT_TASKUNIQUEID1: case SUBPROJECT_TASKUNIQUEID2: case SUBPROJECT_TASKUNIQUEID3: case SUBPROJECT_TASKUNIQUEID4: case SUBPROJECT_TASKUNIQUEID5: case SUBPROJECT_TASKUNIQUEID6: { sp.setTaskUniqueID(Integer.valueOf(value)); m_taskSubProjects.put(sp.getTaskUniqueID(), sp); break; } default: { if (value != 0) { sp.addExternalTaskUniqueID(Integer.valueOf(value)); m_taskSubProjects.put(Integer.valueOf(value), sp); } break; } } // Now get the unique id offset for this subproject value = 0x00800000 + ((subprojectIndex - 1) * 0x00400000); sp.setUniqueIDOffset(Integer.valueOf(value)); } if (type == SUBPROJECT_TASKUNIQUEID4) { sp.setFullPath(MPPUtility.getUnicodeString(data, filePathOffset)); } else { // // First block header // filePathOffset += 18; // // String size as a 4 byte int // filePathOffset += 4; // // Full DOS path // sp.setDosFullPath(MPPUtility.getString(data, filePathOffset)); filePathOffset += (sp.getDosFullPath().length() + 1); // // 24 byte block // filePathOffset += 24; // // 4 byte block size // int size = MPPUtility.getInt(data, filePathOffset); filePathOffset += 4; if (size == 0) { sp.setFullPath(sp.getDosFullPath()); } else { // // 4 byte unicode string size in bytes // size = MPPUtility.getInt(data, filePathOffset); filePathOffset += 4; // // 2 byte data // filePathOffset += 2; // // Unicode string // sp.setFullPath(MPPUtility.getUnicodeString(data, filePathOffset, size)); //filePathOffset += size; } // // Second block header // fileNameOffset += 18; // // String size as a 4 byte int // fileNameOffset += 4; // // DOS file name // sp.setDosFileName(MPPUtility.getString(data, fileNameOffset)); fileNameOffset += (sp.getDosFileName().length() + 1); // // 24 byte block // fileNameOffset += 24; // // 4 byte block size // size = MPPUtility.getInt(data, fileNameOffset); fileNameOffset += 4; if (size == 0) { sp.setFileName(sp.getDosFileName()); } else { // // 4 byte unicode string size in bytes // size = MPPUtility.getInt(data, fileNameOffset); fileNameOffset += 4; // // 2 byte data // fileNameOffset += 2; // // Unicode string // sp.setFileName(MPPUtility.getUnicodeString(data, fileNameOffset, size)); //fileNameOffset += size; } } //System.out.println(sp.toString()); // Add to the list of subprojects m_file.getSubProjects().add(sp); return (sp); } // // Admit defeat at this point - we have probably stumbled // upon a data format we don't understand, so we'll fail // gracefully here. This will now be reported as a missing // sub project error by end users of the library, rather // than as an exception being thrown. // catch (ArrayIndexOutOfBoundsException ex) { return (null); } }
[ "Method used to read the sub project details from a byte array.\n\n@param data byte array\n@param uniqueIDOffset offset of unique ID\n@param filePathOffset offset of file path\n@param fileNameOffset offset of file name\n@param subprojectIndex index of the subproject, used to calculate unique id offset\n@return new SubProject instance" ]
[ "Creates an InputObjectStream and an OutputObjectStream from a Socket, and\npasses them to the closure. The streams will be closed after the closure\nreturns, even if an exception is thrown.\n\n@param socket this Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.0", "Removes the duplicate node list.\n\n@param list\nthe list\n@return the int", "Start with specifying the groupId", "Close the open stream.\n\nClose the stream if it was opened before", "Updates the story and returns the full record for the updated story.\nOnly comment stories can have their text updated, and only comment stories and\nattachment stories can be pinned. Only one of `text` and `html_text` can be specified.\n\n@param story Globally unique identifier for the story.\n@return Request object", "Read a FastTrack file.\n\n@param file FastTrack file", "those could be incorporated with above, but that would blurry everything.", "This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file", "returns IsolationLevel literal as matching\nto the corresponding id\n@return the IsolationLevel literal" ]
private float[] generateParticleTimeStamps(float totalTime) { float timeStamps[] = new float[mEmitRate * 2]; for ( int i = 0; i < mEmitRate * 2; i +=2 ) { timeStamps[i] = totalTime + mRandom.nextFloat(); timeStamps[i + 1] = 0; } return timeStamps; }
[ "Generate random time stamps from the current time upto the next one second.\nPassed as texture coordinates to the vertex shader, an unused field is present\nwith every pair passed.\n\n@param totalTime\n@return" ]
[ "Use this API to convert sslpkcs12.", "Manually set the breaker to be reset and ready for use. This\nis only useful after a manual trip otherwise the breaker will\ntrip automatically again if the service is still unavailable.\nJust like a real breaker. WOOT!!!", "Get image parent ID from imageID on the current agent.\n\n@param imageID\n@return", "Check if a dependency matches the filters\n\n@param dependency\n\n@return boolean", "Extract note text.\n\n@param row task data\n@return note text", "Notifies that multiple footer items are removed.\n\n@param positionStart the position.\n@param itemCount the item count.", "Create and register the declaration of class D with the given metadata.\n\n@param metadata the metadata to create the declaration\n@return the created declaration of class D", "Decide which donor node to steal from. This is a policy implementation.\nI.e., in the future, additional policies could be considered. At that\ntime, this method should be overridden in a sub-class, or a policy object\nought to implement this algorithm.\n\nCurrent policy:\n\n1) If possible, a stealer node that is the zone n-ary in the finalCluster\nsteals from the zone n-ary in the currentCluster in the same zone.\n\n2) If there are no partition-stores to steal in the same zone (i.e., this\nis the \"zone expansion\" use case), then a differnt policy must be used.\nThe stealer node that is the zone n-ary in the finalCluster determines\nwhich pre-existing zone in the currentCluster hosts the primary partition\nid for the partition-store. The stealer then steals the zone n-ary from\nthat pre-existing zone.\n\nThis policy avoids unnecessary cross-zone moves and distributes the load\nof cross-zone moves approximately-uniformly across pre-existing zones.\n\nOther policies to consider:\n\n- For zone expansion, steal all partition-stores from one specific\npre-existing zone.\n\n- Replace heuristic to approximately uniformly distribute load among\nexisting zones to something more concrete (i.e. track steals from each\npre-existing zone and forcibly balance them).\n\n- Select a single donor for all replicas in a new zone. This will require\ndonor-based rebalancing to be run (at least for this specific part of the\nplan). This would reduce the number of donor-side scans of data. (But\nstill send replication factor copies over the WAN.) This would require\napparatus in the RebalanceController to work.\n\n- Set up some sort of chain-replication in which a single stealer in the\nnew zone steals some replica from a pre-exising zone, and then other\nn-aries in the new zone steal from the single cross-zone stealer in the\nzone. This would require apparatus in the RebalanceController to work.\n\n@param currentSRP\n@param finalSRP\n@param stealerZoneId\n@param stealerNodeId\n@param stealerPartitionId\n@return the node id of the donor for this partition Id.", "Returns the list of user defined attribute names.\n\n@return the list of user defined attribute names, if there are none it returns an empty set." ]
public static String encodeAuthority(String authority, String encoding) throws UnsupportedEncodingException { return HierarchicalUriComponents.encodeUriComponent(authority, encoding, HierarchicalUriComponents.Type.AUTHORITY); }
[ "Encodes the given URI authority with the given encoding.\n@param authority the authority to be encoded\n@param encoding the character encoding to encode to\n@return the encoded authority\n@throws UnsupportedEncodingException when the given encoding parameter is not supported" ]
[ "Get the photos for the specified group pool, optionally filtering by taf.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param groupId\nThe group ID\n@param userId\nThe user ID (may be null)\n@param tags\nThe optional tags (may be null)\n@param extras\nSet of extra-attributes to include (may be null)\n@param perPage\nThe number of photos per page (0 to ignore)\n@param page\nThe page offset (0 to ignore)\n@return A Collection of Photo objects\n@throws FlickrException", "Update the current position with specified length.\nThe input will append to the current position of the iterator.\n\n@param length update length", "Replace error msg.\n\n@param origMsg\nthe orig msg\n@return the string", "Gets the project name for a favorite entry.\n\n@param cms the CMS context\n@param entry the favorite entry\n@return the project name for the favorite entry\n@throws CmsException if something goes wrong", "Encodes the given URI query with the given encoding.\n@param query the query to be encoded\n@param encoding the character encoding to encode to\n@return the encoded query\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "Sets the highlight strength for the InnerPaddingOutline.\n\n@param _highlightStrength The highlighting value for the outline.", "Will wait a maximum of 1 minute for each node to response with their result. If an error occurs on any\nmember, we will always attempt to continue execution and collect as many results as possible.\n\n@param execSvc\n@param members\n@param callable\n@return", "Generates a change event for a local update of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@param update the update specifier.\n@return a change event for a local update of a document in the given namespace referring\nto the given document _id.", "Use this API to fetch appfwprofile_xmlvalidationurl_binding resources of given name ." ]
public Set<BsonValue> getPausedDocumentIds(final MongoNamespace namespace) { this.waitUntilInitialized(); try { ongoingOperationsGroup.enter(); final Set<BsonValue> pausedDocumentIds = new HashSet<>(); for (final CoreDocumentSynchronizationConfig config : this.syncConfig.getSynchronizedDocuments(namespace)) { if (config.isPaused()) { pausedDocumentIds.add(config.getDocumentId()); } } return pausedDocumentIds; } finally { ongoingOperationsGroup.exit(); } }
[ "Return the set of synchronized document _ids in a namespace\nthat have been paused due to an irrecoverable error.\n\n@param namespace the namespace to get paused document _ids for.\n@return the set of paused document _ids in a namespace" ]
[ "Use this API to delete gslbsite of given name.", "Produces or returns the existing proxy class. The operation is thread-safe.\n\n@return always the class of the proxy", "Format the label text.\n\n@param scaleUnit The unit used for the scalebar.\n@param value The scale value.\n@param intervalUnit The scaled unit for the intervals.", "Prepare a model JSON for analyze, resolves the hierarchical structure\ncreates a HashMap which contains all resourceIds as keys and for each key\nthe JSONObject, all id are keys of this map\n@param object\n@return a HashMap keys: all ressourceIds values: all child JSONObjects\n@throws org.json.JSONException", "Use this API to fetch inat resource of given name .", "Sets the RDF serialization tasks based on the given string value.\n\n@param tasks\na space-free, comma-separated list of task names", "Saves meta tree, writes database root and flushes the log.\n\n@param metaTree mutable meta tree\n@param env enclosing environment\n@param expired expired loggables (database root to be added)\n@return database root loggable which is read again from the log.", "Given a date represented by a Date instance, set the time\ncomponent of the date based on the hours and minutes of the\ntime supplied by the Date instance.\n\n@param date Date instance representing the date\n@param canonicalTime Date instance representing the time of day\n@return new Date instance with the required time set", "Writes a WBS entity to the PM XML file.\n\n@param mpxj MPXJ Task entity" ]
@Override public ProjectFile read(String accessDatabaseFileName) throws MPXJException { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb);DBQ=" + accessDatabaseFileName; m_connection = DriverManager.getConnection(url); m_projectID = Integer.valueOf(1); return (read()); } catch (ClassNotFoundException ex) { throw new MPXJException("Failed to load JDBC driver", ex); } catch (SQLException ex) { throw new MPXJException("Failed to create connection", ex); } finally { if (m_connection != null) { try { m_connection.close(); } catch (SQLException ex) { // silently ignore exceptions when closing connection } } } }
[ "This is a convenience method which reads the first project\nfrom the named MPD file using the JDBC-ODBC bridge driver.\n\n@param accessDatabaseFileName access database file name\n@return ProjectFile instance\n@throws MPXJException" ]
[ "Use this API to fetch snmpalarm resource of given name .", "Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found", "Navigate to this address in the given model node.\n\n@param model the model node\n@param create {@code true} to create the last part of the node if it does not exist\n@return the submodel\n@throws NoSuchElementException if the model contains no such element\n\n@deprecated manipulating a deep DMR node tree via PathAddress is no longer how the management layer works\ninternally, so this method has become legacy cruft. Management operation handlers\nshould obtain a {@link org.jboss.as.controller.registry.Resource Resource} from the\n{@link org.jboss.as.controller.OperationContext#readResource(PathAddress) OperationContext}\nand use the {@code Resource} API to access child resources", "checks if there is a writelock for transaction tx on object obj.\nReturns true if so, else false.", "This method writes a single predecessor link to the MSPDI file.\n\n@param taskID The task UID\n@param type The predecessor type\n@param lag The lag duration\n@return A new link to be added to the MSPDI file", "Use this API to fetch a cmpglobal_cmppolicy_binding resources.", "Searches all descendant folders using a given query and query parameters.\n@param offset is the starting position.\n@param limit the maximum number of items to return. The default is 30 and the maximum is 200.\n@param bsp containing query and advanced search capabilities.\n@return a PartialCollection containing the search results.", "Get a View that displays the data at the specified\nposition in the data set. In this case, if we are at\nthe end of the list and we are still in append mode, we\nask for a pending view and return it, plus kick off the\nbackground task to append more data to the wrapped\nadapter.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View", "Invokes a function defined in the script.\n\n@param funcName\nThe function name.\n@param params\nThe parameter array.\n@return\nA boolean value representing whether the function is\nexecuted correctly. If the function cannot be found, or\nparameters don't match, {@code false} is returned." ]
private Field getFieldRecursive(Class c, String name) throws NoSuchFieldException { try { return c.getDeclaredField(name); } catch (NoSuchFieldException e) { // if field could not be found in the inheritance hierarchy, signal error if ((c == Object.class) || (c.getSuperclass() == null) || c.isInterface()) { throw e; } // if field could not be found in class c try in superclass else { return getFieldRecursive(c.getSuperclass(), name); } } }
[ "try to find a field in class c, recurse through class hierarchy if necessary\n\n@throws NoSuchFieldException if no Field was found into the class hierarchy" ]
[ "Adds the index input to list.\n\n@param name the name\n@param in the in\n@param postingsFormatName the postings format name\n@return the string\n@throws IOException Signals that an I/O exception has occurred.", "Get a list of people in a given photo.\n\n@param photoId\n@throws FlickrException", "Gets the matching beans for binding criteria from a list of beans\n\n@param resolvable the resolvable\n@return A set of filtered beans", "Returns the URL of a classpath resource.\n\n@param resourceName\nThe name of the resource.\n\n@return The URL.", "Helper method to add a Java integer value to a message digest.\n\n@param digest the message digest being built\n@param value the integer whose bytes should be included in the digest", "Sets the underlying read timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#readTimeout(long, TimeUnit)", "Utility function that fetches user defined store definitions\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch store definitions from\n@return The map container that maps store names to store definitions", "Return collection of path Ids in priority order\n\n@param profileId ID of profile\n@return collection of path Ids in priority order", "Synchronize the geotools transaction with the platform transaction, if such a transaction is active.\n\n@param featureStore\n@param dataSource" ]
public Membership getMembership() { URI uri = new URIBase(getBaseUri()).path("_membership").build(); Membership membership = couchDbClient.get(uri, Membership.class); return membership; }
[ "Get the list of all nodes and the list of active nodes in the cluster.\n\n@return Membership object encapsulating lists of all nodes and the cluster nodes\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-_membership-\">\n_membership</a>" ]
[ "Find the the qualfied container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback.", "dispatch to gravity state", "Pseudo-Inverse of a matrix calculated in the least square sense.\n\n@param matrix The given matrix A.\n@return pseudoInverse The pseudo-inverse matrix P, such that A*P*A = A and P*A*P = P", "Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards.\n\n@param key\nname of the parameter to add\n@param value\nvalue of the parameter to create\n@return the newly created parameter", "Pass the activity you use the drawer in ;)\nThis is required if you want to set any values by resource\n\n@param activity\n@return", "In case parent thread spawn thread we need create a new queue\nfor child thread but use the only one root step. In the end all steps will be\nchildren of root step, all we need is sync adding steps\n@param parentValue value from parent thread\n@return local copy of queue in this thread with parent root as first element", "If the String argument locatorSelectionStrategy is as key in the map representing the locatorSelectionStrategies, the\ncorresponding strategy is selected, else it remains unchanged.\n@param locatorSelectionStrategy", "Generates a schedule based on some meta data. The schedule generation\nconsiders short periods.\n\n@param referenceDate The date which is used in the schedule to internally convert dates to doubles, i.e., the date where t=0.\n@param startDate The start date of the first period.\n@param frequency The frequency.\n@param maturity The end date of the last period.\n@param daycountConvention The daycount convention.\n@param shortPeriodConvention If short period exists, have it first or last.\n@param dateRollConvention Adjustment to be applied to the all dates.\n@param businessdayCalendar Businessday calendar (holiday calendar) to be used for date roll adjustment.\n@param fixingOffsetDays Number of business days to be added to period start to get the fixing date.\n@param paymentOffsetDays Number of business days to be added to period end to get the payment date.\n@return The corresponding schedule\n@deprecated Will be removed in version 2.3", "This method returns the value of the product using a Black-Scholes model for the swap rate\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve on which to value the swap.\n@param swaprateVolatility The Black volatility.\n@return Value of this product" ]
public boolean contains(String id) { assertNotEmpty(id, "id"); InputStream response = null; try { response = couchDbClient.head(new DatabaseURIHelper(dbUri).documentUri(id)); } catch (NoDocumentException e) { return false; } finally { close(response); } return true; }
[ "Checks if a document exist in the database.\n\n@param id The document _id field.\n@return true If the document is found, false otherwise." ]
[ "ChromeCast does not allow you to jump levels too quickly to avoid blowing speakers.\nSetting by increment allows us to easily get the level we want\n\n@param level volume level from 0 to 1 to set\n@throws IOException\n@see <a href=\"https://developers.google.com/cast/docs/design_checklist/sender#sender-control-volume\">sender</a>", "Obtains a Symmetry010 zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identifying the association\n@param embeddedKey the {@link EntityKey} identifying the embedded component\n@return the created {@link Relationship} that represents the association", "Sets a request header with the given name and value. If a header with the\nspecified name has already been set then the new value overwrites the\ncurrent value.\n\n@param header the name of the header\n@param value the value of the header\n\n@throws NullPointerException if header or value are null\n@throws IllegalArgumentException if header or value are the empty string", "Constructs a reference of the given type to the given\nreferent. The reference is registered with the queue\nfor later purging.\n\n@param type HARD, SOFT or WEAK\n@param referent the object to refer to\n@param hash the hash code of the <I>key</I> of the mapping;\nthis number might be different from referent.hashCode() if\nthe referent represents a value and not a key", "Add a calendar day node.\n\n@param parentNode parent node\n@param calendar ProjectCalendar instance\n@param day calendar day", "Loads the leap second rules from a URL, often in a jar file.\n\n@param url the jar file to load, not null\n@throws Exception if an error occurs", "Get all parameter keys.\n@return a set of parameter keys", "Creates a setter method with the given body.\n\n@param declaringClass the class to which we will add the setter\n@param propertyNode the field to back the setter\n@param setterName the name of the setter\n@param setterBlock the statement representing the setter block" ]
public static void printHelp(final Options options) { Collection<Option> c = options.getOptions(); System.out.println("Command line options are:"); int longestLongOption = 0; for (Option op : c) { if (op.getLongOpt().length() > longestLongOption) { longestLongOption = op.getLongOpt().length(); } } longestLongOption += 2; String spaces = StringUtils.repeat(" ", longestLongOption); for (Option op : c) { System.out.print("\t-" + op.getOpt() + " --" + op.getLongOpt()); if (op.getLongOpt().length() < spaces.length()) { System.out.print(spaces.substring(op.getLongOpt().length())); } else { System.out.print(" "); } System.out.println(op.getDescription()); } }
[ "Prints the help on the command line\n\n@param options Options object from commons-cli" ]
[ "Obtain parameters from query\n\n@param query query to scan\n@return Map of parameters", "Write the table configuration to a buffered writer.", "Get the time zone for a specific exchange suffix\n\n@param suffix suffix for the exchange in YahooFinance\n@return time zone of the exchange", "Get image parent ID from imageID on the current agent.\n\n@param imageID\n@return", "Retrieve and validate vector clock value from the REST request.\n\"X_VOLD_VECTOR_CLOCK\" is the vector clock header.\n\n@return true if present, false if missing", "Searches the set of imports to find a matching import by type name.\n\n@param typeName\nname of type (qualified or simple name allowed)\n@return found import or {@code null}", "Finds the beat in which the specified track position falls.\n\n@param milliseconds how long the track has been playing\n\n@return the beat number represented by that time, or -1 if the time is before the first beat", "Retrieves the amount of time between two date time values. Note that\nthese values are converted into canonical values to remove the\ndate component.\n\n@param start start time\n@param end end time\n@return length of time", "Helper to return the first item in the iterator or null.\n\n@return T the first item or null." ]
public static StoreDefinition getStoreDef(List<StoreDefinition> list, String name) { for(StoreDefinition def: list) if(def.getName().equals(name)) return def; return null; }
[ "Get a store definition from the given list of store definitions\n\n@param list A list of store definitions\n@param name The name of the store\n@return The store definition" ]
[ "Facade method for operating the Telnet Shell supporting line editing and command\nhistory over a socket.\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Main command handler\n@param input Input stream.\n@param output Output stream.\n@return Shell that can be either further customized or run directly by calling commandLoop().", "End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance", "Check that a list allowing null and empty item contains at least one element that is\nnot blank.\n@param list can't be null\n@return", "Returns a map from a category path to the wrapper of all the sub-categories of the category with the path given as key.\n\n@return a map from a category path to all sub-categories of the path's category.", "any possible bean invocations from other ADV observers", "Start a managed server.\n\n@param factory the boot command factory", "Sets the left padding for all cells in the row.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining", "Helper method to split a string by a given character, with empty parts omitted.", "Use this API to update ipv6." ]
public Replication targetOauth(String consumerSecret, String consumerKey, String tokenSecret, String token) { targetOauth = new JsonObject(); this.consumerSecret = consumerSecret; this.consumerKey = consumerKey; this.tokenSecret = tokenSecret; this.token = token; return this; }
[ "Authenticate with the target database using OAuth.\n\n@param consumerSecret consumer secret\n@param consumerKey consumer key\n@param tokenSecret token secret\n@param token token\n@return this Replication instance to set more options\n@deprecated OAuth 1.0 implementation has been <a href=\"http://docs.couchdb.org/en/stable/whatsnew/2.1.html?highlight=oauth#upgrade-notes\"\ntarget=\"_blank\">removed in CouchDB 2.1</a>" ]
[ "Remove duplicate Strings from the given array. Also sorts the array, as\nit uses a TreeSet.\n\n@param array the String array\n@return an array without duplicates, in natural sort order", "Returns a correlation matrix which has rank &lt; n and for which the first n factors agree with the factors of correlationMatrix.\n\n@param correlationMatrix The given correlation matrix.\n@param numberOfFactors The requested number of factors (Eigenvectors).\n@return Factor reduced correlation matrix.", "We add typeRefs without Nodes on the fly, so we should remove them before relinking.", "Start a managed server.\n\n@param factory the boot command factory", "Invoke to tell listeners that an step started event processed", "Read the domain controller data from an S3 file.\n\n@param directoryName the name of the directory in the bucket that contains the S3 file\n@return the domain controller data", "Returns the Class object of the Event implementation.", "Split a module Id to get the module version\n@param moduleId\n@return String", "Sets a header per-request\n\n@param key Header key\n@param value Header value\n@return The request itself" ]
public final SimpleFeatureCollection autoTreat(final Template template, final String features) throws IOException { SimpleFeatureCollection featuresCollection = treatStringAsURL(template, features); if (featuresCollection == null) { featuresCollection = treatStringAsGeoJson(features); } return featuresCollection; }
[ "Get the features collection from a GeoJson inline string or URL.\n\n@param template the template\n@param features what to parse\n@return the feature collection\n@throws IOException" ]
[ "Gets the Correlation distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Correlation distance between x and y.", "Gets the instance associated with the current thread.", "Use this API to fetch dnssuffix resources of given names .", "Process task dependencies.", "Returns the JRDesignGroup for the DJGroup passed\n@param jd\n@param layoutManager\n@param group\n@return", "Use this API to fetch all the systemcore resources that are configured on netscaler.", "Reads the next \"word from the request, comprising all characters up to the next SPACE.\nCharacters are tested by the supplied CharacterValidator, and an exception is thrown\nif invalid characters are encountered.", "Sets all padding for all cells in the row to the same value.\n@param padding new padding for top, bottom, left, and right, ignored if smaller than 0\n@return this to allow chaining", "Utility method to convert an array of bytes into a long. Byte ordered is\nassumed to be big-endian.\n@param bytes The data to read from.\n@param offset The position to start reading the 8-byte long from.\n@return The 64-bit integer represented by the eight bytes.\n@since 1.1" ]
public void createOverride(int groupId, String methodName, String className) throws Exception { // first make sure this doesn't already exist for (Method method : EditService.getInstance().getMethodsFromGroupId(groupId, null)) { if (method.getMethodName().equals(methodName) && method.getClassName().equals(className)) { // don't add if it already exists in the group return; } } try (Connection sqlConnection = sqlService.getConnection()) { PreparedStatement statement = sqlConnection.prepareStatement( "INSERT INTO " + Constants.DB_TABLE_OVERRIDE + "(" + Constants.OVERRIDE_METHOD_NAME + "," + Constants.OVERRIDE_CLASS_NAME + "," + Constants.OVERRIDE_GROUP_ID + ")" + " VALUES (?, ?, ?)" ); statement.setString(1, methodName); statement.setString(2, className); statement.setInt(3, groupId); statement.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } }
[ "given the groupId, and 2 string arrays, adds the name-responses pair to the table_override\n\n@param groupId ID of group\n@param methodName name of method\n@param className name of class\n@throws Exception exception" ]
[ "marks the message as read", "Create a new path\n\n@param pathName friendly name of path\n@param pathValue path value or regex\n@param requestType path request type. \"GET\", \"POST\", etc", "Call the onQueryExecuteTimeLimitExceeded hook if necessary\n@param sql sql statement that took too long\n@param queryStartTime time when query was started.", "Check exactly the week check-boxes representing the given weeks.\n@param weeksToCheck the weeks selected.", "This method calls the index state. It should be called once per crawl in order to setup the\ncrawl.\n\n@return The initial state.", "set the textColor of the ColorHolder to an drawable\n\n@param ctx\n@param drawable", "Returns true if the ASTNode is a declaration of a closure, either as a declaration\nor a field.\n@param expression\nthe target expression\n@return\nas described", "Sets the upper limits for the \"moving\" body translation relative to joint point.\n\n@param limitX the X upper lower translation limit\n@param limitY the Y upper lower translation limit\n@param limitZ the Z upper lower translation limit", "Notify listeners that the tree structure has changed." ]
public void addComparator(Comparator<T> comparator, boolean ascending) { this.comparators.add(new InvertibleComparator<T>(comparator, ascending)); }
[ "Add a Comparator to the end of the chain using the provided sort order.\n@param comparator the Comparator to add to the end of the chain\n@param ascending the sort order: ascending (true) or descending (false)" ]
[ "Add a new script\n\n@param model\n@param name\n@param script\n@return\n@throws Exception", "Prepares Artifactory server either from serverID or from ArtifactoryServer.\n\n@param artifactoryServerID\n@param pipelineServer\n@return", "Get the first non-white Y point\n@param img Image in memory\n@return the trimmed y start", "Non-blocking call that will throw any Exceptions in the traditional\nmanner on access\n\n@param key\n@param value\n@return", "response simple String\n\n@param response\n@param obj", "Generate an ordered set of column definitions from an ordered set of column names.\n\n@param columns column definitions\n@param order column names\n@return ordered set of column definitions", "Convert gallery name to not found error key.\n@param gallery gallery name for example \"downloadgallery\"\n@return key as string \"ERR_REASON_NO_DOWNLOADGALLERY_0\"", "Helper to read an optional Integer value.\n@param path The XML path of the element to read.\n@return The Integer value stored in the XML, or <code>null</code> if the value could not be read.", "Curries a procedure that takes one argument.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a procedure that takes no arguments. Never <code>null</code>." ]
protected void addPropertiesStart(String type) { putProperty(PropertyKey.Host.name(), IpUtils.getHostName()); putProperty(PropertyKey.Type.name(), type); putProperty(PropertyKey.Status.name(), Status.Start.name()); }
[ "Add properties to 'properties' map on transaction start\n@param type - of transaction" ]
[ "Ask the specified player for the specified waveform preview from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform preview\n\n@return the preview, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running", "Creates the automata.\n\n@param prefix the prefix\n@param regexp the regexp\n@param automatonMap the automaton map\n@return the list\n@throws IOException Signals that an I/O exception has occurred.", "Called on mouse up in the caption area, ends dragging by ending event\ncapture.\n\n@param event the mouse up event that ended dragging\n\n@see DOM#releaseCapture\n@see #beginDragging\n@see #endDragging", "Tests whether the ClassNode implements the specified method name\n\n@param classNode The ClassNode\n@param methodName The method name\n@param argTypes\n@return True if it implements the method", "Specifies convergence criteria\n\n@param maxIterations Maximum number of iterations\n@param ftol convergence based on change in function value. try 1e-12\n@param gtol convergence based on residual magnitude. Try 1e-12", "Finds the parent address, everything before the last address part.\n\n@param address the address to get the parent\n\n@return the parent address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty", "Add the elements that all values objects require from the provided values object.\n\n@param sourceValues the values object containing the required elements", "Creates a new SimpleMatrix with the specified DMatrixRMaj used as its internal matrix. This means\nthat the reference is saved and calls made to the returned SimpleMatrix will modify the passed in DMatrixRMaj.\n\n@param internalMat The internal DMatrixRMaj of the returned SimpleMatrix. Will be modified.", "Add \"GROUP BY\" clause to the SQL query statement. This can be called multiple times to add additional \"GROUP BY\"\nclauses.\n\n<p>\nNOTE: Use of this means that the resulting objects may not have a valid ID column value so cannot be deleted or\nupdated.\n</p>" ]
public ClassicCounter<K2> setCounter(K1 o, Counter<K2> c) { ClassicCounter<K2> old = getCounter(o); total -= old.totalCount(); if (c instanceof ClassicCounter) { map.put(o, (ClassicCounter<K2>) c); } else { map.put(o, new ClassicCounter<K2>(c)); } total += c.totalCount(); return old; }
[ "replace the counter for K1-index o by new counter c" ]
[ "Use this API to fetch all the dnstxtrec resources that are configured on netscaler.", "Adds BETWEEN criteria,\ncustomer_id between 1 and 10\n\n@param attribute The field name to be used\n@param value1 The lower boundary\n@param value2 The upper boundary", "Webkit based browsers require that we set the webkit-user-drag style\nattribute to make an element draggable.", "Returns the configured fields of the current field configuration.\n\n@return the configured fields of the current field configuration", "Create a Count-Query for QueryBySQL\n\n@param aQuery\n@return The count query", "Should the URI explicitly not be cached.\n\n@param requestUri request URI\n@return true when caching is prohibited", "compute Sinh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "Create a set out of the items in the Iterable.\n\n@param <T>\nThe type of items in the Iterable.\n@param items\nThe items to be made into a set.\n@return A set consisting of the items from the Iterable.", "This method is called from the task class each time an attribute\nis added, ensuring that all of the attributes present in each task\nrecord are present in the resource model.\n\n@param field field identifier" ]
private HiveShellContainer createHiveServerContainer(final List<? extends Script> scripts, final Object testCase, TemporaryFolder baseDir) throws IOException { HiveServerContext context = new StandaloneHiveServerContext(baseDir, config); final HiveServerContainer hiveTestHarness = new HiveServerContainer(context); HiveShellBuilder hiveShellBuilder = new HiveShellBuilder(); hiveShellBuilder.setCommandShellEmulation(config.getCommandShellEmulator()); HiveShellField shellSetter = loadScriptUnderTest(testCase, hiveShellBuilder); if (scripts != null) { hiveShellBuilder.overrideScriptsUnderTest(scripts); } hiveShellBuilder.setHiveServerContainer(hiveTestHarness); loadAnnotatedResources(testCase, hiveShellBuilder); loadAnnotatedProperties(testCase, hiveShellBuilder); loadAnnotatedSetupScripts(testCase, hiveShellBuilder); // Build shell final HiveShellContainer shell = hiveShellBuilder.buildShell(); // Set shell shellSetter.setShell(shell); if (shellSetter.isAutoStart()) { shell.start(); } return shell; }
[ "Traverses the test case annotations. Will inject a HiveShell in the test case that envelopes the HiveServer." ]
[ "Encodes the given source into an encoded String using the rules specified\nby the given component and with the given options.\n@param source the source string\n@param encoding the encoding of the source string\n@param type the URI component for the source\n@return the encoded URI\n@throws IllegalArgumentException when the given uri parameter is not a valid URI", "Sets the global. Does not add the global to the ExecutionResults.\n\n@param identifier\nThe identifier of the global\n@param object\nThe instance to be set as the global.\n@return", "Main method of this class related to ListView widget. This method is the responsible of\nrecycle or create a new Renderer instance with all the needed information to implement the\nrendering. This method will validate all the attributes passed in the builder constructor and\nwill check if can recycle or has to create a new Renderer instance.\n\nThis method is used with ListView because the view recycling mechanism is implemented in this\nclass. RecyclerView widget will use buildRendererViewHolder method.\n\n@return ready to use Renderer instance.", "Get a list of path transformers for a given address.\n\n@param address the path address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return a list of path transformations", "Search for the second entry in the second database. Use this method for databases configured with no duplicates.\n\n@param second second key (value for first).\n@return null if no entry found, otherwise the value.", "Returns the earlier of two dates, handling null values. A non-null Date\nis always considered to be earlier than a null Date.\n\n@param d1 Date instance\n@param d2 Date instance\n@return Date earliest date", "This method searches in the Component Management Service, so given an\nagent name returns its IExternalAccess\n\n@param agent_name\nThe name of the agent in the platform\n@return The IComponentIdentifier of the agent in the platform", "Use this API to fetch nstrafficdomain_binding resources of given names .", "Ensures that the given collection descriptor has the collection-class property if necessary.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If collection-class is given for an array or if no collection-class is given but required" ]
public Map<String, Table> process(File directory, String prefix) throws IOException { String filePrefix = prefix.toUpperCase(); Map<String, Table> tables = new HashMap<String, Table>(); File[] files = directory.listFiles(); if (files != null) { for (File file : files) { String name = file.getName().toUpperCase(); if (!name.startsWith(filePrefix)) { continue; } int typeIndex = name.lastIndexOf('.') - 3; String type = name.substring(typeIndex, typeIndex + 3); TableDefinition definition = TABLE_DEFINITIONS.get(type); if (definition != null) { Table table = new Table(); TableReader reader = new TableReader(definition); reader.read(file, table); tables.put(type, table); //dumpCSV(type, definition, table); } } } return tables; }
[ "Main entry point. Reads a directory containing a P3 Btrieve database files\nand returns a map of table names and table content.\n\n@param directory directory containing the database\n@param prefix file name prefix used to identify files from the same database\n@return Map of table names to table data" ]
[ "In the case where the prefix sits at a segment boundary, and the prefix sequence is null - null - 0, this changes to prefix sequence of null - x - 0, where x is segment bit length.\n\nNote: We allow both [null, null, 0] and [null, x, 0] where x is segment length. However, to avoid inconsistencies when doing segment replacements,\nand when getting subsections, in the calling constructor we normalize [null, null, 0] to become [null, x, 0].\nWe need to support [null, x, 0] so that we can create subsections and full addresses ending with [null, x] where x is bit length.\nSo we defer to that when constructing addresses and sections.\nAlso note that in our append/appendNetowrk/insert/replace we have special handling for cases like inserting [null] into [null, 8, 0] at index 2.\nThe straight replace would give [null, 8, null, 0] which is wrong.\nIn that code we end up with [null, null, 8, 0] by doing a special trick:\nWe remove the end of [null, 8, 0] and do an append [null, 0] and we'd remove prefix from [null, 8] to get [null, null] and then we'd do another append to get [null, null, null, 0]\nThe final step is this normalization here that gives [null, null, 8, 0]\n\nHowever, when users construct AddressDivisionGrouping or IPAddressDivisionGrouping, either one is allowed: [null, null, 0] and [null, x, 0].\nSince those objects cannot be further subdivided with getSection/getNetworkSection/getHostSection or grown with appended/inserted/replaced,\nthere are no inconsistencies introduced, we are simply more user-friendly.\nAlso note that normalization of AddressDivisionGrouping or IPAddressDivisionGrouping is really not possible without the address creator objects we use for addresses and sections,\nthat allow us to recreate new segments of the correct type.\n\n@param sectionPrefixBits\n@param segments\n@param segmentBitCount\n@param segmentByteCount\n@param segProducer", "Map the Primavera UDF to a custom field.\n\n@param fieldType parent object type\n@param dataType UDF data type\n@param name UDF name\n@return FieldType instance", "Execute a CLI command. This can be any command that you might execute on\nthe CLI command line, including both server-side operations and local\ncommands such as 'cd' or 'cn'.\n\n@param cliCommand A CLI command.\n@return A result object that provides all information about the execution\nof the command.", "Flattens an option into its value or else null, which is not great but is usually more convenient in Java.\n@param option Optional value -- either Some(T) or None\n@param <T> Any type\n@return The value inside the option, or else null", "Sets the Calendar used. 'Standard' if no value is set.\n\n@param calendarName Calendar name", "Checks to see if either the diagonal element or off diagonal element is zero. If one is\nthen it performs a split or pushes it off the matrix.\n\n@return True if there was a zero.", "Read task data from a Gantt Designer file.\n\n@param gantt Gantt Designer file", "This method is used to extract the resource hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param resource resource instance\n@param data hyperlink data block", "Process the layers.conf file.\n\n@param repoRoot the root\n@return the layers conf\n@throws java.io.IOException" ]
public static void copyThenClose(InputStream input, OutputStream output) throws IOException { copy(input, output); input.close(); output.close(); }
[ "Copies information between specified streams and then closes\nboth of the streams.\n@throws java.io.IOException" ]
[ "Get the root path where the build is located, the project may be checked out to\na sub-directory from the root workspace location.\n\n@param globalEnv EnvVars to take the workspace from, if workspace is not found\nthen it is take from project.getSomeWorkspace()\n@return The location of the root of the Gradle build.\n@throws IOException\n@throws InterruptedException", "Reads a file and returns the result in a String\n\n@param file File\n@return String\n@throws IOException", "Get or create the log context based on the logging profile.\n\n@param loggingProfile the logging profile to get or create the log context for\n\n@return the log context that was found or a new log context", "Configures the player whose current track waveforms and status will automatically be reflected. Whenever a new\ntrack is loaded on that player, the waveform and metadata will be updated, and the current playback position and\nstate of the player will be reflected by the component.\n\n@param player the player number to monitor, or zero if monitoring should stop", "Returns an array of all declared fields in the given class and all\nsuper-classes.", "Performs an implicit double step using the values contained in the lower right hand side\nof the submatrix for the estimated eigenvector values.\n@param x1\n@param x2", "Base64 encodes a byte array.\n\n@param bytes Bytes to encode.\n@return Encoded string.\n@throws IllegalArgumentException if {@code bytes} is null or exceeds 3/4ths of {@code\nInteger.MAX_VALUE}.", "Forceful cleanup the logs", "Counts additional occurrences of a property as the main property of\nstatements.\n\n@param usageStatistics\nstatistics object where count is stored\n@param property\nthe property to count\n@param count\nthe number of times to count the property" ]
public static String serialize(final Object obj) throws IOException { final ObjectMapper mapper = new ObjectMapper(); mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS); return mapper.writeValueAsString(obj); }
[ "Serialize an object with Json\n@param obj Object\n@return String\n@throws IOException" ]
[ "Obtains a local date in Julian calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Julian era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Julian local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code JulianEra}", "Populate the constraint type and constraint date.\nNote that Merlin allows both start and end constraints simultaneously.\nAs we can't have both, we'll prefer the start constraint.\n\n@param row task data from database\n@param task Task instance", "Gets the default configuration for Freemarker within Windup.", "Use this API to fetch statistics of cmppolicy_stats resource of given name .", "Get the pickers date.", "This method returns the length of overlapping time between two time\nranges.\n\n@param start1 start of first range\n@param end1 end of first range\n@param start2 start start of second range\n@param end2 end of second range\n@return overlapping time in milliseconds", "Register the given Converter objects with the given target ConverterRegistry.\n@param converters the converter objects: implementing {@link Converter},\n{@link ConverterFactory}, or {@link GenericConverter}\n@param registry the target registry", "Adds a basic LHS OPERATOR RHS block.\n\n@param list parent criteria list\n@param block current block", "Use this API to update sslparameter." ]
private void processCalendarHours(ProjectCalendar calendar, Row row, int dayIndex) { Day day = Day.getInstance(dayIndex); boolean working = row.getInt("CD_WORKING") != 0; calendar.setWorkingDay(day, working); if (working == true) { ProjectCalendarHours hours = calendar.addCalendarHours(day); Date start = row.getDate("CD_FROM_TIME1"); Date end = row.getDate("CD_TO_TIME1"); if (start != null && end != null) { hours.addRange(new DateRange(start, end)); } start = row.getDate("CD_FROM_TIME2"); end = row.getDate("CD_TO_TIME2"); if (start != null && end != null) { hours.addRange(new DateRange(start, end)); } start = row.getDate("CD_FROM_TIME3"); end = row.getDate("CD_TO_TIME3"); if (start != null && end != null) { hours.addRange(new DateRange(start, end)); } start = row.getDate("CD_FROM_TIME4"); end = row.getDate("CD_TO_TIME4"); if (start != null && end != null) { hours.addRange(new DateRange(start, end)); } start = row.getDate("CD_FROM_TIME5"); end = row.getDate("CD_TO_TIME5"); if (start != null && end != null) { hours.addRange(new DateRange(start, end)); } } }
[ "Process calendar hours.\n\n@param calendar parent calendar\n@param row calendar hours data\n@param dayIndex day index" ]
[ "Use this API to fetch all the appfwwsdl resources that are configured on netscaler.", "get bearer token returned by IAM in JSON format", "Informs this sequence model that the value of the element at position pos has changed.\nThis allows this sequence model to update its internal model if desired.", "Sets the body of this request to a given JSON string.\n@param body the JSON string to use as the body.", "Use this API to fetch auditnslogpolicy_vpnvserver_binding resources of given name .", "Returns status help message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String", "Execute a HTTP request and handle common error cases.\n\n@param connection the HttpConnection request to execute\n@return the executed HttpConnection\n@throws CouchDbException for HTTP error codes or if an IOException was thrown", "Return the numeric distance value in degrees.\n\n@return the degrees", "Invokes a JavaScript function that takes no arguments.\n\n@param <T>\n@param function The function to invoke\n@param returnType The type of object to return\n@return The result of the function." ]
public List<Action> getRootActions() { final List<Action> rootActions = srcUpdTrees.stream().map(t -> originalActionsSrc.get(t)) .collect(Collectors.toList()); rootActions.addAll(srcDelTrees.stream() // .filter(t -> !srcDelTrees.contains(t.getParent()) && !srcUpdTrees.contains(t.getParent())) // .map(t -> originalActionsSrc.get(t)) // .collect(Collectors.toList())); rootActions.addAll(dstAddTrees.stream() // .filter(t -> !dstAddTrees.contains(t.getParent()) && !dstUpdTrees.contains(t.getParent())) // .map(t -> originalActionsDst.get(t)) // .collect(Collectors.toList())); rootActions.addAll(dstMvTrees.stream() // .filter(t -> !dstMvTrees.contains(t.getParent())) // .map(t -> originalActionsDst.get(t)) // .collect(Collectors.toList())); rootActions.removeAll(Collections.singleton(null)); return rootActions; }
[ "This method retrieves ONLY the ROOT actions" ]
[ "Copy the contents of this buffer to the destination LBuffer\n@param srcOffset\n@param dest\n@param destOffset\n@param size", "very big duct tape", "Use this API to fetch aaagroup_authorizationpolicy_binding resources of given name .", "Parses the query facet configurations.\n@param rangeFacetObject The JSON sub-node with the query facet configurations.\n@return The query facet configurations.", "helper method to activate or deactivate a specific flag\n\n@param bits\n@param on", "Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under", "Get the bone index for the given scene object.\n\n@param bone GVRSceneObject bone to search for\n@return bone index or -1 for root bone.\n@see #getParentBoneIndex", "Added in Gerrit 2.11.", "Controls whether we report that we are playing. This will only have an impact when we are sending status and\nbeat packets.\n\n@param playing {@code true} if we should seem to be playing" ]
public static base_responses update(nitro_service client, dbdbprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dbdbprofile updateresources[] = new dbdbprofile[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new dbdbprofile(); updateresources[i].name = resources[i].name; updateresources[i].interpretquery = resources[i].interpretquery; updateresources[i].stickiness = resources[i].stickiness; updateresources[i].kcdaccount = resources[i].kcdaccount; updateresources[i].conmultiplex = resources[i].conmultiplex; } result = update_bulk_request(client, updateresources); } return result; }
[ "Use this API to update dbdbprofile resources." ]
[ "Obtains a Julian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Returns an identity matrix", "Queries a Search Index and returns ungrouped results. In case the query\nused grouping, an empty list is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the search query as a {@code List<T> }", "Put a value if and only if the map has not changed since the given snapshot was taken. If the put fails,\nit is the caller's responsibility to retry.\n\n@param instance the instance with the map field\n@param key the key\n@param value the value\n@param snapshot the map snapshot\n@return {@code false} if the snapshot is out of date and we could not update, {@code true} if the put succeeded", "Sets the resource to which this calendar is linked. Note that this\nmethod updates the calendar's name to be the same as the resource name.\nIf the resource does not yet have a name, then the calendar is given\na default name.\n\n@param resource resource instance", "Bessel function of order n.\n\n@param n Order.\n@param x Value.\n@return J value.", "Compute the key to use.\n\n@param ref The reference number.\n@param filename The filename.\n@param extension The file extension.", "Shortcut for mapping the output of an arbitrary observable to one returning an instance of a specific type, using the IO scheduler.\n@param fromObservable the source observable\n@param toValue the value to emit to the observer\n@param <T> the type of the value to emit\n@return an observable emitting the specified value", "Create a model mbean from an object using the description given in the\nJmx annotation if present. Only operations are supported so far, no\nattributes, constructors, or notifications\n\n@param o The object to create an MBean for\n@return The ModelMBean for the given object" ]
public static int color(ColorHolder colorHolder, Context ctx) { if (colorHolder == null) { return 0; } else { return colorHolder.color(ctx); } }
[ "a small static helper class to get the color from the colorHolder\n\n@param colorHolder\n@param ctx\n@return" ]
[ "Use this API to fetch clusternodegroup_binding resource of given name .", "Establish connection to the ChromeCast device", "Removes a design document using DesignDocument object from the database.\n\n@param designDocument the design document object to be removed\n@return {@link DesignDocument}", "compute Cosh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "Pads the given String to the left with the given character to ensure that\nit's at least totalChars long.", "Returns true if required properties for FluoClient are set", "Internal method used to retrieve a integer from an\nembedded data block.\n\n@param blocks list of data blocks\n@return int value", "Utility method to register a proxy has a Service in OSGi.", "Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value" ]
private void registerColumns() { for (int i = 0; i < cols.length; i++) { DJCrosstabColumn crosstabColumn = cols[i]; JRDesignCrosstabColumnGroup ctColGroup = new JRDesignCrosstabColumnGroup(); ctColGroup.setName(crosstabColumn.getProperty().getProperty()); ctColGroup.setHeight(crosstabColumn.getHeaderHeight()); JRDesignCrosstabBucket bucket = new JRDesignCrosstabBucket(); bucket.setValueClassName(crosstabColumn.getProperty().getValueClassName()); JRDesignExpression bucketExp = ExpressionUtils.createExpression("$F{"+crosstabColumn.getProperty().getProperty()+"}", crosstabColumn.getProperty().getValueClassName()); bucket.setExpression(bucketExp); ctColGroup.setBucket(bucket); JRDesignCellContents colHeaerContent = new JRDesignCellContents(); JRDesignTextField colTitle = new JRDesignTextField(); JRDesignExpression colTitleExp = new JRDesignExpression(); colTitleExp.setValueClassName(crosstabColumn.getProperty().getValueClassName()); colTitleExp.setText("$V{"+crosstabColumn.getProperty().getProperty()+"}"); colTitle.setExpression(colTitleExp); colTitle.setWidth(crosstabColumn.getWidth()); colTitle.setHeight(crosstabColumn.getHeaderHeight()); //The height can be the sum of the heights of all the columns starting from the current one, up to the inner most one. int auxWidth = calculateRowHeaderMaxWidth(crosstabColumn); colTitle.setWidth(auxWidth); Style headerstyle = crosstabColumn.getHeaderStyle() == null ? this.djcross.getColumnHeaderStyle(): crosstabColumn.getHeaderStyle(); if (headerstyle != null){ layoutManager.applyStyleToElement(headerstyle,colTitle); colHeaerContent.setBackcolor(headerstyle.getBackgroundColor()); } colHeaerContent.addElement(colTitle); colHeaerContent.setMode( ModeEnum.OPAQUE ); boolean fullBorder = i <= 0; //Only outer most will have full border applyCellBorder(colHeaerContent, fullBorder, false); ctColGroup.setHeader(colHeaerContent); if (crosstabColumn.isShowTotals()) createColumTotalHeader(ctColGroup,crosstabColumn,fullBorder); try { jrcross.addColumnGroup(ctColGroup); } catch (JRException e) { log.error(e.getMessage(),e); } } }
[ "Registers the Columngroup Buckets and creates the header cell for the columns" ]
[ "A convenience method for creating an immutable sorted map.\n\n@param self a SortedMap\n@return an immutable SortedMap\n@see java.util.Collections#unmodifiableSortedMap(java.util.SortedMap)\n@since 1.0", "Add an individual class to the map file.\n\n@param loader jar file class loader\n@param jarEntry jar file entry\n@param writer XML stream writer\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException", "Read all task relationships from a GanttProject.\n\n@param gpProject GanttProject project", "Non-blocking call\n\n@param key\n@param value\n@return", "Specify the address of the SOCKS proxy the connection should\nuse.\n\n<p>Read the <a href=\"http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html\">\nJava Networking and Proxies</a> guide to understand the\nproxies complexity.\n\n<p>Be aware that this method only handles SOCKS proxies, not\nHTTPS proxies. Use {@link #withProxy(Proxy)} instead.\n\n@param host the hostname of the SOCKS proxy\n@param port the port of the SOCKS proxy server\n@return this", "Adds each forbidden substring, checking that it's not null.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif a forbidden substring is null", "Call the appropriate handler for handling the httprequest. 404 if path is not found. 405 if path is found but\nhttpMethod does not match what's configured.\n\n@param request instance of {@code HttpRequest}\n@param responder instance of {@code HttpResponder} to handle the request.", "create a broker with given broker info\n\n@param id broker id\n@param brokerInfoString broker info format: <b>creatorId:host:port:autocreated</b>\n@return broker instance with connection config\n@see #getZKString()", "Get the list of build numbers that are to be kept forever." ]
public List<Gallery> getList(String userId, int perPage, int page) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_LIST); parameters.put("user_id", userId); if (perPage > 0) { parameters.put("per_page", String.valueOf(perPage)); } if (page > 0) { parameters.put("page", String.valueOf(page)); } Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element element = response.getPayload(); GalleryList<Gallery> galleries = new GalleryList<Gallery>(); galleries.setPage(element.getAttribute("page")); galleries.setPages(element.getAttribute("pages")); galleries.setPerPage(element.getAttribute("per_page")); galleries.setTotal(element.getAttribute("total")); NodeList galleryNodes = element.getElementsByTagName("gallery"); for (int i = 0; i < galleryNodes.getLength(); i++) { Element galleryElement = (Element) galleryNodes.item(i); Gallery gallery = new Gallery(); gallery.setId(galleryElement.getAttribute("id")); gallery.setUrl(galleryElement.getAttribute("url")); User owner = new User(); owner.setId(galleryElement.getAttribute("owner")); gallery.setOwner(owner); gallery.setCreateDate(galleryElement.getAttribute("date_create")); gallery.setUpdateDate(galleryElement.getAttribute("date_update")); gallery.setPrimaryPhotoId(galleryElement.getAttribute("primary_photo_id")); gallery.setPrimaryPhotoServer(galleryElement.getAttribute("primary_photo_server")); gallery.setPrimaryPhotoFarm(galleryElement.getAttribute("primary_photo_farm")); gallery.setPrimaryPhotoSecret(galleryElement.getAttribute("primary_photo_secret")); gallery.setPhotoCount(galleryElement.getAttribute("count_photos")); gallery.setVideoCount(galleryElement.getAttribute("count_videos")); galleries.add(gallery); } return galleries; }
[ "Return the list of galleries created by a user. Sorted from newest to oldest.\n\n@param userId\nThe user you want to check for\n@param perPage\nNumber of galleries per page\n@param page\nThe page number\n@return gallery\n@throws FlickrException\n\n@see <a hrerf=\"http://www.flickr.com/services/api/flickr.galleries.getList.html\">flickr.galleries.getList</a>" ]
[ "Merges this with the list of sections to produce the smallest array of sequential block subnets, going from smallest to largest\n\n@param sections the sections to merge with this\n@return", "Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to return the given interface or an implementation\nof it.\n@param method the target method to check the return type of\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved parameter type of the method return type, or {@code null}\nif not resolvable or if the single argument is of type {@link WildcardType}.", "Updates the polling state from a DELETE or POST operation.\n\n@param response the response from Retrofit REST call\n@throws IOException thrown by deserialization", "Processes one dump file with the given dump file processor, handling\nexceptions appropriately.\n\n@param dumpFile\nthe dump file to process\n@param dumpFileProcessor\nthe dump file processor to use", "Store a comment based on comment text, gavc and user information\n\n@param gavc - entity id\n@param commentText - comment text\n@param credential - user credentials\n@param entityType - type of the entity", "Set the individual dates where the event should take place.\n@param dates the dates to set.", "Clears out the statement handles.\n@param internalClose if true, close the inner statement handle too.", "Creates a sort configuration iff at least one of the parameters is not null and the options list is not empty.\n@param sortParam The request parameter used to send the currently chosen search option.\n@param options The available sort options.\n@param defaultOption The default sort option.\n@return the sort configuration or null, depending on the arguments.", "Select calendar data from the database.\n\n@throws SQLException" ]
public synchronized void start() throws Exception { if (state == State.RUNNING) { LOG.debug("Ignore start() call on HTTP service {} since it has already been started.", serviceName); return; } if (state != State.NOT_STARTED) { if (state == State.STOPPED) { throw new IllegalStateException("Cannot start the HTTP service " + serviceName + " again since it has been stopped"); } throw new IllegalStateException("Cannot start the HTTP service " + serviceName + " because it was failed earlier"); } try { LOG.info("Starting HTTP Service {} at address {}", serviceName, bindAddress); channelGroup = new DefaultChannelGroup(ImmediateEventExecutor.INSTANCE); resourceHandler.init(handlerContext); eventExecutorGroup = createEventExecutorGroup(execThreadPoolSize); bootstrap = createBootstrap(channelGroup); Channel serverChannel = bootstrap.bind(bindAddress).sync().channel(); channelGroup.add(serverChannel); bindAddress = (InetSocketAddress) serverChannel.localAddress(); LOG.debug("Started HTTP Service {} at address {}", serviceName, bindAddress); state = State.RUNNING; } catch (Throwable t) { // Release resources if there is any failure channelGroup.close().awaitUninterruptibly(); try { if (bootstrap != null) { shutdownExecutorGroups(0, 5, TimeUnit.SECONDS, bootstrap.config().group(), bootstrap.config().childGroup(), eventExecutorGroup); } else { shutdownExecutorGroups(0, 5, TimeUnit.SECONDS, eventExecutorGroup); } } catch (Throwable t2) { t.addSuppressed(t2); } state = State.FAILED; throw t; } }
[ "Starts the HTTP service.\n\n@throws Exception if the service failed to started" ]
[ "A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field.\n\nReturns an empty data record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object", "Curries a function that takes three arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes two arguments. Never <code>null</code>.", "Remove a child view of Android hierarchy view .\n\n@param view View to be removed.", "Removes metadata related to rebalancing.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeIds Node ids to clear metadata after rebalancing", "Stops the background data synchronization thread.", "Restore backup data\n\n@param fileData - json file with restore data\n@return\n@throws Exception", "Applies the &gt; operator to each element in A. Results are stored in a boolean matrix.\n\n@param A Input matrx\n@param value value each element is compared against\n@param output (Optional) Storage for results. Can be null. Is reshaped.\n@return Boolean matrix with results", "Computes the d and H parameters.\n\nd = J'*(f(x)-y) <--- that's also the gradient\nH = J'*J", "Find the path.\n\n@param start key of first node in the path\n@param end key of last node in the path\n@return string containing the nodes keys in the path separated by arrow symbol" ]
public Dataset<String, String> getDataset(Dataset<String, String> oldData, Index<String> goodFeatures) { //public Dataset getDataset(List data, Collection goodFeatures) { //makeAnswerArraysAndTagIndex(data); int[][] oldDataArray = oldData.getDataArray(); int[] oldLabelArray = oldData.getLabelsArray(); Index<String> oldFeatureIndex = oldData.featureIndex; int[] oldToNewFeatureMap = new int[oldFeatureIndex.size()]; int[][] newDataArray = new int[oldDataArray.length][]; System.err.print("Building reduced dataset..."); int size = oldFeatureIndex.size(); int max = 0; for (int i = 0; i < size; i++) { oldToNewFeatureMap[i] = goodFeatures.indexOf(oldFeatureIndex.get(i)); if (oldToNewFeatureMap[i] > max) { max = oldToNewFeatureMap[i]; } } for (int i = 0; i < oldDataArray.length; i++) { int[] data = oldDataArray[i]; size = 0; for (int j = 0; j < data.length; j++) { if (oldToNewFeatureMap[data[j]] > 0) { size++; } } int[] newData = new int[size]; int index = 0; for (int j = 0; j < data.length; j++) { int f = oldToNewFeatureMap[data[j]]; if (f > 0) { newData[index++] = f; } } newDataArray[i] = newData; } Dataset<String, String> train = new Dataset<String, String>(oldData.labelIndex, oldLabelArray, goodFeatures, newDataArray, newDataArray.length); System.err.println("done."); if (flags.featThreshFile != null) { System.err.println("applying thresholds..."); List<Pair<Pattern,Integer>> thresh = getThresholds(flags.featThreshFile); train.applyFeatureCountThreshold(thresh); } else if (flags.featureThreshold > 1) { System.err.println("Removing Features with counts < " + flags.featureThreshold); train.applyFeatureCountThreshold(flags.featureThreshold); } train.summaryStatistics(); return train; }
[ "Build a Dataset from some data.\n\n@param oldData This {@link Dataset} represents data for which we which to\nsome features, specifically those features not in the {@link edu.stanford.nlp.util.Index}\ngoodFeatures.\n@param goodFeatures An {@link edu.stanford.nlp.util.Index} of features we wish to retain.\n@return A new {@link Dataset} wheres each datapoint contains only features\nwhich were in goodFeatures." ]
[ "Get a loader that lists the files in the current path,\nand monitors changes.", "Checks if a property's type is valid to be included in the report.\n@param _property the property.\n@return true if the property is is of a valid type.", "Log a byte array as a hex dump.\n\n@param data byte array", "Joins the given iterable objects using the given separator into a single string.\n\n@return the joined string or an empty string if iterable is null", "Converts a byte array to a hexadecimal string representation\n@param bb the byte array to convert\n@return string the string representation", "ensures that the first invocation of a date seeking\nrule is captured", "This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments.", "Search for photos which match the given search parameters.\n\n@param params\nThe search parameters\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return A PhotoList\n@throws FlickrException", "Loads a PDF document and creates a DOM tree from it.\n@param doc the source document\n@return a DOM Document representing the DOM tree\n@throws IOException" ]
public static long readBytes(byte[] bytes, int offset, int numBytes) { int shift = 0; long value = 0; for(int i = offset + numBytes - 1; i >= offset; i--) { value |= (bytes[i] & 0xFFL) << shift; shift += 8; } return value; }
[ "Read the given number of bytes into a long\n\n@param bytes The byte array to read from\n@param offset The offset at which to begin reading\n@param numBytes The number of bytes to read\n@return The long value read" ]
[ "Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String", "Returns the value of the matrix at the specified index of the 1D row major array.\n\n@see DMatrixRMaj#get(int)\n\n@param index The element's index whose value is to be returned\n@return The value of the specified element.", "Bulk delete clients from a profile.\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return returns the table of the remaining clients or an exception if deletion failed for some reason\n@throws Exception", "returns an array containing values for all the Objects attribute\n@throws PersistenceBrokerException if there is an erros accessing obj field values", "Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a few nodes to be identified\n(random # btw 2-5?) and then \"swapped\" (shuffled? rotated?).\n\n@return modified cluster metadata.", "Trade the request token for an access token, this is step three of authorization.\n@param oAuthRequestToken\nthis is the token returned by the {@link AuthInterface#getRequestToken} call.\n@param verifier", "Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param text the text of the item to be added\n@param reload perform a 'material select' reload to update the DOM.", "package for testing purpose", "Parse a list of Photos from given Element.\n\n@param photosElement\n@return PhotoList" ]
public static base_responses unset(nitro_service client, onlinkipv6prefix resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { onlinkipv6prefix unsetresources[] = new onlinkipv6prefix[resources.length]; for (int i=0;i<resources.length;i++){ unsetresources[i] = new onlinkipv6prefix(); unsetresources[i].ipv6prefix = resources[i].ipv6prefix; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "Use this API to unset the properties of onlinkipv6prefix resources.\nProperties that need to be unset are specified in args array." ]
[ "Checks if the given project exists or not.\n\n@param name project name\n@return true/false\n@throws IllegalArgumentException", "Reads characters until any 'end' character is encountered, ignoring\nescape sequences.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found.", "Sets the specified double attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Specify the artifact configuration to be searched for\n@param artifact configured artifact object\n@return", "This method is called to format a constraint type.\n\n@param type constraint type\n@return formatted constraint type", "20130512 Converts the sdsm string generated above to Date format.\n\n@param str\nthe str\n@return the date from concise str", "Picks out a File from `thriftFiles` corresponding to a given artifact ID\nand file name. Returns null if `artifactId` and `fileName` do not map to a\nthrift file path.\n\n@parameter artifactId The artifact ID of which to look up the path\n@parameter fileName the name of the thrift file for which to extract a path\n@parameter thriftFiles The set of Thrift files in which to lookup the\nartifact ID.\n@return The path of the directory containing Thrift files for the given\nartifact ID. null if artifact ID not found.", "Return the next word of the string, in other words it stops when a space is encountered.", "This method retrieves an integer of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required integer data" ]
public DbOrganization getOrganization(final String organizationId) { final DbOrganization dbOrganization = repositoryHandler.getOrganization(organizationId); if(dbOrganization == null){ throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND) .entity("Organization " + organizationId + " does not exist.").build()); } return dbOrganization; }
[ "Returns an Organization\n\n@param organizationId String\n@return DbOrganization" ]
[ "Returns the raw class of the given type.", "Removes a design document using DesignDocument object from the database.\n\n@param designDocument the design document object to be removed\n@return {@link DesignDocument}", "Creates the string mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param position\nthe position\n@throws IOException\nSignals that an I/O exception has occurred.", "Runs Crawljax with the given configuration.\n\n@return The {@link CrawlSession} once the Crawl is done.", "Create a HttpComponents HttpUriRequest object for the given HTTP method and URI specification.\n\n@param httpMethod the HTTP method\n@param uri the URI\n@return the HttpComponents HttpUriRequest object", "Use this API to add sslocspresponder.", "Creates custom Http Client connection pool to be used by Http Client\n\n@return {@link PoolingHttpClientConnectionManager}", "Update the anchor based on arcore best knowledge of the world\n\n@param scale", "Converts the given string to a clob object\n\n@param stringName string name to clob\n@param sqlConnection Connection object\n@return Clob object or NULL" ]
@Override public Trajectory subList(int fromIndex, int toIndex) { Trajectory t = new Trajectory(dimension); for(int i = fromIndex; i < toIndex; i++){ t.add(this.get(i)); } return t; }
[ "Generates a sub-trajectory" ]
[ "Binds the Identities Primary key values to the statement.", "Start a server.\n\n@return the http server\n@throws Exception the exception", "Returns the index of the segment containing the first byte outside the network prefix.\nWhen networkPrefixLength is null, or it matches or exceeds the bit length, returns the segment count.\n\n@param networkPrefixLength\n@param byteLength\n@return", "Expensive. Creates the plan for the specific settings.", "Return the regression basis functions.\n\n@param exerciseDate The date w.r.t. which the basis functions should be measurable.\n@param model The model.\n@return Array of random variables.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Pull docker image using the docker java client.\n\n@param imageTag\n@param username\n@param password\n@param host", "This snapshot is meant to be used when updating data.", "Add the list with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The list of all bundles to add.", "Adds one or several attributes to facet on for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining." ]
public Optional<URL> getServiceUrl() { Optional<Service> optionalService = client.services().inNamespace(namespace) .list().getItems() .stream() .findFirst(); return optionalService .map(this::createUrlForService) .orElse(Optional.empty()); }
[ "Gets the URL of the first service that have been created during the current session.\n\n@return URL of the first service." ]
[ "A specific, existing task can be deleted by making a DELETE request on the\nURL for that task. Deleted tasks go into the \"trash\" of the user making\nthe delete request. Tasks can be recovered from the trash within a period\nof 30 days; afterward they are completely removed from the system.\n\nReturns an empty data record.\n\n@param task The task to delete.\n@return Request object", "Returns the root path for this source file, based upon the package name.\n\nFor example, if path is \"/project/src/main/java/org/example/Foo.java\" and the package is \"org.example\", then this\nshould return \"/project/src/main/java\".\n\nReturns null if the folder structure does not match the package name.", "Use this API to add sslocspresponder.", "Initializes class data structures and parameters", "Use this API to update vlan.", "other static handlers", "Creates the .story file necessary for every Beast Test Case.\n\n@param scenarioName\n- The name of the scenario, with spaces\n@param srcTestRootFolder\n- The test root folder\n@param packagePath\n- The package of the BeastTestCase\n@param scenarioDescription\n- the scenario name\n@param givenDescription\n- The given description\n@param whenDescription\n- The when description\n@param thenDescription\n- The then description\n@throws BeastException", "Renumbers all entity unique IDs.", "Use this API to fetch service_dospolicy_binding resources of given name ." ]
protected void concatenateReports() { if (!concatenatedReports.isEmpty()) { // dummy group for page break if needed DJGroup globalGroup = createDummyGroup(); report.getColumnsGroups().add(0, globalGroup); } for (Subreport subreport : concatenatedReports) { DJGroup globalGroup = createDummyGroup(); globalGroup.getFooterSubreports().add(subreport); report.getColumnsGroups().add(0, globalGroup); } }
[ "Create dummy groups for each concatenated report, and in the footer of\neach group adds the subreport." ]
[ "Seeks to the given season within the given year\n\n@param seasonString\n@param yearString", "Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\nThe outIdentifier can be null.\nThe entryPoint, which can also be null, specifies the entrypoint the object is inserted into.\n\n@param object\n@param outIdentifier\n@param entryPoint\n@return", "Starts the scenario with the given method and arguments.\nDerives the description from the method name.\n@param method the method that started the scenario\n@param arguments the test arguments with their parameter names", "Removes a tag from the resource.\n@param key the key of the tag to remove\n@return the next stage of the definition/update", "Updates the schema of an existing metadata template.\n\n@param api the API connection to be used\n@param scope the scope of the object\n@param template Unique identifier of the template\n@param fieldOperations the fields that needs to be updated / added in the template\n@return the updated metadata template", "Check whether the given is is matched by one of the include expressions.\n\n@param id id to check\n@param includes list of include regular expressions\n@return true when id is included", "The ID field contains the identifier number that Microsoft Project\nautomatically assigns to each task as you add it to the project.\nThe ID indicates the position of a task with respect to the other tasks.\n\n@param val ID", "Returns a diagonal matrix with the specified diagonal elements.\n@param values values of diagonal elements\n@return A diagonal matrix", "Close it and ignore any exceptions." ]
public void set( T a ) { if( a.getType() == getType() ) mat.set(a.getMatrix()); else { setMatrix(a.mat.copy()); } }
[ "Sets the elements in this matrix to be equal to the elements in the passed in matrix.\nBoth matrix must have the same dimension.\n\n@param a The matrix whose value this matrix is being set to." ]
[ "Gets Widget layout dimension\n@param axis The {@linkplain Layout.Axis axis} to obtain layout size for\n@return dimension", "Gets the index input list.\n\n@return the index input list", "Stops all servers.\n\n{@inheritDoc}", "Create a SVG graphic with the give dimensions.\n\n@param size The size of the SVG graphic.", "Computes the null space using QR decomposition. This is much faster than using SVD\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space", "Calculate entropy value.\n@param values Values.\n@return Returns entropy value of the specified histogram array.", "Computes the final list of versions to be stored, on top of what is\ncurrently being stored. Final list is valuesInStorage modified in place\n\n\n@param valuesInStorage list of versions currently in storage\n@param multiPutValues list of new versions being written to storage\n@return list of versions from multiPutVals that were rejected as obsolete", "Dump an array of bytes in hexadecimal.\n\n@param displayOffset the display offset (left column)\n@param data the byte array of data\n@param offset the offset to start dumping in the byte array\n@param len the length of data to dump\n@return the dump string", "Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the lowest to the highest score.\nLexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from\nthe end of the sorted set, with -1 being the last element of the sorted set.\n@param start\n@param end\n@return the range of elements" ]
public boolean canBeLinked(D declaration, ServiceReference<S> declarationBinderRef) { // Evaluate the target filter of the ImporterService on the Declaration Filter filter = bindersManager.getTargetFilter(declarationBinderRef); return filter.matches(declaration.getMetadata()); }
[ "Return true if the Declaration can be linked to the ImporterService.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference<ImporterService> of the ImporterService\n@return true if the Declaration can be linked to the ImporterService" ]
[ "Return a product descriptor for a specific strike.\n\n@param referenceDate The reference date (translating the maturity floating point date to dates.\n@param index The index corresponding to the strike grid.\n@return a product descriptor for a specific strike.\n@throws ArrayIndexOutOfBoundsException Thrown if index is out of bound.", "Formats an IPTC string for this reference using information obtained from\nSubject Reference System.\n\n@param srs\nreference subject reference system\n@return IPTC formatted reference", "Computes the null space using SVD. Slowest bust most stable way to find the solution\n\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space", "Add an executable \"post-run\" dependent for this model.\n\n@param executable the executable \"post-run\" dependent\n@return the key to be used as parameter to taskResult(string) method to retrieve result of executing\nthe executable \"post-run\" dependent", "Clones the cluster by constructing a new one with same name, partition\nlayout, and nodes.\n\n@param cluster\n@return clone of Cluster cluster.", "Returns the \"short rate\" from timeIndex to timeIndex+1.\n\n@param timeIndex The time index (corresponding to {@link getTime()).\n@return The \"short rate\" from timeIndex to timeIndex+1.\n@throws CalculationException Thrown if simulation failed.", "Use this API to fetch filtered set of authenticationradiusaction resources.\nset the filter parameter values in filtervalue object.", "See if a simple sequence can be used to extract the array. A simple extent is a continuous block from\na min to max index\n\n@return true if it is a simple range or false if not", "This method takes the textual version of an accrue type name\nand populates the class instance appropriately. Note that unrecognised\nvalues are treated as \"Prorated\".\n\n@param type text version of the accrue type\n@param locale target locale\n@return AccrueType class instance" ]
public BoxFile.Info getFileInfo(String fileID) { URL url = FILE_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), fileID); BoxAPIRequest request = new BoxAPIRequest(this.api, url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject jsonObject = JsonObject.readFrom(response.getJSON()); BoxFile file = new BoxFile(this.api, jsonObject.get("id").asString()); return file.new Info(response.getJSON()); }
[ "Gets information about a trashed file.\n@param fileID the ID of the trashed file.\n@return info about the trashed file." ]
[ "Launches the client with the specified parameters.\n\n@param args\ncommand line parameters\n@throws ParseException\n@throws IOException", "Clone layer information considering what may be copied to the client.\n\n@param original layer info\n@return cloned copy including only allowed information", "Initialize all components of this URI builder with the components of the given URI.\n@param uri the URI\n@return this UriComponentsBuilder", "Reverse Engineers an XPath Expression of a given Node in the DOM.\n\n@param node the given node.\n@return string xpath expression (e.g., \"/html[1]/body[1]/div[3]\").", "If the column name is a dotted column, returns the first part.\nReturns null otherwise.\n\n@param column the column that might have a prefix\n@return the first part of the prefix of the column or {@code null} if the column does not have a prefix.", "Reads an HTML snippet with the given name.\n\n@return the HTML data", "Get the JSON representation of the metadata field filter.\n@return the JSON object representing the filter.", "Creates a Blob holding a single-sheet spreadsheet with a pivot of the domain objects. The sheet name is derived from the\nclass name.\n\n<p>\nMinimal requirements for the domain object are:\n</p>\n<ul>\n<li>\nOne property has annotation {@link PivotRow} and will be used as row identifier in left column of pivot.\nEmpty values are supported.\n</li>\n<li>\nAt least one property has annotation {@link PivotColumn}. Its values will be used in columns of pivot.\nEmpty values are supported.\n</li>\n<li>\nAt least one property has annotation {@link PivotValue}. Its values will be distributed in the pivot.\n</li>\n</ul>", "Method to close the file caseManager. It is called just one time, by the\nMASReader, once every test and stroy have been added.\n\n@param caseManager" ]
public static void closeMASCaseManager(File caseManager) { FileWriter caseManagerWriter; try { caseManagerWriter = new FileWriter(caseManager, true); caseManagerWriter.write("}\n"); caseManagerWriter.flush(); caseManagerWriter.close(); } catch (IOException e) { Logger logger = Logger .getLogger("CreateMASCaseManager.closeMASCaseManager"); logger.info("ERROR: There is a mistake closing caseManager file.\n"); } }
[ "Method to close the file caseManager. It is called just one time, by the\nMASReader, once every test and stroy have been added.\n\n@param caseManager" ]
[ "Returns the adapter position of the Child associated with this ChildViewHolder\n\n@return The adapter position of the Child if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.", "Ensures that the primary keys required by the given collection with indirection table are present in\nthe element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the fitting collection (if any) or the primary keys", "Gets whether the given server can be updated.\n\n@param server the id of the server. Cannot be <code>null</code>\n\n@return <code>true</code> if the server can be updated; <code>false</code>\nif the update should be cancelled\n\n@throws IllegalStateException if this policy is not expecting a request\nto update the given server", "If there is a SubReport on a Group, we do the layout here\n@param columnsGroup\n@param jgroup", "Adds a new point.\n\n@param point a point\n@return this for chaining", "Unregister all MBeans", "OR operation which takes 2 arguments and OR's them together.\n\n<p>\n<b>NOTE:</b> There is no guarantee of the order of the clauses that are generated in the final query.\n</p>\n<p>\n<b>NOTE:</b> I can't remove the generics code warning that can be associated with this method. You can instead\nuse the {@link #or(int)} method.\n</p>", "Get content for URL only\n\n@param stringUrl URL to get content\n@return the content\n@throws IOException I/O error happened", "End building the prepared script\n@param config the configuration for the script to build\n@return the new {@link LuaPreparedScript} instance" ]
public static DoubleMatrix cholesky(DoubleMatrix A) { DoubleMatrix result = A.dup(); int info = NativeBlas.dpotrf('U', A.rows, result.data, 0, A.rows); if (info < 0) { throw new LapackArgumentException("DPOTRF", -info); } else if (info > 0) { throw new LapackPositivityException("DPOTRF", "Minor " + info + " was negative. Matrix must be positive definite."); } clearLower(result); return result; }
[ "Compute Cholesky decomposition of A\n\n@param A symmetric, positive definite matrix (only upper half is used)\n@return upper triangular matrix U such that A = U' * U" ]
[ "Add the list with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The list of all packages to add.", "required for rest assured base URI configuration.", "Use this API to fetch authenticationradiuspolicy_authenticationvserver_binding resources of given name .", "Starting with the given column index, will return the first column index\nwhich contains a colour that does not match the given color.", "Notifies that an existing footer item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.", "Reads a markdown link ID.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link ID.", "Use this API to fetch statistics of spilloverpolicy_stats resource of given name .", "Obtains a International Fixed zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Unloads the sound file for this source, if any." ]
public final int toChars(int[] src, int srcOff, int srcLen, char[] dest, int destOff) { if (srcLen < 0) { throw new IllegalArgumentException("srcLen must be >= 0"); } int written = 0; for (int i = 0; i < srcLen; ++i) { written += Character.toChars(src[srcOff + i], dest, destOff + written); } return written; }
[ "Converts a sequence of unicode code points to a sequence of Java characters.\n\n@return the number of chars written to the destination buffer" ]
[ "Creates an internal project and repositories such as a token storage.", "Use this API to fetch tmsessionpolicy_binding resource of given name .", "Uncompresses the given textual content and writes it to the given file.\n\n@param file The file to write to\n@param compressedContent The content\n@throws IOException If an error occurred", "Convert an integer value into a TimeUnit instance.\n\n@param value time unit value\n@return TimeUnit instance", "Append Join for SQL92 Syntax", "Use this API to fetch all the gslbldnsentries resources that are configured on netscaler.", "It's enough to just set the disabled attribute on the\nelement, but we want to also add a \"disabled\" class so that we can\nstyle it.\n\nAt some point we'll just be able to use .button:disabled,\nbut that doesn't work in IE8-", "Use this API to create sslfipskey.", "This solution is based on an absolute path" ]
public static Logger getLogger(String className) { if (logType == null) { logType = findLogType(); } return new Logger(logType.createLog(className)); }
[ "Return a logger associated with a particular class name." ]
[ "Checks the available space and sets max-height to the details field-set.", "Return true if the AST expression has not already been visited. If it is\nthe first visit, register the expression so that the next visit will return false.\n\n@param expression - the AST expression to check\n@return true if the AST expression has NOT already been visited", "Evaluates the body if value for the member tag equals the specified value.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\[email protected] name=\"paramNum\" description=\"The zero-based parameter number. It's used if the user\nused the space-separated format for specifying parameters.\"\[email protected] name=\"value\" optional=\"false\" description=\"The expected value.\"", "Check if position is in inner circle\n\n@param x x position\n@param y y position\n@return true if in inner circle, false otherwise", "Returns a fine-grained word shape classifier, that equivalence classes\nlower and upper case and digits, and collapses sequences of the\nsame type, but keeps all punctuation. This adds an extra recognizer\nfor a greek letter embedded in the String, which is useful for bio.", "Whether the given value generation strategy requires to read the value from the database or not.", "Initializes the alarm sensor command class. Requests the supported alarm types.", "Set the main attribute \"Bundle-Activator\" to the given value.\n\n@param bundleActivator The new value", "Send a waveform preview update announcement to all registered listeners.\n\n@param player the player whose waveform preview has changed\n@param preview the new waveform preview, if any" ]
public ClassDescriptor getSuperClassDescriptor() { if (!m_superCldSet) { if(getBaseClass() != null) { m_superCld = getRepository().getDescriptorFor(getBaseClass()); if(m_superCld.isAbstract() || m_superCld.isInterface()) { throw new MetadataException("Super class mapping only work for real class, but declared super class" + " is an interface or is abstract. Declared class: " + m_superCld.getClassNameOfObject()); } } m_superCldSet = true; } return m_superCld; }
[ "Answers the ClassDescriptor referenced by 'super' ReferenceDescriptor.\n@return ClassDescriptor or null" ]
[ "Sets the maximum time to wait before a call to getConnection is timed out.\n\nSetting this to zero is similar to setting it to Long.MAX_VALUE\n\n@param connectionTimeout\n@param timeUnit the unit of the connectionTimeout argument", "Removes a tag from the resource.\n@param key the key of the tag to remove\n@return the next stage of the definition/update", "Overridden method always creating a new instance\n\n@param contextual The bean to create\n@param creationalContext The creation context", "Guess the type of the given dump from its filename.\n\n@param fileName\n@return dump type, defaulting to JSON if no type was found", "Calculate a threshold.\n\n@param x first string.\n@param y second string.\n@param p the threshold coefficient.\n@return 2 maxLength(x, y) (1-p)", "Returns iterable with all folder assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all folder assignments.", "Recovers the state of synchronization for a namespace in case a system failure happened.\nThe goal is to revert the namespace to a known, good state. This method itself is resilient\nto failures, since it doesn't delete any documents from the undo collection until the\ncollection is in the desired state with respect to those documents.", "Sets the drawable used as the drawer indicator.\n\n@param drawable The drawable used as the drawer indicator.", "Facade method for operating the Shell.\n\nRun the obtained Shell with commandLoop().\n\n@see org.gearvrf.debug.cli.Shell#Shell(org.gearvrf.debug.cli.Shell.Settings, org.gearvrf.debug.cli.CommandTable, java.util.List)\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Command handler\n@return Shell that can be either further customized or run directly by calling commandLoop()." ]
public void translateRectangle(Rectangle rect, float dx, float dy) { float width = rect.getWidth(); float height = rect.getHeight(); rect.setLeft(rect.getLeft() + dx); rect.setBottom(rect.getBottom() + dy); rect.setRight(rect.getLeft() + dx + width); rect.setTop(rect.getBottom() + dy + height); }
[ "Translate this rectangle over the specified following distances.\n\n@param rect rectangle to move\n@param dx delta x\n@param dy delta y" ]
[ "This method performs database modification at the very and of transaction.", "Add the string representation of the given object to this sequence immediately. That is, all the trailing\nwhitespace of this sequence will be ignored and the string is appended directly after the last segment that\ncontains something besides whitespace. The given indentation will be prepended to each line except the first one\nif the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.", "create logs with given partition number\n\n@param topic the topic name\n@param partitions partition number\n@param forceEnlarge enlarge the partition number of log if smaller than runtime\n@return the partition number of the log after enlarging", "Retrieve and validate the timestamp value from the REST request.\n\"X_VOLD_REQUEST_ORIGIN_TIME_MS\" is timestamp header\n\nTODO REST-Server 1. Change Time stamp header to a better name.\n\n@return true if present, false if missing", "Updates the text style according to a new text position\n@param bstyle the style to be updated\n@param text the text position", "Start the drag operation of a scene object with a rigid body.\n\n@param sceneObject Scene object with a rigid body attached to it.\n@param hitX rel position in x-axis.\n@param hitY rel position in y-axis.\n@param hitZ rel position in z-axis.\n@return true if success, otherwise returns false.", "Get an extent aware Iterator based on the Query\n\n@param query\n@param cld the ClassDescriptor\n@return OJBIterator", "Ensures that no more than maxContiguousPartitionsPerZone partitions are\ncontiguous within a single zone.\n\nMoves the necessary partitions to break up contiguous runs from each zone\nto some other random zone/node. There is some chance that such random\nmoves could result in contiguous partitions in other zones.\n\n@param nextCandidateCluster cluster metadata\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return Return updated cluster metadata.", "Cause the container to be cleaned up, including all registered bean\nmanagers, and all deployment services" ]
public static void forceDelete(final Path path) throws IOException { if (!java.nio.file.Files.isDirectory(path)) { java.nio.file.Files.delete(path); } else { java.nio.file.Files.walkFileTree(path, DeleteDirVisitor.getInstance()); } }
[ "Deletes a path from the filesystem\n\nIf the path is a directory its contents\nwill be recursively deleted before it itself\nis deleted.\n\nNote that removal of a directory is not an atomic-operation\nand so if an error occurs during removal, some of the directories\ndescendants may have already been removed\n\n@throws IOException if an error occurs whilst removing a file or directory" ]
[ "Returns a list of your geo-tagged photos.\n\nThis method requires authentication with 'read' permission.\n\n@param minUploadDate\nMinimum upload date. Photos with an upload date greater than or equal to this value will be returned. Set to null to not specify a date.\n@param maxUploadDate\nMaximum upload date. Photos with an upload date less than or equal to this value will be returned. Set to null to not specify a date.\n@param minTakenDate\nMinimum taken date. Photos with an taken date greater than or equal to this value will be returned. Set to null to not specify a date.\n@param maxTakenDate\nMaximum taken date. Photos with an taken date less than or equal to this value will be returned. Set to null to not specify a date.\n@param privacyFilter\nReturn photos only matching a certain privacy level. Valid values are:\n<ul>\n<li>1 public photos</li>\n<li>2 private photos visible to friends</li>\n<li>3 private photos visible to family</li>\n<li>4 private photos visible to friends & family</li>\n<li>5 completely private photos</li>\n</ul>\nSet to 0 to not specify a privacy Filter.\n\n@see com.flickr4java.flickr.photos.Extras\n@param sort\nThe order in which to sort returned photos. Deafults to date-posted-desc. The possible values are: date-posted-asc, date-posted-desc,\ndate-taken-asc, date-taken-desc, interestingness-desc, and interestingness-asc.\n@param extras\nA set of Strings controlling the extra information to fetch for each returned record. Currently supported fields are: license, date_upload,\ndate_taken, owner_name, icon_server, original_format, last_update, geo. Set to null or an empty set to not specify any extras.\n@param perPage\nNumber of photos to return per page. If this argument is 0, it defaults to 100. The maximum allowed value is 500.\n@param page\nThe page of results to return. If this argument is 0, it defaults to 1.\n@return photos\n@throws FlickrException", "Use this API to link sslcertkey resources.", "Set the color for the statusBar\n\n@param statusBarColor", "Get a list of referring domains for a photostream.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotostreamDomains.html\"", "Returns a new color that has the alpha adjusted by the\nspecified amount.", "Retrieves a specific range of items in this collection.\n@param offset the index of the first item to retrieve.\n@param limit the maximum number of items to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of items.", "Abort and close the transaction.\nCalling abort abandons all persistent object modifications and releases the\nassociated locks.\nIf transaction is not in progress a TransactionNotInProgressException is thrown", "Prints and stores final result of the processing. This should be called\nafter finishing the processing of a dump. It will print the statistics\ngathered during processing and it will write a CSV file with usage counts\nfor every property.", "Read a single resource assignment.\n\n@param resource MPXJ resource\n@param assignment Phoenix assignment" ]
public int getRegisteredResourceRequestCount(K key) { if(requestQueueMap.containsKey(key)) { Queue<AsyncResourceRequest<V>> requestQueue = getRequestQueueForExistingKey(key); // FYI: .size() is not constant time in the next call. ;) if(requestQueue != null) { return requestQueue.size(); } } return 0; }
[ "Count the number of queued resource requests for a specific pool.\n\n@param key The key\n@return The count of queued resource requests. Returns 0 if no queue\nexists for given key." ]
[ "New SOAP client uses new SOAP service.", "Throws one RendererException if the content parent or layoutInflater are null.", "send object to client and serialize it using JSON\n\n@param objectToSend the object to send\n@param cb the callback after sending the message", "Loads the file content in the properties collection\n@param filePath The path of the file to be loaded", "Sets the target hosts from json path.\n\n@param jsonPath\nthe json path\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception", "Removes a named property from the object.\n\nIf the property is not found, no action is taken.\n\n@param name the name of the property", "Use this API to unset the properties of sslservice resource.\nProperties that need to be unset are specified in args array.", "Finds trajectory by ID\n@param t List of Trajectories\n@param id ID of the trajectorie\n@return Trajectory with ID=id", "Sets the drawable used as the drawer indicator.\n\n@param drawable The drawable used as the drawer indicator." ]
public static <T> void write(BufferedWriter writer, DatabaseTableConfig<T> config) throws SQLException { try { writeConfig(writer, config); } catch (IOException e) { throw SqlExceptionUtil.create("Could not write config to writer", e); } }
[ "Write the table configuration to a buffered writer." ]
[ "Fetch the specified expression from the cache or create it if necessary.\n\n@param expressionString the expression string\n@return the expression\n@throws ParseException oops", "Checks to see within the flags if a reload, i.e. not a full restart, is required.\n\n@param flags the flags to check\n\n@return {@code true} if a reload is required, otherwise {@code false}", "Check if underlying connection was alive.", "Get the FieldDescriptors of the extent based on the FieldDescriptors of the parent.", "This procedure sets permissions to the given file to not allow everybody to read it.\n\nOnly when underlying OS allows the change.\n\n@param file File to set permissions", "Delete a record.\n\n@param referenceId the reference ID.", "Add the list with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The list of all packages to add.", "Get a property as a boolean or null.\n\n@param key the property name", "We have identified that we have an MDB file. This could be a Microsoft Project database\nor an Asta database. Open the database and use the table names present to determine\nwhich type this is.\n\n@param stream schedule data\n@return ProjectFile instance" ]
public static base_response update(nitro_service client, dbdbprofile resource) throws Exception { dbdbprofile updateresource = new dbdbprofile(); updateresource.name = resource.name; updateresource.interpretquery = resource.interpretquery; updateresource.stickiness = resource.stickiness; updateresource.kcdaccount = resource.kcdaccount; updateresource.conmultiplex = resource.conmultiplex; return updateresource.update_resource(client); }
[ "Use this API to update dbdbprofile." ]
[ "Select a List of values from a Matcher using a Collection\nto identify the indices to be selected.\n\n@param self a Matcher\n@param indices a Collection of indices\n@return a String of the values at the given indices\n@since 1.6.0", "Process a module or bundle root.\n\n@param root the root\n@param layers the processed layers\n@param setter the bundle or module path setter\n@throws IOException", "Log a warning for the given operation at the provided address for the given attributes, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param operation where which problem occurred\n@param message custom error message to append\n@param attributes attributes we that have problems about", "Process the host info and determine which configuration elements are required on the slave host.\n\n@param hostInfo the host info\n@param root the model root\n@param extensionRegistry the extension registry\n@return", "Creates updateable version of capability registry that on publish pushes all changes to main registry\nthis is used to create context local registry that only on completion commits changes to main registry\n\n@return writable registry", "object -> xml\n\n@param object\n@param childClass", "Parses a string that contains single fat client config string in avro\nformat\n\n@param configAvro Input string of avro format, that contains config for\nmultiple stores\n@return Properties of single fat client config", "Record the duration of a put operation, along with the size of the values\nreturned.", "Returns the device push token or null\n\n@param type com.clevertap.android.sdk.PushType (FCM or GCM)\n@return String device token or null\nNOTE: on initial install calling getDevicePushToken may return null, as the device token is\nnot yet available\nImplement CleverTapAPI.DevicePushTokenRefreshListener to get a callback once the token is\navailable" ]
public static void load(File file) { try(FileInputStream inputStream = new FileInputStream(file)) { LineIterator it = IOUtils.lineIterator(inputStream, "UTF-8"); while (it.hasNext()) { String line = it.next(); if (!line.startsWith("#") && !line.trim().isEmpty()) { add(line); } } } catch (Exception e) { throw new WindupException("Failed loading archive ignore patterns from [" + file.toString() + "]", e); } }
[ "Load the given configuration file." ]
[ "Add the line to the content\n\n@param bufferedFileReader The file reader\n@param content The content of the file\n@param line The current read line\n@throws IOException", "Add a text symbolizer definition to the rule.\n\n@param styleJson The old style.", "Register the entity as batch loadable, if enabled\n\nCopied from {@link org.hibernate.type.ManyToOneType#scheduleBatchLoadIfNeeded}", "Get's the user's current upload limits, User object only contains user_id\n\n@return Media Limits", "Transforms a single configuration file using the given transformation source.\n\n@param file the configuration file\n@param transformSource the transform soruce\n\n@throws TransformerConfigurationException -\n@throws IOException -\n@throws SAXException -\n@throws TransformerException -\n@throws ParserConfigurationException -", "Converts a tab delimited string into an object with given fields\nRequires the object has setXxx functions for the specified fields\n\n@param objClass Class of object to be created\n@param str string to convert\n@param delimiterRegex delimiter regular expression\n@param fieldNames fieldnames\n@param <T> type to return\n@return Object created from string", "Used to populate Map with given annotations\n\n@param annotations initial value for annotations", "Reduce the given value to the nearest smaller 1 significant digit number starting with 1, 2 or 5.\n\n@param value the value to find a nice number for.\n@param scaleUnit the unit of the value.\n@param lockUnits if set, the values are not scaled to a \"nicer\" unit.", "Registers the deployment resources needed.\n\n@param deploymentResourceSupport the deployment resource support\n@param service the service, which may be {@code null}, used to find the resource names that need to be registered" ]
public void bootstrap() throws Exception { final HostRunningModeControl runningModeControl = environment.getRunningModeControl(); final ControlledProcessState processState = new ControlledProcessState(true); shutdownHook.setControlledProcessState(processState); ServiceTarget target = serviceContainer.subTarget(); ControlledProcessStateService controlledProcessStateService = ControlledProcessStateService.addService(target, processState).getValue(); RunningStateJmx.registerMBean(controlledProcessStateService, null, runningModeControl, false); final HostControllerService hcs = new HostControllerService(environment, runningModeControl, authCode, processState); target.addService(HostControllerService.HC_SERVICE_NAME, hcs).install(); }
[ "Start the host controller services.\n\n@throws Exception" ]
[ "Get the Attribute metadata for an MBean by name.\n@return the {@link Map} of {@link String} attribute names to {@link MBeanAttributeInfo} values.", "Determines the number bytes required to store a variable length\n\n@param i length of Bytes\n@return number of bytes needed", "Returns all known Java installations\n\n@return a map from the version strings to their respective paths of the Java installations.", "Creates a real valued diagonal matrix of the specified type", "Create a discount curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@param name The name of this discount curve.\n@param times Array of times as doubles.\n@param givenDiscountFactors Array of corresponding discount factors.\n@return A new discount factor object.", "Stop finding signatures for all active players.", "Parse a filter expression.\n\n@param filter the filter expression\n@return compiled nodes", "Iterates through this file line by line, splitting each line using\nthe given regex separator. For each line, the given closure is called with\na single parameter being the list of strings computed by splitting the line\naround matches of the given regular expression.\nFinally the resources used for processing the file are closed.\n\n@param self a File\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see IOGroovyMethods#splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5", "Generate the global CSS style for the whole document.\n@return the CSS code used in the generated document header" ]
public static void endRequest() { final List<RequestScopedItem> result = CACHE.get(); if (result != null) { CACHE.remove(); for (final RequestScopedItem item : result) { item.invalidate(); } } }
[ "ends the request and clears the cache. This can be called before the request is over,\nin which case the cache will be unavailable for the rest of the request." ]
[ "If the specified value is not greater than or equal to the specified minimum and\nless than or equal to the specified maximum, adjust it so that it is.\n@param value The value to check.\n@param min The minimum permitted value.\n@param max The maximum permitted value.\n@return {@code value} if it is between the specified limits, {@code min} if the value\nis too low, or {@code max} if the value is too high.\n@since 1.2", "Get a File path list from configuration.\n\n@param name the name of the property\n@param props the set of configuration properties\n\n@return the CanonicalFile form for the given name.", "Use this API to save cacheobject.", "Checks all data sets in a given record for constraint violations.\n\n@param record\nIIM record (1,2,3, ...) to check\n\n@return list of constraint violations, empty set if IIM file is valid", "Add an event to the queue. It will be processed in the order received.\n\n@param event Event", "This method is used to automatically generate a value\nfor the WBS field of this task.\n\n@param parent Parent Task", "Read relation data.", "Get the upload parameters.\n@return", "Writes triples to determine the statements with the highest rank." ]
private void merge(Integer cid1, Integer cid2) { Collection<String> klass1 = classix.get(cid1); Collection<String> klass2 = classix.get(cid2); // if klass1 is the smaller, swap the two if (klass1.size() < klass2.size()) { Collection<String> tmp = klass2; klass2 = klass1; klass1 = tmp; Integer itmp = cid2; cid2 = cid1; cid1 = itmp; } // now perform the actual merge for (String id : klass2) { klass1.add(id); recordix.put(id, cid1); } // delete the smaller class, and we're done classix.remove(cid2); }
[ "Merges the two classes into a single class. The smaller class is\nremoved, while the largest class is kept." ]
[ "Remove a part of a CharSequence by replacing the first occurrence\nof target within self with '' and returns the result.\n\n@param self a CharSequence\n@param target an object representing the part to remove\n@return a String containing the original minus the part to be removed\n@see #minus(String, Object)\n@since 1.8.2", "Delete a license from the repository\n\n@param licName The name of the license to remove", "Returns a diagonal matrix with the specified diagonal elements.\n@param values values of diagonal elements\n@return A diagonal matrix", "Finish a state transition from a notification.\n\n@param current\n@param next", "This method is used to configure the format pattern.\n\n@param patterns new format patterns", "todo remove, here only for binary compatibility of elytron subsystem, drop once it is in.", "Use this API to update responderparam.", "Copy the given Collection into a Class array.\nThe Collection must contain Class elements only.\n@param collection the Collection to copy\n@return the Class array ({@code null} if the passed-in\nCollection was {@code null})", "Import user from file." ]
@JsonProperty("labels") @JsonInclude(Include.NON_EMPTY) public Map<String, TermImpl> getLabelUpdates() { return getMonolingualUpdatedValues(newLabels); }
[ "Label accessor provided for JSON serialization only." ]
[ "Returns a valid DisplayMetrics object\n\n@param context valid context\n@return DisplayMetrics object", "Reads Phoenix resource assignments.\n\n@param mpxjResource MPXJ resource\n@param res Phoenix resource", "Consumes the next character in the request, checking that it matches the\nexpected one. This method should be used when the", "Convert a floating point date to a LocalDate.\n\nNote: This method currently performs a rounding to the next day.\nIn a future extension intra-day time offsets may be considered.\n\nIf referenceDate is null, the method returns null.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param floatingPointDate The value to the time offset \\( t \\).\n@return The date resulting from adding Math.round(fixingTime*365.0) days to referenceDate.", "Called internally to actually process the Iteration.", "This method computes the eigen vector with the largest eigen value by using the\ndirect power method. This technique is the easiest to implement, but the slowest to converge.\nWorks only if all the eigenvalues are real.\n\n@param A The matrix. Not modified.\n@return If it converged or not.", "Split a span into two by adding a knot in the middle.\n@param n the span index", "Sets the jdbcLevel. parse the string setting and check that it is indeed an integer.\n@param jdbcLevel The jdbcLevel to set", "Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource" ]
public int size() { int size = cleared ? 0 : snapshot.size(); for ( Map.Entry<RowKey,AssociationOperation> op : currentState.entrySet() ) { switch ( op.getValue().getType() ) { case PUT: if ( cleared || !snapshot.containsKey( op.getKey() ) ) { size++; } break; case REMOVE: if ( !cleared && snapshot.containsKey( op.getKey() ) ) { size--; } break; } } return size; }
[ "Returns the number of rows within this association.\n\n@return the number of rows within this association" ]
[ "Add another store destination to an existing streaming session\n\n\n@param store the name of the store to stream to", "Summarizes balance for the given nodeId to PartitionCount.\n\n@param nodeIdToPartitionCount\n@param title for use in pretty string\n@return Pair: getFirst() is utility value to be minimized, getSecond() is\npretty summary string of balance", "List all apps for the current user's account.\n@param range The range of apps provided by {@link Range#getNextRange()}\n@return a list of apps", "This method maps the task unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param taskFixedMeta Fixed meta data for this task\n@param taskFixedData Fixed data for this task\n@param taskVarData Variable task data\n@return Mapping between task identifiers and block position", "Stores the output from a Frontier into the queue, pausing and waiting if the given queue is too large\n\n@param resultsMap map of String and String representing the output of a Frontier's DFS", "The period of time to ban a node that gives an error on an operation.\n\n@param nodeBannagePeriod The period of time to ban the node\n@param unit The time unit of the given value\n\n@deprecated Use {@link #setFailureDetectorBannagePeriod(long)} instead", "Gets an app client by its client app id if it has been initialized; throws if none can be\nfound.\n\n@param clientAppId the client app id of the app client to get.\n@return the app client associated with the client app id.", "Obtains a International Fixed zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Tell a device to become tempo master.\n\n@param deviceNumber the device we want to take over the role of tempo master\n\n@throws IOException if there is a problem sending the command to the device\n@throws IllegalStateException if the {@code VirtualCdj} is not active\n@throws IllegalArgumentException if {@code deviceNumber} is not found on the network" ]
public static Integer convertOverrideIdentifier(String overrideIdentifier) throws Exception { Integer overrideId = -1; try { // there is an issue with parseInt where it does not parse negative values correctly boolean isNegative = false; if (overrideIdentifier.startsWith("-")) { isNegative = true; overrideIdentifier = overrideIdentifier.substring(1); } overrideId = Integer.parseInt(overrideIdentifier); if (isNegative) { overrideId = 0 - overrideId; } } catch (NumberFormatException ne) { // this is OK.. just means it's not a # // split into two parts String className = null; String methodName = null; int lastDot = overrideIdentifier.lastIndexOf("."); className = overrideIdentifier.substring(0, lastDot); methodName = overrideIdentifier.substring(lastDot + 1); overrideId = OverrideService.getInstance().getOverrideIdForMethod(className, methodName); } return overrideId; }
[ "Obtain override ID\n\n@param overrideIdentifier can be the override ID or class name\n@return\n@throws Exception" ]
[ "Moves the cursor to the given row number in the iterator. If the row\nnumber is positive, the cursor moves to the given row number with\nrespect to the beginning of the iterator. The first row is row 1, the\nsecond is row 2, and so on.\n\n@param row the row to move to in this iterator, by absolute number", "Add fields to the text index configuration.\n\n@param fields the {@link TextIndex.Field} configurations to add\n@return the builder for chaining", "Use this API to fetch all the ci resources that are configured on netscaler.", "Stops all streams.", "Returns the context menu for the table item.\n@param itemId the table item.\n@return the context menu for the given item.", "Return a list of the top 100 unique places clustered by a given placetype for a user.\n\n@param placeType\nUse Type-constants at {@link Place}\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null.\n@param placeId\nA Flickr Places ID. Optional, can be null.\n@param threshold\nThe minimum number of photos that a place type must have to be included. If the number of photos is lowered then the parent place type for\nthat place will be used. Optional, can be null.\n@param minUploadDate\nOptional, can be null.\n@param maxUploadDate\nOptional, can be null.\n@param minTakenDate\nOptional, can be null.\n@param maxTakenDate\nOptional, can be null.\n@return A PlacesList\n@throws FlickrException", "Cancel old waiting jobs.\n\n@param starttimeThreshold threshold for start time\n@param checkTimeThreshold threshold for last check time\n@param message the error message", "Adds to this set all of the elements in the specified map of members and their score.\n@param scoredMember the members to add together with their scores\n@return the number of members actually added", "Makes a DocumentReaderAndWriter based on the flags the CRFClassifier\nwas constructed with. Will create the flags.readerAndWriter and\ninitialize it with the CRFClassifier's flags." ]
private void writeMap(String fieldName, Object value) throws IOException { @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>) value; m_writer.writeStartObject(fieldName); for (Map.Entry<String, Object> entry : map.entrySet()) { Object entryValue = entry.getValue(); if (entryValue != null) { DataType type = TYPE_MAP.get(entryValue.getClass().getName()); if (type == null) { type = DataType.STRING; entryValue = entryValue.toString(); } writeField(entry.getKey(), type, entryValue); } } m_writer.writeEndObject(); }
[ "Write a map field to the JSON file.\n\n@param fieldName field name\n@param value field value" ]
[ "Remove the S3 file that contains the domain controller data.\n\n@param directoryName the name of the directory that contains the S3 file", "Finish configuration.", "Use this API to fetch all the gslbrunningconfig resources that are configured on netscaler.", "Issue the database statements to drop the table associated with a table configuration.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so.", "Put a new value in map.\n\n@param key id of the value for looking up.\n@param value the value.", "Retrieve the next available field.\n\n@return FieldType instance for the next available field", "Extract day type definitions.\n\n@param types Synchro day type rows\n@return Map of day types by UUID", "Add a console pipeline to the Redwood handler tree,\nprinting to stdout.\nCalling this multiple times will result in messages being printed\nmultiple times.\n@return this", "This method is called recursively to write a task and its child tasks\nto the JSON file.\n\n@param task task to write" ]
public static base_response create(nitro_service client, sslfipskey resource) throws Exception { sslfipskey createresource = new sslfipskey(); createresource.fipskeyname = resource.fipskeyname; createresource.modulus = resource.modulus; createresource.exponent = resource.exponent; return createresource.perform_operation(client,"create"); }
[ "Use this API to create sslfipskey." ]
[ "Remove an read lock.", "Hides the original Java-style method name using an attribute\nwhich should be respected by Visual Studio, the creates a new\nwrapper method using a .Net style method name.\n\nNote that this does not work for VB as it is case insensitive. Even\nthough Visual Studio won't show you the Java-style method name,\nthe VB compiler sees both and thinks they are the same... which\ncauses it to fail.\n\n@param writer output stream\n@param aClass class being processed\n@param methodSet set of methods which have been processed.\n@throws XMLStreamException", "Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param text the text of the item to be added\n@param reload perform a 'material select' reload to update the DOM.", "Lookup an object via its name.\n@param name The name of an object.\n@return The object with that name.\n@exception ObjectNameNotFoundException There is no object with the specified name.\nObjectNameNotFoundException", "Check whether error handling works. If it works, you should see an\nok, otherwise, you might see the actual error message and then\nthe program exits.", "Returns the steps instances associated to CandidateSteps\n\n@param candidateSteps\nthe List of CandidateSteps\n@return The List of steps instances", "Check the given URI to see if it matches.\n\n@param matchInfo the matchInfo to validate.\n@return True if it matches.", "Resets the handler data to a basic state.", "Get an image as a stream. Callers must be sure to close the stream when they are done with it.\n\n@deprecated\n@see PhotosInterface#getImageAsStream(Photo, int)\n@param suffix\nThe suffix\n@return The InputStream\n@throws IOException" ]
public CollectionDescriptor getCollectionDescriptorByName(String name) { if (name == null) { return null; } CollectionDescriptor cod = (CollectionDescriptor) getCollectionDescriptorNameMap().get(name); // // BRJ: if the CollectionDescriptor is not found // look in the ClassDescriptor referenced by 'super' for it // if (cod == null) { ClassDescriptor superCld = getSuperClassDescriptor(); if (superCld != null) { cod = superCld.getCollectionDescriptorByName(name); } } return cod; }
[ "Get an CollectionDescriptor by name BRJ\n@param name\n@return CollectionDescriptor or null" ]
[ "Starts the scavenger.", "Set the occurrences. If the String is invalid, the occurrences will be set to \"-1\" to cause server-side validation to fail.\n@param occurrences the interval to set.", "Get public photos from the user's contacts.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param userId\nThe user ID\n@param count\nThe number of photos to return\n@param justFriends\nTrue to include friends\n@param singlePhoto\nTrue to get a single photo\n@param includeSelf\nTrue to include self\n@return A collection of Photo objects\n@throws FlickrException", "Add a raw SQL \"GROUP BY\" clause to the SQL query statement. This should not include the \"GROUP BY\".", "is ready to service requests", "Return a list of websocket connection by key\n\n@param key\nthe key to find the websocket connection list\n@return a list of websocket connection or an empty list if no websocket connection found by key", "Get the property name from the expression.\n\n@param expression expression\n@return property name", "Adds a set of tests based on pattern matching.", "Returns true if the query result has at least one row." ]
private List<File> getConfigFiles() { String[] filenames = { "opencms-modules.xml", "opencms-system.xml", "opencms-vfs.xml", "opencms-importexport.xml", "opencms-sites.xml", "opencms-variables.xml", "opencms-scheduler.xml", "opencms-workplace.xml", "opencms-search.xml"}; List<File> result = new ArrayList<>(); for (String fn : filenames) { File file = new File(m_configDir, fn); if (file.exists()) { result.add(file); } } return result; }
[ "Gets existing config files.\n\n@return the existing config files" ]
[ "Populates the project header.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException", "Gets the date time str standard.\n\n@param d\nthe d\n@return the date time str standard", "Adds OPT_N | OPT_NODE option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string", "Resolve a path from the rootPath checking that it doesn't go out of the rootPath.\n@param rootPath the starting point for resolution.\n@param path the path we want to resolve.\n@return the resolved path.\n@throws IllegalArgumentException if the resolved path is out of the rootPath or if the resolution failed.", "Sets the specified starting partition key.\n\n@param paging a paging state", "Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return", "Reads the table data from an input stream and breaks\nit down into rows.\n\n@param is input stream", "Add UDFType objects to a PM XML file.\n\n@author kmahan\n@date 2014-09-24\n@author lsong\n@date 2015-7-24" ]
public static List<Sentence> splitSentences(CharSequence text) { return JavaConversions.seqAsJavaList( TwitterKoreanProcessor.splitSentences(text) ); }
[ "Split input text into sentences.\n\n@param text Input text.\n@return List of Sentence objects." ]
[ "Use this API to add authenticationradiusaction resources.", "Throws an exception if at least one results directory is missing.", "Add a column to be set to a value for UPDATE statements. This will generate something like 'columnName =\nexpression' where the expression is built by the caller.\n\n<p>\nThe expression should have any strings escaped using the {@link #escapeValue(String)} or\n{@link #escapeValue(StringBuilder, String)} methods and should have any column names escaped using the\n{@link #escapeColumnName(String)} or {@link #escapeColumnName(StringBuilder, String)} methods.\n</p>", "Go through all node IDs and determine which node\n\n@param cluster\n@param storeRoutingPlan\n@return", "Given a parameter, builds a new parameter for which the known generics placeholders are resolved.\n@param genericFromReceiver resolved generics from the receiver of the message\n@param placeholdersFromContext, resolved generics from the method context\n@param methodParameter the method parameter for which we want to resolve generic types\n@param paramType the (unresolved) type of the method parameter\n@return a new parameter with the same name and type as the original one, but with resolved generic types", "Extract the outline level from a task's WBS attribute.\n\n@param task Task instance\n@return outline level", "Extract a list of time entries.\n\n@param shiftData string representation of time entries\n@return list of time entry rows", "returns a sorted array of methods", "Wrap Statement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a statement." ]
protected final String computeId( final ITemplateContext context, final IProcessableElementTag tag, final String name, final boolean sequence) { String id = tag.getAttributeValue(this.idAttributeDefinition.getAttributeName()); if (!org.thymeleaf.util.StringUtils.isEmptyOrWhitespace(id)) { return (StringUtils.hasText(id) ? id : null); } id = FieldUtils.idFromName(name); if (sequence) { final Integer count = context.getIdentifierSequences().getAndIncrementIDSeq(id); return id + count.toString(); } return id; }
[ "This method is designed to be called from the diverse subclasses" ]
[ "Select this tab item.", "The location for this elevation.\n\n@return", "This method allows a predecessor relationship to be added to this\ntask instance.\n\n@param targetTask the predecessor task\n@param type relation type\n@param lag relation lag\n@return relationship", "Use this API to add tmtrafficaction.", "Create a new linear interpolated time discrete process by\nusing the time discretization of this process and the sum of this process and the given one\nas its values.\n\n@param process A given process.\n@return A new process representing the of this and the given process.\n@throws CalculationException Thrown if the given process fails to evaluate at a certain time point.", "Not implemented.\n@param point1 Point1\n@param point2 Point2\n@return Throws an exception.", "Utility function that converts a list to a map.\n\n@param list The list in which even elements are keys and odd elements are\nvalues.\n@rturn The map container that maps even elements to odd elements, e.g.\n0->1, 2->3, etc.", "This method should be called after all column have been added to the report.\n@param numgroups\n@return", "Reads GIF image from byte array.\n\n@param data containing GIF file.\n@return read status code (0 = no errors)." ]
public static String fancyStringF(double value, DecimalFormat format, int length, int significant) { String formatted = fancyString(value, format, length, significant); int n = length-formatted.length(); if( n > 0 ) { StringBuilder builder = new StringBuilder(n); for (int i = 0; i < n; i++) { builder.append(' '); } return formatted + builder.toString(); } else { return formatted; } }
[ "Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param format default format before exponential\n@param length Maximum number of characters it can take.\n@param significant Number of significant decimal digits to show at a minimum.\n@return formatted string" ]
[ "Checks all data sets in IIM records 1, 2 and 3 for constraint violations.\n\n@return list of constraint violations, empty set if IIM file is valid", "Sets the value for the API's \"sitefilter\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters", "Use this API to update cachecontentgroup.", "Return total number of connections currently in use by an application\n@return no of leased connections", ">>>>>> measureUntilFull helper methods", "Build a request URL using a given scheme.\n\n@param scheme the scheme, either {@code http} or {@code https}\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException", "Compute the offset for the item in the layout based on the offsets of neighbors\nin the layout. The other offsets are not patched. If neighbors offsets have not\nbeen computed the offset of the item will not be set.\n@return true if the item fits the container, false otherwise", "add some validation to see if this miss anything.\n\n@return true, if successful\n@throws ParallelTaskInvalidException\nthe parallel task invalid exception", "Loads the favorite list.\n\n@return the list of favorites\n\n@throws CmsException if something goes wrong" ]
public PartialCollection<BoxItem.Info> getChildrenRange(long offset, long limit, String... fields) { QueryStringBuilder builder = new QueryStringBuilder() .appendParam("limit", limit) .appendParam("offset", offset); if (fields.length > 0) { builder.appendParam("fields", fields).toString(); } URL url = GET_ITEMS_URL.buildWithQuery(getAPI().getBaseURL(), builder.toString(), getID()); BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject responseJSON = JsonObject.readFrom(response.getJSON()); String totalCountString = responseJSON.get("total_count").toString(); long fullSize = Double.valueOf(totalCountString).longValue(); PartialCollection<BoxItem.Info> children = new PartialCollection<BoxItem.Info>(offset, limit, fullSize); JsonArray jsonArray = responseJSON.get("entries").asArray(); for (JsonValue value : jsonArray) { JsonObject jsonObject = value.asObject(); BoxItem.Info parsedItemInfo = (BoxItem.Info) BoxResource.parseInfo(this.getAPI(), jsonObject); if (parsedItemInfo != null) { children.add(parsedItemInfo); } } return children; }
[ "Retrieves a specific range of child items in this folder.\n\n@param offset the index of the first child item to retrieve.\n@param limit the maximum number of children to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of child items." ]
[ "Get a collection of methods declared on this object by method name.\n\n@param name the name of the method\n@return the (possibly empty) collection of methods with the given name", "Convert an Object to a Timestamp, without an Exception", "Convert this object to a json array.", "Adds a new Site matcher object to the map of server names.\n\n@param matcher the SiteMatcher of the server\n@param site the site to add", "Read tasks representing the WBS.", "Creates a CSS rgb specification from a PDF color\n@param pdcolor\n@return the rgb() string", "Convenience routine to move to the next iterator if needed.\n@return true if the iterator is changed, false if no changes.", "Used to create a new finite retention policy with optional parameters.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@param optionalParams the optional parameters.\n@return the created retention policy's info.", "Insert a value into the right bucket of the histogram. If the value is\nlarger than any bound, insert into the last bucket. If the value is less\nthan zero, then ignore it.\n\n@param data The value to insert into the histogram" ]
public void set(int index, T object) { synchronized (mLock) { if (mOriginalValues != null) { mOriginalValues.set(index, object); } else { mObjects.set(index, object); } } if (mNotifyOnChange) notifyDataSetChanged(); }
[ "set the specified object at index\n\n@param object The object to add at the end of the array." ]
[ "Get all backup data\n\n@param model\n@return\n@throws Exception", "Performs the update to the persistent configuration model. This default implementation simply removes\nthe targeted resource.\n\n@param context the operation context\n@param operation the operation\n@throws OperationFailedException if there is a problem updating the model", "Destroys the context", "Logs binary string as hexadecimal", "Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values", "Deserialize a javascript design document file to a DesignDocument object.\n\n@param file the design document javascript file (UTF-8 encoded)\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read", "Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment", "Update the context session to mark a user logged in\n\n@param userIdentifier\nthe user identifier, could be either userId or username", "Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param a Exponent alpha of power law function\n@param D Diffusion coeffcient" ]
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users public void registerWidget(View widget) { prepareWidget(widget); if (widget instanceof AlgoliaResultsListener) { AlgoliaResultsListener listener = (AlgoliaResultsListener) widget; if (!this.resultListeners.contains(listener)) { this.resultListeners.add(listener); } searcher.registerResultListener(listener); } if (widget instanceof AlgoliaErrorListener) { AlgoliaErrorListener listener = (AlgoliaErrorListener) widget; if (!this.errorListeners.contains(listener)) { this.errorListeners.add(listener); } searcher.registerErrorListener(listener); } if (widget instanceof AlgoliaSearcherListener) { AlgoliaSearcherListener listener = (AlgoliaSearcherListener) widget; listener.initWithSearcher(searcher); } }
[ "Links the given widget to InstantSearch according to the interfaces it implements.\n\n@param widget a widget implementing ({@link AlgoliaResultsListener} || {@link AlgoliaErrorListener} || {@link AlgoliaSearcherListener})." ]
[ "Returns the index of a key in the set.\n\n@param key The key to search for.\n@return Returns the index of the key if it exists, else a negative integer.", "Use this API to clear gslbldnsentries resources.", "Process TestCaseFinishedEvent. Add steps and attachments from\ntop step from stepStorage to current testCase, then remove testCase\nand step from stores. Also remove attachments matches removeAttachments\nconfig.\n\n@param event to process", "Forceful cleanup the logs", "Returns the AirMapView implementation as requested by the mapType argument. Use this method if\nyou need to request a specific AirMapView implementation that is not necessarily the preferred\ntype. For example, you can use it to explicit request a web-based map implementation.\n\n@param mapType Map type for the requested AirMapView implementation.\n@return An {@link AirMapViewBuilder} for the requested {@link AirMapViewTypes} mapType.", "Sets the given value on an the receivers's accessible field with the given name.\n\n@param receiver the receiver, never <code>null</code>\n@param fieldName the field's name, never <code>null</code>\n@param value the value to set\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#set(Object, Object)}\n@throws IllegalArgumentException see {@link Field#set(Object, Object)}", "Attempts shared acquisition with a max wait time.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the time value to wait for acquiring the lock\n@param unit - See {@code TimeUnit} for valid values\n@return {@code boolean} true on success.", "Returns the class of datatype URI that best characterizes the range of\nthe given property based on its datatype.\n\n@param propertyIdValue\nthe property for which to get a range\n@return the range URI or null if the datatype could not be identified.", "Acquires a read lock on a specific key.\n@param key The key to lock\n@param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait." ]
private int getDaysInRange(Date startDate, Date endDate) { int result; Calendar cal = DateHelper.popCalendar(endDate); int endDateYear = cal.get(Calendar.YEAR); int endDateDayOfYear = cal.get(Calendar.DAY_OF_YEAR); cal.setTime(startDate); if (endDateYear == cal.get(Calendar.YEAR)) { result = (endDateDayOfYear - cal.get(Calendar.DAY_OF_YEAR)) + 1; } else { result = 0; do { result += (cal.getActualMaximum(Calendar.DAY_OF_YEAR) - cal.get(Calendar.DAY_OF_YEAR)) + 1; cal.roll(Calendar.YEAR, 1); cal.set(Calendar.DAY_OF_YEAR, 1); } while (cal.get(Calendar.YEAR) < endDateYear); result += endDateDayOfYear; } DateHelper.pushCalendar(cal); return result; }
[ "This method calculates the absolute number of days between two dates.\nNote that where two date objects are provided that fall on the same\nday, this method will return one not zero. Note also that this method\nassumes that the dates are passed in the correct order, i.e.\nstartDate < endDate.\n\n@param startDate Start date\n@param endDate End date\n@return number of days in the date range" ]
[ "Read a four byte integer.\n\n@param data byte array\n@param offset offset into array\n@return integer value", "Gets the prefix from value.\n\n@param value the value\n@return the prefix from value", "Retrieve the number of minutes per week for this calendar.\n\n@return minutes per week", "Retrieves the content of the filename. Also reads from JAR Searches for the resource in the\nroot folder in the jar\n\n@param fileName Filename.\n@return The contents of the file.\n@throws IOException On error.", "Adds the remaining tokens to the processed tokens list.\n\n@param iter An iterator over the remaining tokens", "Triggers the building process, builds, creates and starts the docker container associated with the requested\ncontainer object, creates the container object and returns it\n\n@return the created container object\n\n@throws IllegalAccessException\nif there is an error accessing the container object fields\n@throws IOException\nif there is an I/O error while preparing the docker build\n@throws InvocationTargetException\nif there is an error while calling the DockerFile archive creation", "Creates the automata.\n\n@param prefix the prefix\n@param regexp the regexp\n@param automatonMap the automaton map\n@return the list\n@throws IOException Signals that an I/O exception has occurred.", "The way calendars are stored in an MSPDI file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects", "Calculate the layout offset" ]
void applyFreshParticleOffScreen( @NonNull final Scene scene, final int position) { final int w = scene.getWidth(); final int h = scene.getHeight(); if (w == 0 || h == 0) { throw new IllegalStateException( "Cannot generate particles if scene width or height is 0"); } float x = random.nextInt(w); float y = random.nextInt(h); // The offset to make when creating point of out bounds final short offset = (short) (scene.getParticleRadiusMin() + scene.getLineLength()); // Point angle range final float startAngle; float endAngle; // Make random offset and calulate angles so that the direction of travel will always be // towards our View switch (random.nextInt(4)) { case 0: // offset to left x = (short) -offset; startAngle = angleDeg(pcc, pcc, x, y); endAngle = angleDeg(pcc, h - pcc, x, y); break; case 1: // offset to top y = (short) -offset; startAngle = angleDeg(w - pcc, pcc, x, y); endAngle = angleDeg(pcc, pcc, x, y); break; case 2: // offset to right x = (short) (w + offset); startAngle = angleDeg(w - pcc, h - pcc, x, y); endAngle = angleDeg(w - pcc, pcc, x, y); break; case 3: // offset to bottom y = (short) (h + offset); startAngle = angleDeg(pcc, h - pcc, x, y); endAngle = angleDeg(w - pcc, h - pcc, x, y); break; default: throw new IllegalArgumentException("Supplied value out of range"); } if (endAngle < startAngle) { endAngle += 360; } // Get random angle from angle range final float randomAngleInRange = startAngle + (random .nextInt((int) Math.abs(endAngle - startAngle))); final double direction = Math.toRadians(randomAngleInRange); final float dCos = (float) Math.cos(direction); final float dSin = (float) Math.sin(direction); final float speedFactor = newRandomIndividualParticleSpeedFactor(); final float radius = newRandomIndividualParticleRadius(scene); scene.setParticleData( position, x, y, dCos, dSin, radius, speedFactor); }
[ "Set new particle coordinates somewhere off screen and apply new direction towards the screen\n\n@param position the particle position to apply new values to" ]
[ "If this represents an ip address, returns that address.\nIf this represents a host, returns the resolved ip address of that host.\nOtherwise, returns null, but only for strings that are considered valid address strings but cannot be converted to address objects.\n\nThis method will throw exceptions for invalid formats and failures to resolve the address. The equivalent method {@link #getAddress()} will simply return null rather than throw those exceptions.\n\nIf you wish to get the represented address and avoid DNS resolution, use {@link #asAddress()} or {@link #asAddressString()}\n\n@return", "refresh all primitive typed attributes of a cached instance\nwith the current values from the database.\nrefreshing of reference and collection attributes is not done\nhere.\n@param cachedInstance the cached instance to be refreshed\n@param oid the Identity of the cached instance\n@param cld the ClassDescriptor of cachedInstance", "Use this API to fetch all the locationfile resources that are configured on netscaler.", "Seeks to the given day within the current month\n@param dayOfMonth the day of the month to seek to, represented as an integer\nfrom 1 to 31. Must be guaranteed to parse as an Integer. If this day is\nbeyond the last day of the current month, the actual last day of the month\nwill be used.", "Add a variable to the scripting context.\n\n@param varName The variable name.\n@param value The variable value.", "returns a proxy or a fully materialized Object from the current row of the\nunderlying resultset.", "Process the start of this element.\n\n@param attributes The attribute list for this element\n@param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace\naware or the element has no namespace\n@param name the local name if the parser is namespace aware, or just the element name otherwise\n@throws Exception if something goes wrong", "Returns the name from the inverse side if the given property de-notes a one-to-one association.", "Clears all scopes. Useful for testing and not getting any leak..." ]
public void build(double[] coords, int nump) throws IllegalArgumentException { if (nump < 4) { throw new IllegalArgumentException("Less than four input points specified"); } if (coords.length / 3 < nump) { throw new IllegalArgumentException("Coordinate array too small for specified number of points"); } initBuffers(nump); setPoints(coords, nump); buildHull(); }
[ "Constructs the convex hull of a set of points whose coordinates are given\nby an array of doubles.\n\n@param coords\nx, y, and z coordinates of each input point. The length of\nthis array must be at least three times <code>nump</code>.\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater than\n1/3 the length of <code>coords</code>, or the points appear\nto be coincident, colinear, or coplanar." ]
[ "Whether the specified JavaBeans property exists on the given type or not.\n\n@param clazz the type of interest\n@param property the JavaBeans property name\n@param elementType the element type to check, must be either {@link ElementType#FIELD} or\n{@link ElementType#METHOD}.\n@return {@code true} if the specified property exists, {@code false} otherwise", "In the 3.0 xsd the vault configuration and its options are part of the vault xsd.\n\n@param reader the reader at the vault element\n@param expectedNs the namespace\n@return the vault configuration", "Return a stream of resources from a response\n\n@param response the response\n@param <R> the resource type\n@param <U> the response type\n@return a stream of resources from the response", "Create a clone of the Renderer. This method is the base of the prototype mechanism implemented\nto avoid create new objects from RendererBuilder. Pay an special attention implementing clone\nmethod in Renderer subtypes.\n\n@return a copy of the current renderer.", "Calculate the value of a swaption assuming the Black'76 model.\n\n@param forwardSwaprate The forward (spot)\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity.\n@param optionStrike The option strike.\n@param swapAnnuity The swap annuity corresponding to the underlying swap.\n@return Returns the value of a Swaption under the Black'76 model", "This method retrieves the calendar hours for the specified day.\nNote that if this is a derived calendar, then this method\nwill refer to the base calendar where no hours are specified\nin the derived calendar.\n\n@param day Day instance\n@return calendar hours", "Adds all categories from one resource to another, skipping categories that are not available for the resource copied to.\n\nThe resource where categories are copied to has to be locked.\n\n@param cms the CmsObject used for reading and writing.\n@param fromResource the resource to copy the categories from.\n@param toResourceSitePath the full site path of the resource to copy the categories to.\n@throws CmsException thrown if copying the resources fails.", "marks the message as read", "Handle a value change.\n@param propertyId the column in which the value has changed." ]
public void clear() { Class collClass = getCollectionClass(); // ECER: assure we notify all objects being removed, // necessary for RemovalAwareCollections... if (IRemovalAwareCollection.class.isAssignableFrom(collClass)) { getData().clear(); } else { Collection coll; // BRJ: use an empty collection so isLoaded will return true // for non RemovalAwareCollections only !! try { coll = (Collection) collClass.newInstance(); } catch (Exception e) { coll = new ArrayList(); } setData(coll); } _size = 0; }
[ "Clears the proxy. A cleared proxy is defined as loaded\n\n@see Collection#clear()" ]
[ "Add statistics about sent emails.\n\n@param recipients The list of recipients.\n@param storageUsed If a remote storage was used.", "Creates a single property declaration.\n@param property Property name.\n@param term Property value.\n@return The resulting declaration.", "Build call for getCharactersCharacterIdShip\n\n@param characterId\nAn EVE character ID (required)\n@param datasource\nThe server name you would like data from (optional, default to\ntranquility)\n@param ifNoneMatch\nETag from a previous request. A 304 will be returned if this\nmatches the current ETag (optional)\n@param token\nAccess token to use if unable to set a header (optional)\n@param callback\nCallback for upload/download progress\n@return Call to execute\n@throws ApiException\nIf fail to serialize the request body object", "To sql pattern.\n\n@param attribute the attribute\n@return the string", "This method finds the start of the next working period.\n\n@param cal current Calendar instance", "Inserts a single document locally and being to synchronize it based on its _id. Inserting\na document with the same _id twice will result in a duplicate key exception.\n\n@param namespace the namespace to put the document in.\n@param document the document to insert.", "Get the server redirects belonging to a server group\n\n@param profileId ID of profile\n@param serverGroupId ID of server group\n@return Collection of ServerRedirect for a server group", "Creates a clone using java serialization\n\n@param from Object to be cloned\n@param <T> type of the cloned object\n@return Clone of the object", "Sets the HTML entity translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator" ]
public static base_response add(nitro_service client, dnsaaaarec resource) throws Exception { dnsaaaarec addresource = new dnsaaaarec(); addresource.hostname = resource.hostname; addresource.ipv6address = resource.ipv6address; addresource.ttl = resource.ttl; return addresource.add_resource(client); }
[ "Use this API to add dnsaaaarec." ]
[ "defines the KEY in the parent report parameters map where to get the subreport parameters map.\n@param path where to get the parameter map for the subrerpot.\n@return", "Initialize the various DAO configurations after the various setters have been called.", "Retrieve a UUID in the form required by Primavera PMXML.\n\n@param guid UUID instance\n@return formatted UUID", "Set the group name\n\n@param name new name of server group\n@param id ID of group", "Convert a color to an angle.\n\n@param color The RGB value of the color to \"find\" on the color wheel.\n\n@return The angle (in rad) the \"normalized\" color is displayed on the\ncolor wheel.", "Convenience method that returns the attribute value for the specified attribute name.\n\n@param attributeName the name of the attribute\n@return the value of the attribute or null if no such attribute exists\n@since 1.9.0", "Upload file and set odo overrides and configuration of odo\n\n@param fileName File containing configuration\n@param odoImport Import odo configuration in addition to overrides\n@return If upload was successful", "Determines if the key replicates to the given node\n\n@param key\n@param nodeId\n@return true if the key belongs to the node as some replica", "Generates a toString method using concatenation or a StringBuilder." ]
public static Cluster balanceContiguousPartitionsPerZone(final Cluster nextCandidateCluster, final int maxContiguousPartitionsPerZone) { System.out.println("Balance number of contiguous partitions within a zone."); System.out.println("numPartitionsPerZone"); for(int zoneId: nextCandidateCluster.getZoneIds()) { System.out.println(zoneId + " : " + nextCandidateCluster.getNumberOfPartitionsInZone(zoneId)); } System.out.println("numNodesPerZone"); for(int zoneId: nextCandidateCluster.getZoneIds()) { System.out.println(zoneId + " : " + nextCandidateCluster.getNumberOfNodesInZone(zoneId)); } // Break up contiguous partitions within each zone HashMap<Integer, List<Integer>> partitionsToRemoveFromZone = Maps.newHashMap(); System.out.println("Contiguous partitions"); for(Integer zoneId: nextCandidateCluster.getZoneIds()) { System.out.println("\tZone: " + zoneId); Map<Integer, Integer> partitionToRunLength = PartitionBalanceUtils.getMapOfContiguousPartitions(nextCandidateCluster, zoneId); List<Integer> partitionsToRemoveFromThisZone = new ArrayList<Integer>(); for(Map.Entry<Integer, Integer> entry: partitionToRunLength.entrySet()) { if(entry.getValue() > maxContiguousPartitionsPerZone) { List<Integer> contiguousPartitions = new ArrayList<Integer>(entry.getValue()); for(int partitionId = entry.getKey(); partitionId < entry.getKey() + entry.getValue(); partitionId++) { contiguousPartitions.add(partitionId % nextCandidateCluster.getNumberOfPartitions()); } System.out.println("Contiguous partitions: " + contiguousPartitions); partitionsToRemoveFromThisZone.addAll(Utils.removeItemsToSplitListEvenly(contiguousPartitions, maxContiguousPartitionsPerZone)); } } partitionsToRemoveFromZone.put(zoneId, partitionsToRemoveFromThisZone); System.out.println("\t\tPartitions to remove: " + partitionsToRemoveFromThisZone); } Cluster returnCluster = Cluster.cloneCluster(nextCandidateCluster); Random r = new Random(); for(int zoneId: returnCluster.getZoneIds()) { for(int partitionId: partitionsToRemoveFromZone.get(zoneId)) { // Pick a random other zone Id List<Integer> otherZoneIds = new ArrayList<Integer>(); for(int otherZoneId: returnCluster.getZoneIds()) { if(otherZoneId != zoneId) { otherZoneIds.add(otherZoneId); } } int whichOtherZoneId = otherZoneIds.get(r.nextInt(otherZoneIds.size())); // Pick a random node from other zone ID int whichNodeOffset = r.nextInt(returnCluster.getNumberOfNodesInZone(whichOtherZoneId)); int whichNodeId = new ArrayList<Integer>(returnCluster.getNodeIdsInZone(whichOtherZoneId)).get(whichNodeOffset); // Steal partition from one zone to another! returnCluster = UpdateClusterUtils.createUpdatedCluster(returnCluster, whichNodeId, Lists.newArrayList(partitionId)); } } return returnCluster; }
[ "Ensures that no more than maxContiguousPartitionsPerZone partitions are\ncontiguous within a single zone.\n\nMoves the necessary partitions to break up contiguous runs from each zone\nto some other random zone/node. There is some chance that such random\nmoves could result in contiguous partitions in other zones.\n\n@param nextCandidateCluster cluster metadata\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return Return updated cluster metadata." ]
[ "Returns the user defined field without its prefix.\n\n@param field the name of the user defined field\n@return the user defined field without the prefix, or null if the fields\ndoesn't apply to this control file.\n@since 1.1", "return a prepared Insert Statement fitting for the given ClassDescriptor", "Shortcut for mapping an arbitrary observable to void, using the IO scheduler.\n@param fromObservable the source observable\n@return a void-emitting observable", "Search for rectangles which have the same width and x position, and\nwhich join together vertically and merge them together to reduce the\nnumber of rectangles needed to describe a symbol.", "Merges information from the resource root into this resource root\n\n@param additionalResourceRoot The root to merge", "Renames this file.\n\n@param newName the new name of the file.", "Returns the connection that has been saved or null if none.", "Append Join for SQL92 Syntax", "Take screenshot of the current window.\n\n@param target The target type/format of the Screenshot\n@return Screenshot of current window, in the requested format" ]
public List<ChannelInfo> getChannels(String connectionName) { final URI uri = uriWithPath("./connections/" + encodePathSegment(connectionName) + "/channels/"); return Arrays.asList(this.rt.getForObject(uri, ChannelInfo[].class)); }
[ "Retrieves state and metrics information for all channels on individual connection.\n@param connectionName the connection name to retrieve channels\n@return list of channels on the connection" ]
[ "return a prepared Insert Statement fitting for the given ClassDescriptor", "Generate the init script from the Artifactory URL.\n\n@return The generated script.", "Helper method that searches an object array for the occurence of a\nspecific object based on reference equality\n@param searchFor the object to search for\n@param searchIn the array to search in\n@return true if the object is found, otherwise false", "Set the mbean server on the QueryExp and try and pass back any previously set one", "checking availability of ClassInfo.setFlags method is just workaround for JANDEX-37", "Convert a layer type to a geometry class.\n\n@param layerType\nlayer type\n@return JTS class", "Add a row to the table if it does not already exist\n\n@param cells String...", "Mark for creation all newly introduced dependent references.\nMark for deletion all nullified dependent references.\n@return the list of created objects", "Retrieve the state object associated with the specified interceptor instance and property\nname on this request context.\n\n@param interceptor the interceptor instance\n@param stateName the name key that the state object was stored under\n@param stateType class of the type the stored state should be returned as\n@param <T> the type the stored state should be returned as\n@return the stored state object\n@see #setState(HttpConnectionInterceptor, String, Object)\n@since 2.6.0" ]
private Object filterValue(Object value) { if (value instanceof Boolean && !((Boolean) value).booleanValue()) { value = null; } if (value instanceof String && ((String) value).isEmpty()) { value = null; } if (value instanceof Double && ((Double) value).doubleValue() == 0.0) { value = null; } if (value instanceof Integer && ((Integer) value).intValue() == 0) { value = null; } if (value instanceof Duration && ((Duration) value).getDuration() == 0.0) { value = null; } return value; }
[ "Replace default values will null, allowing them to be ignored.\n\n@param value value to test\n@return filtered value" ]
[ "Escapes args' string values according to format\n\n@param format the Format used by the PrintStream\n@param args the array of args to escape\n@return The cloned and escaped array of args", "Answer a List of InCriteria based on values, each InCriteria\ncontains only inLimit values\n@param attribute\n@param values\n@param negative\n@param inLimit the maximum number of values for IN (-1 for no limit)\n@return List of InCriteria", "Set the duration option.\n@param value the duration option to set ({@link EndType} as string).", "Called to reset current sensor data.\n\n@param timeStamp\ncurrent time stamp\n@param rotationW\nQuaternion rotation W\n@param rotationX\nQuaternion rotation X\n@param rotationY\nQuaternion rotation Y\n@param rotationZ\nQuaternion rotation Z\n@param gyroX\nGyro rotation X\n@param gyroY\nGyro rotation Y\n@param gyroZ\nGyro rotation Z", "Use this API to update autoscaleaction.", "Read a two byte integer from the data.\n\n@param offset current offset into data block\n@param data data block\n@return int value", "Serializes the given object in JSON and returns the resulting string. In\ncase of errors, null is returned. In particular, this happens if the\nobject is not based on a Jackson-annotated class. An error is logged in\nthis case.\n\n@param object\nobject to serialize\n@return JSON serialization or null", "Parse a list of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token.", "Called when the layout is applied to the data\n@param container WidgetContainer to access the org.gearvrf.org.gearvrf.widgetlib in the layout\n@param viewPortSize View port for data set" ]
public String getAccuracyDescription(int numDigits) { NumberFormat nf = NumberFormat.getNumberInstance(); nf.setMaximumFractionDigits(numDigits); Triple<Double, Integer, Integer> accu = getAccuracyInfo(); return nf.format(accu.first()) + " (" + accu.second() + "/" + (accu.second() + accu.third()) + ")"; }
[ "Returns a String summarizing overall accuracy that will print nicely." ]
[ "Ignore some element from the AST\n\n@param element\n@return", "Convert a date to the String representation we use in the JSON.\n@param d the date to convert\n@return the String representation we use in the JSON.", "a small static helper to set the image from the imageHolder nullSave to the imageView\n\n@param imageHolder\n@param imageView\n@param tag used to identify imageViews and define different placeholders\n@return true if an image was set", "Returns the site path for the edited bundle file.\n\n@return the site path for the edited bundle file.", "Recursively scan the provided path and return a list of all Java packages contained therein.", "Disassociate a name with an object\n@param name The name of an object.\n@exception ObjectNameNotFoundException No object exists in the database with that name.", "Generates the context diagram for a single class", "find all accessibility object and set active true for enable talk back.", "Part of the endOfRun process that needs the database. May be deferred if the database is not available." ]
@SuppressWarnings("unchecked") public Map<String, Object> getCustomProperties() { return (Map<String, Object>) getCachedValue(ProjectField.CUSTOM_PROPERTIES); }
[ "Retrieve a map of custom document properties.\n\n@return the Document Summary Information Map" ]
[ "Sanity check precondition for above setters", "Acquire transaction with a single permit in a thread. Transactions are acquired reentrantly, i.e.\nwith respect to transactions already acquired in the thread.\n\n@return the number of acquired permits, identically equal to 1.", "Performs an efficient update of each columns' norm", "Log long string using verbose tag\n\n@param TAG The tag.\n@param longString The long string.", "Notification that boot has completed successfully and the configuration history should be updated", "Concat a List into a CSV String.\n@param list list to concat\n@return csv string", "Use this API to fetch all the cmppolicylabel resources that are configured on netscaler.", "Creates a simple, annotation defined Web Bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return A Web Bean", "Renumbers all entity unique IDs." ]
public List<BoxAPIResponse> execute(List<BoxAPIRequest> requests) { this.prepareRequest(requests); BoxJSONResponse batchResponse = (BoxJSONResponse) send(); return this.parseResponse(batchResponse); }
[ "Execute a set of API calls as batch request.\n@param requests list of api requests that has to be executed in batch.\n@return list of BoxAPIResponses" ]
[ "Validates aliases.\n\n@param uuid The structure id for which the aliases should be valid\n@param aliasPaths a map from id strings to alias paths\n@param callback the callback which should be called with the validation results", "set custom request for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise", "Set the view frustum to pick against from the field of view, aspect\nratio and near, far clip planes. The viewpoint of the frustum\nis the center of the scene object the picker is attached to.\nThe view direction is the forward direction of that scene object.\nThe frustum will pick what a camera attached to the scene object\nwith that view frustum would see. If the frustum is not attached\nto a scene object, it defaults to the view frustum of the main camera of the scene.\n\n@param fovy vertical field of view in degrees\n@param aspect aspect ratio (width / height)", "Generated the report.", "The token was previously determined as potentially to-be-splitted thus we\nemit additional indentation or dedenting tokens.", "Create dummy groups for each concatenated report, and in the footer of\neach group adds the subreport.", "Get file extension for script language.\n\n@param language the language name\n@return the file extension as string or null if the language is not in the set of languages supported by spin", "Use this API to fetch dnspolicy_dnspolicylabel_binding resources of given name .", "creates a bounds object with both point parsed from the json and set it\nto the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException" ]
public static boolean isPunct(String s){ Pattern p = Pattern.compile("^[\\p{Punct}]+$"); Matcher m = p.matcher(s); return m.matches(); }
[ "Given a String the method uses Regex to check if the String only contains punctuation characters\n\n@param s a String to check using regex\n@return true if the String is valid" ]
[ "Use this API to fetch appfwprofile_cookieconsistency_binding resources of given name .", "Samples a batch of indices in the range [0, numExamples) without replacement.", "Execute a CLI command. This can be any command that you might execute on\nthe CLI command line, including both server-side operations and local\ncommands such as 'cd' or 'cn'.\n\n@param cliCommand A CLI command.\n@return A result object that provides all information about the execution\nof the command.", "Use this API to fetch auditsyslogpolicy_lbvserver_binding resources of given name .", "Run through the map and remove any references that have been null'd out by the GC.", "Unregister all servlets registered by this exporter.", "Visits a dependence of the current module.\n\n@param module the qualified name of the dependence.\n@param access the access flag of the dependence among\nACC_TRANSITIVE, ACC_STATIC_PHASE, ACC_SYNTHETIC\nand ACC_MANDATED.\n@param version the module version at compile time or null.", "Specifies the object id associated with a user assigned managed service identity\nresource that should be used to retrieve the access token.\n\n@param objectId Object ID of the identity to use when authenticating to Azure AD.\n@return MSICredentials", "Gets the URL of the route with given name.\n@param routeName to return its URL\n@return URL backed by the route with given name." ]
public double[] getTenors(double moneyness, double maturity) { int maturityInMonths = (int) Math.round(maturity * 12); int[] tenorsInMonths = getTenors(convertMoneyness(moneyness), maturityInMonths); double[] tenors = new double[tenorsInMonths.length]; for(int index = 0; index < tenors.length; index++) { tenors[index] = convertTenor(maturityInMonths, tenorsInMonths[index]); } return tenors; }
[ "Return all valid tenors for a given moneyness and maturity.\nUses the payment times of the fix schedule to determine fractions.\n\n@param moneyness The moneyness as actual offset from par swap rate for which to get the maturities.\n@param maturity The maturities as year fraction from the reference date.\n@return The tenors as year fraction from reference date." ]
[ "a helper method to enable the keyboardUtil for a specific activity\nor disable it. note this will cause some frame drops because of the\nlistener.\n\n@param activity\n@param enable", "Checks if user exists.\n\n@param userId the user id, which can be an email or the login.\n@return true, if user exists.", "Copy the contents of the given String to the given output Writer.\nCloses the writer when done.\n@param in the String to copy from\n@param out the Writer to copy to\n@throws IOException in case of I/O errors", "Assigns the element in the Matrix to the specified value. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@param value The element's new value.", "This method extracts data for a single resource from a Planner file.\n\n@param plannerResource Resource data", "Log a message at the provided level.", "Throws an IllegalArgumentException when the given value is not true.\n@param value the value to assert if true\n@param message the message to display if the value is false\n@return the value", "Save the current file as the given type.\n\n@param file target file\n@param type file type", "Common mechanism to convert Synchro commentary recorss into notes.\n\n@param rows commentary table rows\n@return note text" ]
public static OptionalString ofNullable(ResourceKey key, String value) { return new GenericOptionalString(RUNTIME_SOURCE, key, value); }
[ "Returns new instance of OptionalString with given key and value\n@param key key of the returned OptionalString\n@param value wrapped string\n@return given object wrapped in OptionalString with given key" ]
[ "Use this API to clear configuration on netscaler.\n@param force clear confirmation without prompting.\n@param level clear config according to the level. eg: basic, extended, full\n@return status of the operation performed.\n@throws Exception Nitro exception is thrown.", "Returns all the retention policies with specified filters.\n@param name a name to filter the retention policies by. A trailing partial match search is performed.\nSet to null if no name filtering is required.\n@param type a policy type to filter the retention policies by. Set to null if no type filtering is required.\n@param userID a user id to filter the retention policies by. Set to null if no type filtering is required.\n@param limit the limit of items per single response. The default value is 100.\n@param api the API connection to be used by the resource.\n@param fields the fields to retrieve.\n@return an iterable with all the retention policies met search conditions.", "Parse currency.\n\n@param value currency value\n@return currency value", "Removes the specified object in index from the array.\n\n@param index The index to remove.", "Inserts the specified objects at the specified index in the array.\n\n@param items The objects to insert into the array.\n@param index The index at which the object must be inserted.", "Reads non outline code custom field values and populates container.", "Convert the integer representation of a duration value and duration units\ninto an MPXJ Duration instance.\n\n@param properties project properties, used for duration units conversion\n@param durationValue integer duration value\n@param unitsValue integer units value\n@return Duration instance", "Get the SPIProviderResolver instance using the provided classloader for lookup\n\n@param cl classloader to use for lookup\n@return instance of this class", "This method writes task data to an MSPDI file.\n\n@param project Root node of the MSPDI file" ]
public static int getNavigationBarHeight(Context context) { Resources resources = context.getResources(); int id = resources.getIdentifier(context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT ? "navigation_bar_height" : "navigation_bar_height_landscape", "dimen", "android"); if (id > 0) { return resources.getDimensionPixelSize(id); } return 0; }
[ "helper to calculate the navigationBar height\n\n@param context\n@return" ]
[ "Returns a long between interval\n@param min Minimum value\n@param max Maximum value\n@return long number", "Handles incoming Serial Messages. Serial messages can either be messages\nthat are a response to our own requests, or the stick asking us information.\n@param incomingMessage the incoming message to process.", "Add an object into cache by key with expiration time specified\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached\n@param expiration\nthe seconds after which the object will be evicted from the cache", "Get global hotkey provider for current platform\n\n@param useSwingEventQueue whether the provider should be using Swing Event queue or a regular thread\n@return new instance of Provider, or null if platform is not supported\n@see X11Provider\n@see WindowsProvider\n@see CarbonProvider", "Uploads chunk of a stream to an open upload session.\n@param stream the stream that is used to read the chunck using the offset and part size.\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size.", "Returns iban length for the specified country.\n\n@param countryCode {@link org.iban4j.CountryCode}\n@return the length of the iban for the specified country.", "Computes the ratio of the smallest value to the largest. Does not assume\nthe array is sorted first\n@param sv array\n@return smallest / largest", "Check if the right-hand side type may be assigned to the left-hand side\ntype following the Java generics rules.\n@param lhsType the target type\n@param rhsType the value type that should be assigned to the target type\n@return true if rhs is assignable to lhs", "Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param parentLevel\nthe parent level" ]
Map<Object, Object> getFilters() { Map<Object, Object> result = new HashMap<Object, Object>(4); result.put(TableProperty.KEY, m_table.getFilterFieldValue(TableProperty.KEY)); result.put(TableProperty.DEFAULT, m_table.getFilterFieldValue(TableProperty.DEFAULT)); result.put(TableProperty.DESCRIPTION, m_table.getFilterFieldValue(TableProperty.DESCRIPTION)); result.put(TableProperty.TRANSLATION, m_table.getFilterFieldValue(TableProperty.TRANSLATION)); return result; }
[ "Returns the currently set filters in a map column -> filter.\n\n@return the currently set filters in a map column -> filter." ]
[ "Re-initializes the shader texture used to fill in\nthe Circle upon drawing.", "Binding view holder with payloads is used to handle partial changes in item.", "Add resources to the tree.\n\n@param parentNode parent tree node\n@param file resource container", "Fancy print without a space added to positive numbers", "Description accessor provided for JSON serialization only.", "Gets the current instance of plugin manager\n\n@return PluginManager", "read all objects of this iterator. objects will be placed in cache", "updates the values for locking fields , BRJ\nhandles int, long, Timestamp\nrespects updateLock so locking field are only updated when updateLock is true\n@throws PersistenceBrokerException if there is an erros accessing obj field values", "Returns the difference of sets s1 and s2." ]