query
stringlengths
74
6.1k
positive
listlengths
1
1
negative
listlengths
9
9
public boolean link(D declaration, ServiceReference<S> declarationBinderRef) { S declarationBinder = bindersManager.getDeclarationBinder(declarationBinderRef); LOG.debug(declaration + " match the filter of " + declarationBinder + " : bind them together"); declaration.bind(declarationBinderRef); try { declarationBinder.addDeclaration(declaration); } catch (Exception e) { declaration.unbind(declarationBinderRef); LOG.debug(declarationBinder + " throw an exception when giving to it the Declaration " + declaration, e); return false; } return true; }
[ "Try to link the declaration with the importerService referenced by the ServiceReference,.\nreturn true if they have been link together, false otherwise.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference<S> of S\n@return true if they have been link together, false otherwise." ]
[ "Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource", "Sets the target implementation type required. This can be used to explicitly acquire a specific\nimplementation\ntype and use a query to configure the instance or factory to be returned.\n\n@param type the target implementation type, not null.\n@return this query builder for chaining.", "Sets a custom response on an endpoint using default profile and client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@param customData custom response data\n@return true if success, false otherwise", "Use this API to fetch all the lbsipparameters resources that are configured on netscaler.", "Logs binary string as hexadecimal", "Sleeps if necessary to slow down the caller.\n\n@param eventsSeen Number of events seen since last invocation. Basis for\ndetermining whether its necessary to sleep.", "Adds an array of groupby fieldNames for ReportQueries.\n@param fieldNames The groupby to set\n@deprecated use QueryByCriteria#addGroupBy", "Calculate UserInfo strings.", "Removes columns from the matrix.\n\n@param A Matrix. Modified\n@param col0 First column\n@param col1 Last column, inclusive." ]
private void initializeSignProperties() { if (!signPackage && !signChanges) { return; } if (key != null && keyring != null && passphrase != null) { return; } Map<String, String> properties = readPropertiesFromActiveProfiles(signCfgPrefix, KEY, KEYRING, PASSPHRASE); key = lookupIfEmpty(key, properties, KEY); keyring = lookupIfEmpty(keyring, properties, KEYRING); passphrase = decrypt(lookupIfEmpty(passphrase, properties, PASSPHRASE)); if (keyring == null) { try { keyring = Utils.guessKeyRingFile().getAbsolutePath(); console.info("Located keyring at " + keyring); } catch (FileNotFoundException e) { console.warn(e.getMessage()); } } }
[ "Initializes unspecified sign properties using available defaults\nand global settings." ]
[ "find the middle point of two intersect points in circle,only one point will be correct\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return", "Use this API to update dbdbprofile resources.", "Updates the information about the user status for this terms of service with any info fields that have\nbeen modified locally.\n@param info the updated info.", "Retrieve the number of minutes per day for this calendar.\n\n@return minutes per day", "Computes the inverse permutation vector\n\n@param original Original permutation vector\n@param inverse It's inverse", "Attempts to retrieves ResourceReport until maxWaitMs time is reached. Set maxWaitMs to -1 to\nretry forever.", "Show multiple channels. All other channels will be unaffected.\n@param channels The channels to show", "Specifies the container object class to be instantiated\n\n@param containerObjectClass\ncontainer object class to be instantiated\n\n@return the current builder instance", "Returns all the persistent id generators which potentially require the creation of an object in the schema." ]
public void removeVariable(String name) { Map<String, Iterable<? extends WindupVertexFrame>> frame = peek(); frame.remove(name); }
[ "Remove a variable in the top variables layer." ]
[ "Returns a prefix length for which the range of this segment grouping matches the the block of addresses for that prefix.\n\nIf no such prefix exists, returns null\n\nIf this segment grouping represents a single value, returns the bit length\n\n@return the prefix length or null", "Gets the favorite entries corresponding to the currently displayed favorite widgets.\n\n@return the list of favorite entries", "Use this API to update clusterinstance resources.", "Sum of all elements\n\n@param A (Input) Matrix. Not modified.\n@return scalar", "Convenience method to allow a cause. Grrrr.", "Retrieve a work week which applies to this date.\n\n@param date target date\n@return work week, or null if none match this date", "Process the response by reporting proper log and feeding failure\ndetectors\n\n@param response\n@param pipeline", "Cache key calculation.\n@param sql\n@param resultSetType\n@param resultSetConcurrency\n@return cache key", "Returns true if the string matches the name of a function" ]
public void refreshCredentials() { if (this.credsProvider == null) return; try { AlibabaCloudCredentials creds = this.credsProvider.getCredentials(); this.accessKeyID = creds.getAccessKeyId(); this.accessKeySecret = creds.getAccessKeySecret(); if (creds instanceof BasicSessionCredentials) { this.securityToken = ((BasicSessionCredentials) creds).getSessionToken(); } } catch (Exception e) { e.printStackTrace(); } }
[ "refresh credentials if CredentialProvider set" ]
[ "add an Extent class to the current descriptor\n@param newExtentClassName name of the class to add", "Filter event if word occurs in wordsToFilter.\n\n@param event the event\n@return true, if successful", "Saves the loaded XML bundle as property bundle.\n@throws UnsupportedEncodingException thrown if localizations from the XML bundle could not be loaded correctly.\n@throws CmsException thrown if any of the interactions with the VFS fails.\n@throws IOException thrown if localizations from the XML bundle could not be loaded correctly.", "Updates the polling state from a PUT or PATCH operation.\n\n@param response the response from Retrofit REST call\n@throws CloudException thrown if the response is invalid\n@throws IOException thrown by deserialization", "Read a text file resource into a single string\n\n@param context\nA non-null Android Context\n@param resourceId\nAn Android resource id\n@return The contents, or null on error.", "Extracts the column from the matrix a.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column.", "Calling EventProducerInterceptor in case of logging faults.\n\n@param exchange\nthe message exchange\n@param reqFid\nthe FlowId\n\n@throws Fault\nthe fault", "Gets the registration point that been associated with the registration for the longest period.\n\n@return the initial registration point, or {@code null} if there are no longer any registration points", "Parse a currency symbol position from a string representation.\n\n@param value String representation\n@return CurrencySymbolPosition instance" ]
private InputStream runSparqlQuery(String query) throws IOException { try { String queryString = "query=" + URLEncoder.encode(query, "UTF-8") + "&format=json"; URL url = new URL("https://query.wikidata.org/sparql?" + queryString); HttpURLConnection connection = (HttpURLConnection) url .openConnection(); connection.setRequestMethod("GET"); return connection.getInputStream(); } catch (UnsupportedEncodingException | MalformedURLException e) { throw new RuntimeException(e.getMessage(), e); } }
[ "Executes a given SPARQL query and returns a stream with the result in\nJSON format.\n\n@param query\n@return\n@throws IOException" ]
[ "Get a timer of the given string name and todos for the current thread. If\nno such timer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@return timer", "Get the number of views, comments and favorites on a photostream for a given date.\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@see \"http://www.flickr.com/services/api/flickr.stats.getPhotostreamStats.htm\"", "Determines if the queue identified by the given key is a delayed queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key identifies a delayed queue, false otherwise", "Get all the attribute values for an MBean by name. The values are HTML escaped.\n@return the {@link Map} of attribute names and values.\n@throws javax.management.AttributeNotFoundException Unable to find the 'attribute'\n@throws InstanceNotFoundException unable to find the specific bean\n@throws ReflectionException unable to interrogate the bean", "Decode a code from the stream s using huffman table h. Return the symbol or\na negative value if there is an error. If all of the lengths are zero, i.e.\nan empty code, or if the code is incomplete and an invalid code is received,\nthen -9 is returned after reading MAXBITS bits.\n\nFormat notes:\n\n- The codes as stored in the compressed data are bit-reversed relative to\na simple integer ordering of codes of the same lengths. Hence below the\nbits are pulled from the compressed data one at a time and used to\nbuild the code value reversed from what is in the stream in order to\npermit simple integer comparisons for decoding.\n\n- The first code for the shortest length is all ones. Subsequent codes of\nthe same length are simply integer decrements of the previous code. When\nmoving up a length, a one bit is appended to the code. For a complete\ncode, the last code of the longest length will be all zeros. To support\nthis ordering, the bits pulled during decoding are inverted to apply the\nmore \"natural\" ordering starting with all zeros and incrementing.\n\n@param h Huffman table\n@return status code", "Revisit message to set their item ref to a item definition\n@param def Definitions", "Mark root of this task task group depends on the given TaskItem.\nThis ensure this task group's root get picked for execution only after the completion\nof invocation of provided TaskItem.\n\n@param dependencyTaskItem the task item that this task group depends on\n@return the key of the dependency", "By default uses InputStream as the type of the image\n@param title\n@param property\n@param width\n@param fixedWidth\n@param imageScaleMode\n@param style\n@return\n@throws ColumnBuilderException\n@throws ClassNotFoundException", "Remove a notification message. Recursive until all pending removals have been completed." ]
public static void writeFlowId(Message message, String flowId) { Map<String, List<String>> headers = getOrCreateProtocolHeader(message); headers.put(FLOWID_HTTP_HEADER_NAME, Collections.singletonList(flowId)); if (LOG.isLoggable(Level.FINE)) { LOG.fine("HTTP header '" + FLOWID_HTTP_HEADER_NAME + "' set to: " + flowId); } }
[ "Write flow id.\n\n@param message the message\n@param flowId the flow id" ]
[ "Get the values for a particular configuration property\n\n@param name - name of the property\n@return All values encountered or null", "Get list of replies\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A reply object\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getList.html\">API Documentation</a>", "Use this API to update inat resources.", "Use this API to fetch sslpolicy_lbvserver_binding resources of given name .", "interceptors, decorators and observers go first", "Matches an array value if it contains all the elements of the argument array\n@param rhs The arguments\n@return PredicateExpression: $all rhs", "Get the upload parameters.\n@return", "Determines whether the given array only contains unbounded type variables or Object.class.\n\n@param types the given array of types\n@return true if and only if the given array only contains unbounded type variables or Object.class", "Set the html as value inside the tooltip." ]
private String getDurationString(Duration value) { String result = null; if (value != null) { double seconds = 0; switch (value.getUnits()) { case MINUTES: case ELAPSED_MINUTES: { seconds = value.getDuration() * 60; break; } case HOURS: case ELAPSED_HOURS: { seconds = value.getDuration() * (60 * 60); break; } case DAYS: { double minutesPerDay = m_projectFile.getProjectProperties().getMinutesPerDay().doubleValue(); seconds = value.getDuration() * (minutesPerDay * 60); break; } case ELAPSED_DAYS: { seconds = value.getDuration() * (24 * 60 * 60); break; } case WEEKS: { double minutesPerWeek = m_projectFile.getProjectProperties().getMinutesPerWeek().doubleValue(); seconds = value.getDuration() * (minutesPerWeek * 60); break; } case ELAPSED_WEEKS: { seconds = value.getDuration() * (7 * 24 * 60 * 60); break; } case MONTHS: { double minutesPerDay = m_projectFile.getProjectProperties().getMinutesPerDay().doubleValue(); double daysPerMonth = m_projectFile.getProjectProperties().getDaysPerMonth().doubleValue(); seconds = value.getDuration() * (daysPerMonth * minutesPerDay * 60); break; } case ELAPSED_MONTHS: { seconds = value.getDuration() * (30 * 24 * 60 * 60); break; } case YEARS: { double minutesPerDay = m_projectFile.getProjectProperties().getMinutesPerDay().doubleValue(); double daysPerMonth = m_projectFile.getProjectProperties().getDaysPerMonth().doubleValue(); seconds = value.getDuration() * (12 * daysPerMonth * minutesPerDay * 60); break; } case ELAPSED_YEARS: { seconds = value.getDuration() * (365 * 24 * 60 * 60); break; } default: { break; } } result = Long.toString((long) seconds); } return (result); }
[ "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" ]
[ "Returns all keys in no particular order.", "Convert this object to a json object.", "Print a time value.\n\n@param value time value\n@return time value", "Modies the matrix to make sure that at least one element in each column has a value", "Use this API to fetch systemsession resource of given name .", "Update the project properties from the project summary task.\n\n@param task project summary task", "Write all state items to the log file.\n\n@param fileRollEvent the event to log", "Transfer the data from the inputStream to the outputStream. Then close both streams.", "Handle a simple ping request.\n\n@param channel the channel\n@param header the protocol header\n@throws IOException for any error" ]
public static String writeMultipleClientConfigAvro(Map<String, Properties> mapStoreToProps) { // TODO: Use a dedicated json lib. We shouldn't be manually manipulating json... String avroConfig = ""; Boolean firstStore = true; for(String storeName: mapStoreToProps.keySet()) { if(firstStore) { firstStore = false; } else { avroConfig = avroConfig + ",\n"; } Properties props = mapStoreToProps.get(storeName); avroConfig = avroConfig + "\t\"" + storeName + "\": " + writeSingleClientConfigAvro(props); } return "{\n" + avroConfig + "\n}"; }
[ "Assembles an avro format string that contains multiple fat client configs\nfrom map of store to properties\n\n@param mapStoreToProps A map of store names to their properties\n@return Avro string that contains multiple store configs" ]
[ "Checks if the DPI value is already set for GeoServer.", "Return the trimmed source line corresponding to the specified AST node\n\n@param node - the Groovy AST node", "Harvest a single value that was returned by a callable statement.\n\n@param obj the object that will receive the value that is harvested.\n@param callable the CallableStatement that contains the value to harvest\n@param fmd the FieldDescriptor that identifies the field where the\nharvested value will be stord.\n@param index the parameter index.\n\n@throws PersistenceBrokerSQLException if a problem occurs.", "get children nodes name\n\n@param zkClient zkClient\n@param path full path\n@return children nodes name or null while path not exist", "This method is used by non-blocking code to determine if the give buffer\nrepresents a complete request. Because the non-blocking code can by\ndefinition not just block waiting for more data, it's possible to get\npartial reads, and this identifies that case.\n\n@param buffer Buffer to check; the buffer is reset to position 0 before\ncalling this method and the caller must reset it after the call\nreturns\n@return True if the buffer holds a complete request, false otherwise", "Create a new builder for multiple unpaginated requests on the view.\n\n@param keyType {@link com.cloudant.client.api.views.Key.Type} of the key emitted by the\nview\n@param valueType class of the type of value emitted by the view\n@param <K> type of key emitted by the view\n@param <V> type of value emitted by the view\n@return a new {@link MultipleRequestBuilder} for the database view specified by this\nViewRequestBuilder", "Draw text in the center of the specified box.\n\n@param text text\n@param font font\n@param box box to put text int\n@param fontColor colour", "This method returns the actual raw class associated with the specified\ntype.", "Create a JavadocComment, by formatting the text of the Javadoc using the given indentation." ]
private Set<Annotation> getFieldAnnotations(final Class<?> clazz) { try { return new LinkedHashSet<Annotation>(asList(clazz.getDeclaredField(propertyName).getAnnotations())); } catch (final NoSuchFieldException e) { if (clazz.getSuperclass() != null) { return getFieldAnnotations(clazz.getSuperclass()); } else { logger.debug("Cannot find propertyName: {}, declaring class: {}", propertyName, clazz); return new LinkedHashSet<Annotation>(0); } } }
[ "Private function to allow looking for the field recursively up the superclasses.\n\n@param clazz\n@return" ]
[ "Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available", "Performs the filtering of the expired entries based on retention time.\nOptionally, deletes them also\n\n@param key the key whose value is to be deleted if needed\n@param vals set of values to be filtered out\n@return filtered list of values which are currently valid", "Returns string content of blob identified by specified blob handle. String contents cache is used.\n\n@param blobHandle blob handle\n@param txn {@linkplain Transaction} instance\n@return string content of blob identified by specified blob handle\n@throws IOException if something went wrong", "Log original incoming request\n\n@param requestType\n@param request\n@param history", "From the set of classes a new set is built containing all indexed\nsubclasses, but removing then all subtypes of indexed entities.\n\n@param selection\n\n@return a new set of entities", "Use this API to fetch the statistics of all service_stats resources that are configured on netscaler.", "Calls the stored procedure stored procedure throws an\nerror if it doesn't exist.\n@param broker\n@param cld\n@param sequenceName\n@return\n@throws LookupException\n@throws SQLException", "Returns the portion of the field name after the last dot, as field names\nmay actually be paths.", "get the default profile\n\n@return representation of default profile\n@throws Exception exception" ]
@SuppressWarnings({"unused", "WeakerAccess"}) public void markReadInboxMessage(final CTInboxMessage message){ postAsyncSafely("markReadInboxMessage", new Runnable() { @Override public void run() { synchronized (inboxControllerLock) { if(ctInboxController != null){ boolean read = ctInboxController.markReadForMessageWithId(message.getMessageId()); if (read) { _notifyInboxMessagesDidUpdate(); } } else { getConfigLogger().debug(getAccountId(),"Notification Inbox not initialized"); } } } }); }
[ "marks the message as read" ]
[ "Sets the size of the matrix being decomposed, declares new memory if needed,\nand sets all helper functions to their initial value.", "Use this API to fetch lbmonitor_binding resources of given names .", "Use this API to delete gslbservice of given name.", "Create a function that will create the style on demand. This is called later in a separate thread so\nany blocking calls will not block the parsing of the layer attributes.\n\n@param template the template for this map\n@param styleString a string that identifies a style.", "Whether the rows of the given association should be stored in a hash using the single row key column as key or\nnot.", "Sets the specified float 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", "Sets the value of the setting with the specified key.\n\n@param key name of the setting\n@param value the setting value\n@return this {@code EnvironmentConfig} instance", "Set the background color of the progress spinner disc.\n\n@param colorRes Resource id of the color.", "Gets the Topsoe divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Topsoe divergence between p and q." ]
public ParallelTaskBuilder setTargetHostsFromJsonPath(String jsonPath, String sourcePath, HostsSourceType sourceType) throws TargetHostsLoadException { this.targetHosts = targetHostBuilder.setTargetHostsFromJsonPath(jsonPath, sourcePath, sourceType); return this; }
[ "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" ]
[ "Register the given common classes with the ClassUtils cache.", "Dump timephased work for an assignment.\n\n@param assignment resource assignment", "Remove all non replica clock entries from the list of versioned values\nprovided\n\n@param vals list of versioned values to prune replicas from\n@param keyReplicas list of current replicas for the given key\n@param didPrune flag to mark if we did actually prune something\n@return pruned list", "Inserts the LokenList immediately following the 'before' token", "Send message to all connections of a certain user\n\n@param message the message to be sent\n@param username the username\n@return this context", "Set the week of the month the events should occur.\n@param weekOfMonth the week of month to set (first to fifth, where fifth means last).", "Get the log if exists or return null\n\n@param topic topic name\n@param partition partition index\n@return a log for the topic or null if not exist", "Returns all categories that are direct children of the current main category.\n\n@return all categories that are direct children of the current main category.", "Remove all of the audio sources from the audio manager.\nThis will stop all sound from playing." ]
protected HttpUriRequest createHttpRequest(HttpMethod httpMethod, URI uri) { switch (httpMethod) { case GET: return new HttpGet(uri); case DELETE: return new HttpDelete(uri); case HEAD: return new HttpHead(uri); case OPTIONS: return new HttpOptions(uri); case POST: return new HttpPost(uri); case PUT: return new HttpPut(uri); case TRACE: return new HttpTrace(uri); default: throw new IllegalArgumentException("Invalid HTTP method: " + httpMethod); } }
[ "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" ]
[ "Caches the results of radix to the given power.\n\n@param radix\n@param power\n@return", "this method will be invoked after methodToBeInvoked is invoked", "Notifies that an existing footer item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.", "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 vpnvserver_cachepolicy_binding resources of given name .", "Set the attributes of a feature.\n\n@param feature the feature\n@param attributes the attributes\n@throws LayerException oops", "Load the given configuration file.", "Cancel on target hosts.\n\n@param targetHosts\nthe target hosts\n@return true, if successful", "Returns the data sources belonging to a particular group of data\nsources. Data sources are grouped in record linkage mode, but not\nin deduplication mode, so only use this method in record linkage\nmode." ]
public static double ChiSquare(double[] histogram1, double[] histogram2) { double r = 0; for (int i = 0; i < histogram1.length; i++) { double t = histogram1[i] + histogram2[i]; if (t != 0) r += Math.pow(histogram1[i] - histogram2[i], 2) / t; } return 0.5 * r; }
[ "Gets the Chi Square distance between two normalized histograms.\n\n@param histogram1 Histogram.\n@param histogram2 Histogram.\n@return The Chi Square distance between x and y." ]
[ "Adds an audio source to the audio manager.\nAn audio source cannot be played unless it is\nadded to the audio manager. A source cannot be\nadded twice.\n@param audioSource audio source to add", "Bean types of a session bean.", "Process start.\n\n@param endpoint the endpoint\n@param eventType the event type", "Log a warning for the resource at the provided address and the given attributes. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attributes attributes we are warning about", "Set the permission for who may view the geo data associated with a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe id of the photo to set permissions for.\n@param perms\nPermissions, who can see the geo data of this photo\n@throws FlickrException", "Sets left and right padding for all cells in the row.\n@param padding new padding for left and right, ignored if smaller than 0\n@return this to allow chaining", "Use this API to rename a cmppolicylabel resource.", "Mark for creation all newly introduced dependent references.\nMark for deletion all nullified dependent references.\n@return the list of created objects", "Determine the enum value corresponding to the track type found in the packet.\n\n@return the proper value" ]
public TagSetModel getOrCreate(GraphRewrite event, Set<String> tags) { Map<Set<String>, Vertex> cache = getCache(event); Vertex vertex = cache.get(tags); if (vertex == null) { TagSetModel model = create(); model.setTags(tags); cache.put(tags, model.getElement()); return model; } else { return frame(vertex); } }
[ "This essentially ensures that we only store a single Vertex for each unique \"Set\" of tags." ]
[ "Lock the given region. Does not report failures.", "Obtain the destination hostname for a source host\n\n@param hostName\n@return", "Straight conversion from an ObjectName to a PathAddress.\n\nThere may not necessarily be a Resource at this path address (if that correspond to a pattern) but it must\nmatch a model in the registry.\n\n@param domain the name of the caller's JMX domain\n@param registry the root resource for the management model\n@param name the ObjectName to convert\n\n@return the PathAddress, or {@code null} if no address matches the object name", "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!!!", "Adds a tag to the resource.\n@param key the key for the tag\n@param value the value for the tag\n@return the next stage of the definition/update", "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", "Determines whether there is an element of the collection that evaluates to true\nfor the predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tTrue if there is an element of the collection that evaluates to true\nfor the predicate, otherwise false.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "Validate JUnit4 presence in a concrete version.", "Acquires a write 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." ]
public static boolean isPartOfRegularEmbedded(String[] keyColumnNames, String column) { return isPartOfEmbedded( column ) && !ArrayHelper.contains( keyColumnNames, column ); }
[ "A regular embedded is an element that it is embedded but it is not a key or a collection.\n\n@param keyColumnNames the column names representing the identifier of the entity\n@param column the column we want to check\n@return {@code true} if the column represent an attribute of a regular embedded element, {@code false} otherwise" ]
[ "Returns all headers with the headers from the Payload\n\n@return All the headers", "Sets up this object to represent an argument that will be set to a\nconstant value.\n\n@param constantValue the constant value.", "Returns a flag indicating if the query given by the parameters should be ignored.\n@return A flag indicating if the query given by the parameters should be ignored.", "Counts the coordinates stored in a single statement for the relevant\nproperty, if they are actually given and valid.\n\n@param statement\n@param itemDocument", "Read the header from the Phoenix file.\n\n@param stream input stream\n@return raw header data", "Use this API to add gslbservice resources.", "Tries to load a property file with the specified name.\n\n@param localizedName the name\n@return the resource bundle if it was loaded, otherwise the backup", "Consumer is required to do any privilege checks before getting here\n\n@param request a {@link HttpServletRequest} which may contain forced groups parameters from URL, Header or Cookie.\n@return a map of test names to bucket values specified by the request. Returns an empty {@link Map} if nothing was specified", "Will auto format the given string to provide support for pickadate.js formats." ]
public void forAllForeignkeys(String template, Properties attributes) throws XDocletException { for (Iterator it = _curTableDef.getForeignkeys(); it.hasNext(); ) { _curForeignkeyDef = (ForeignkeyDef)it.next(); generate(template); } _curForeignkeyDef = null; }
[ "Processes the template for all foreignkeys of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"" ]
[ "Get the maximum width and height of the labels.\n\n@param settings Parameters for rendering the scalebar.", "Gets id of a link and creates the new one if necessary.\n\n@param linkName name of the link.\n@param allowCreate if set to true and if there is no link named as linkName,\ncreate the new id for the linkName.\n@return < 0 if there is no such link and create=false, else id of the link", "checks whether the specified Object obj is read-locked by Transaction tx.\n@param tx the transaction\n@param obj the Object to be checked\n@return true if lock exists, else false", "Use this API to add dbdbprofile resources.", "Helper to read an optional Boolean value.\n@param path The XML path of the element to read.\n@return The Boolean value stored in the XML, or <code>null</code> if the value could not be read.", "Add a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param newHash the new hash of the added content\n@return the builder", "Function to perform forward activation", "Use this API to fetch systemsession resource of given name .", "Sort by time bucket, then backup count, and by compression state." ]
protected Violation createViolation(Integer lineNumber, String sourceLine, String message) { Violation violation = new Violation(); violation.setRule(this); violation.setSourceLine(sourceLine); violation.setLineNumber(lineNumber); violation.setMessage(message); return violation; }
[ "Create and return a new Violation for this rule and the specified values\n@param lineNumber - the line number for the violation; may be null\n@param sourceLine - the source line for the violation; may be null\n@param message - the message for the violation; may be null\n@return a new Violation object" ]
[ "Return a copy of the new fragment and set the variable above.", "This method is called if the data set has been changed. Subclasses might want to override\nthis method to add some extra logic.\n\nGo through all items in the list:\n- reuse the existing views in the list\n- add new views in the list if needed\n- trim the unused views\n- request re-layout\n\n@param preferableCenterPosition the preferable center position. If it is -1 - keep the\ncurrent center position.", "Returns the u component of a coordinate from a texture coordinate set.\n\n@param vertex the vertex index\n@param coords the texture coordinate set\n@return the u component", "Process hours in a working day.\n\n@param calendar project calendar\n@param dayRecord working day data", "Notifies that a header item is changed.\n\n@param position the position.", "Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment", "Returns an English label for a given datatype.\n\n@param datatype\nthe datatype to label\n@return the label", "Returns an iterator over the items in this folder.\n\n@return an iterator over the items in this folder.", "Create a JsonParser for a given json node.\n@param jsonNode the json node\n@return the json parser\n@throws IOException" ]
public synchronized static <D extends Dao<T, ?>, T> D lookupDao(ConnectionSource connectionSource, Class<T> clazz) { if (connectionSource == null) { throw new IllegalArgumentException("connectionSource argument cannot be null"); } ClassConnectionSource key = new ClassConnectionSource(connectionSource, clazz); Dao<?, ?> dao = lookupDao(key); @SuppressWarnings("unchecked") D castDao = (D) dao; return castDao; }
[ "Helper method to lookup a DAO if it has already been associated with the class. Otherwise this returns null." ]
[ "Returns the currently scheduled job description identified by the given id.\n\n@param id the job id\n\n@return a job or <code>null</code> if not found", "Private helper method which decodes the Stitch error from the body of an HTTP `Response`\nobject. If the error is successfully decoded, this function will throw the error for the end\nuser to eventually consume. If the error cannot be decoded, this is likely not an error from\nthe Stitch server, and this function will return an error message that the calling function\nshould use as the message of a StitchServiceException with an unknown code.", "Returns the value of the element with the minimum value\n@param A (Input) Matrix. Not modified.\n@return scalar", "Resets the text box by removing its content and resetting visual state.", "Set the value for a floating point 4x4 matrix.\n@param key name of uniform to set.\n@see #getFloatVec(String)", "Get the raw data bytes of the device update packet.\n\n@return the data sent by the device to update its status", "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", "Reads an argument of type \"nstring\" from the request.", "Add the list with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The list of all bundles to add." ]
public Collection<Photocount> getCounts(Date[] dates, Date[] takenDates) throws FlickrException { List<Photocount> photocounts = new ArrayList<Photocount>(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_COUNTS); if (dates == null && takenDates == null) { throw new IllegalArgumentException("You must provide a value for either dates or takenDates"); } if (dates != null) { List<String> dateList = new ArrayList<String>(); for (int i = 0; i < dates.length; i++) { dateList.add(String.valueOf(dates[i].getTime() / 1000L)); } parameters.put("dates", StringUtilities.join(dateList, ",")); } if (takenDates != null) { List<String> takenDateList = new ArrayList<String>(); for (int i = 0; i < takenDates.length; i++) { takenDateList.add(String.valueOf(takenDates[i].getTime() / 1000L)); } parameters.put("taken_dates", StringUtilities.join(takenDateList, ",")); } Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element photocountsElement = response.getPayload(); NodeList photocountNodes = photocountsElement.getElementsByTagName("photocount"); for (int i = 0; i < photocountNodes.getLength(); i++) { Element photocountElement = (Element) photocountNodes.item(i); Photocount photocount = new Photocount(); photocount.setCount(photocountElement.getAttribute("count")); photocount.setFromDate(photocountElement.getAttribute("fromdate")); photocount.setToDate(photocountElement.getAttribute("todate")); photocounts.add(photocount); } return photocounts; }
[ "Gets a collection of photo counts for the given date ranges for the calling user.\n\nThis method requires authentication with 'read' permission.\n\n@param dates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@param takenDates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@return A Collection of Photocount objects" ]
[ "Use this API to fetch cmppolicylabel_policybinding_binding resources of given name .", "Retrieve the result produced by a task with the given id in the group.\n\nThis method can be used to retrieve the result of invocation of both dependency\nand \"post-run\" dependent tasks. If task with the given id does not exists then\nIllegalArgumentException exception will be thrown.\n\n@param taskId the task item id\n@return the task result, null will be returned if task has not yet been invoked", "Call the Yahoo! PlaceFinder service for a result.\n\n@param q\nsearch string\n@param maxRows\nmax number of rows in result, or 0 for all\n@param locale\nlocale for strings\n@return list of found results\n@throws Exception\noops\n@see <a\nhref=\"http://developer.yahoo.com/boss/geo/docs/free_YQL.html#table_pf\">Yahoo!\nBoss Geo PlaceFinder</a>", "Retrieves a timestamp from the property data.\n\n@param type Type identifier\n@return timestamp", "Shifts are performed based upon singular values computed previously. If it does not converge\nusing one of those singular values it uses a Wilkinson shift instead.", "Parses the comma delimited address into model nodes.\n\n@param profileName the profile name for the domain or {@code null} if not a domain\n@param inputAddress the address.\n\n@return a collection of the address nodes.", "Description accessor provided for JSON serialization only.", "Used internally to find the solution to a single column vector.", "Write throwable as attachment.\n\n@param throwable to write\n@param title title of attachment\n@return Created {@link ru.yandex.qatools.allure.model.Attachment}" ]
public static hanode_routemonitor_binding[] get(nitro_service service, Long id) throws Exception{ hanode_routemonitor_binding obj = new hanode_routemonitor_binding(); obj.set_id(id); hanode_routemonitor_binding response[] = (hanode_routemonitor_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch hanode_routemonitor_binding resources of given name ." ]
[ "Adds the specified serie column to the dataset with custom label expression.\n\n@param column the serie column\n@param labelExpression column the custom label expression", "Modify the transform's current rotation in quaternion terms, around a\npivot other than the origin.\n\n@param quatW\n'W' component of the rotation quaternion.\n@param quatX\n'X' component of the rotation quaternion.\n@param quatY\n'Y' component of the rotation quaternion.\n@param quatZ\n'Z' component of the rotation quaternion.\n@param pivotX\n'X' component of the pivot's location.\n@param pivotY\n'Y' component of the pivot's location.\n@param pivotZ\n'Z' component of the pivot's location.", "Use this API to unset the properties of clusterinstance resource.\nProperties that need to be unset are specified in args array.", "To be used with AutoText class constants ALIGMENT_LEFT, ALIGMENT_CENTER and ALIGMENT_RIGHT\n@param aligment\n@return", "Inserts the specified array into the specified original array at the specified index.\n\n@param original the original array into which we want to insert another array\n@param index the index at which we want to insert the array\n@param inserted the array that we want to insert\n@return the combined array", "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.", "The Maven3Builder class is looking for the PATH+JDK environment variable due to legacy code.\nIn The pipeline flow we need to convert the JAVA_HOME to PATH+JDK in order to reuse the code.", "Always returns the original proxy object that was serialized.\n\n@return the proxy object\n@throws java.io.ObjectStreamException", "Gets the addresses of the child resources under the given resource.\n\n@param context the operation context\n@param registry registry entry representing the resource\n@param resource the current resource\n@param validChildType a single child type to which the results should be limited. If {@code null} the result\nshould include all child types\n@return map where the keys are the child types and the values are a set of child names associated with a type" ]
public static boolean decomposeQR_block_col( final int blockLength , final DSubmatrixD1 Y , final double gamma[] ) { int width = Y.col1-Y.col0; int height = Y.row1-Y.row0; int min = Math.min(width,height); for( int i = 0; i < min; i++ ) { // compute the householder vector if (!computeHouseHolderCol(blockLength, Y, gamma, i)) return false; // apply to rest of the columns in the block rank1UpdateMultR_Col(blockLength,Y,i,gamma[Y.col0+i]); } return true; }
[ "Performs a standard QR decomposition on the specified submatrix that is one block wide.\n\n@param blockLength\n@param Y\n@param gamma" ]
[ "Use this API to update responderpolicy.", "Deletes this collaboration whitelist.", "If the burst mode is on, emit the particles only once.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps", "Creates an attachment from a binary input stream.\nThe content of the stream will be transformed into a Base64 encoded string\n@throws IOException if an I/O error occurs\n@throws java.lang.IllegalArgumentException if mediaType is not binary", "Add a new Corporate GroupId to an organization.\n\n@param credential DbCredential\n@param organizationId String Organization name\n@param corporateGroupId String\n@return Response", "Reads a PEP file from the input stream.\n\n@param is input stream representing a PEP file", "Add a point to this curveFromInterpolationPoints. The method will throw an exception if the point\nis already part of the curveFromInterpolationPoints.\n\n@param time The x<sub>i</sub> in <sub>i</sub> = f(x<sub>i</sub>).\n@param value The y<sub>i</sub> in <sub>i</sub> = f(x<sub>i</sub>).\n@param isParameter If true, then this point is served via {@link #getParameter()} and changed via {@link #getCloneForParameter(RandomVariable[])}, i.e., it can be calibrated.", "Returns all the URL that should be inside the classpath. This includes the jar itself if any.\n\n@throws JqmPayloadException", "Returns a unique file name\n@param baseFileName the requested base name for the file\n@param extension the requested extension for the file\n@param cleanBaseFileName specify if the <code>baseFileName</code> has to be cleaned before being used (i.e. 'jboss-web' should not be cleaned to avoid '-' to become '_')\n@param ancestorFolders specify the ancestor folders for the file (if there's no ancestor folder, just pass 'null' value)\n@return a String representing the unique file generated" ]
public ValueContainer[] getKeyValues(ClassDescriptor cld, Identity oid, boolean convertToSql) throws PersistenceBrokerException { FieldDescriptor[] pkFields = cld.getPkFields(); ValueContainer[] result = new ValueContainer[pkFields.length]; Object[] pkValues = oid.getPrimaryKeyValues(); try { for(int i = 0; i < result.length; i++) { FieldDescriptor fd = pkFields[i]; Object cv = pkValues[i]; if(convertToSql) { // BRJ : apply type and value mapping cv = fd.getFieldConversion().javaToSql(cv); } result[i] = new ValueContainer(cv, fd.getJdbcType()); } } catch(Exception e) { throw new PersistenceBrokerException("Can't generate primary key values for given Identity " + oid, e); } return result; }
[ "Return key Values of an Identity\n@param cld\n@param oid\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException" ]
[ "Calculate the color using the supplied angle.\n\n@param angle The selected color's position expressed as angle (in rad).\n\n@return The ARGB value of the color on the color wheel at the specified\nangle.", "Sets the appropriate headers to response of this request.\n\n@param response The HttpServletResponse response object.", "A package of the specified class will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClass\n@return self", "Update the currency format.\n\n@param properties project properties\n@param decimalSeparator decimal separator\n@param thousandsSeparator thousands separator", "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", "Use this API to apply nspbr6.", "When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command removes all elements in the sorted set between the lexicographical range specified.\n@param lexRange\n@return the number of elements removed.", "Alternative entry point allowing an MPP file to be read from\na user-supplied POI file stream.\n\n@param fs POI file stream\n@return ProjectFile instance\n@throws MPXJException", "This method returns the duplicated certificate mapped to the passed in cert, or\ncreates and returns one if no mapping has yet been performed. If a naked public\nkey has already been mapped that matches the key in the cert, the already mapped\nkeypair will be reused for the mapped cert.\n@param cert\n@return\n@throws CertificateEncodingException\n@throws InvalidKeyException\n@throws CertificateException\n@throws CertificateNotYetValidException\n@throws NoSuchAlgorithmException\n@throws NoSuchProviderException\n@throws SignatureException\n@throws KeyStoreException\n@throws UnrecoverableKeyException" ]
public static base_response update(nitro_service client, nsdiameter resource) throws Exception { nsdiameter updateresource = new nsdiameter(); updateresource.identity = resource.identity; updateresource.realm = resource.realm; updateresource.serverclosepropagation = resource.serverclosepropagation; return updateresource.update_resource(client); }
[ "Use this API to update nsdiameter." ]
[ "Write all state items to the log file.\n\n@param fileRollEvent the event to log", "Alternate version of autoGeneratedKeys.\n@param sql\n@param autoGeneratedKeys\n@return cache key to use.", "Gets all Checkable widgets in the group\n@return list of Checkable widgets", "Get a property as a json array or default.\n\n@param key the property name\n@param defaultValue default", "The document field must not exist in the list provided\n@param rhs The argument - one or more values\n@return PredicateExpression: $nin rhs", "Gets an exception reporting an unexpected XML element.\n\n@param reader a reference to the stream reader.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.", "Set an enterprise duration value.\n\n@param index duration index (1-30)\n@param value duration value", "Sets the target translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining", "Read a text stream into a single string.\n\n@param inputStream\nStream containing text. Will be closed on exit.\n@return The contents, or null on error." ]
public static String getString(byte[] bytes, String encoding) { try { return new String(bytes, encoding); } catch(UnsupportedEncodingException e) { throw new IllegalArgumentException(encoding + " is not a known encoding name.", e); } }
[ "Create a string from bytes using the given encoding\n\n@param bytes The bytes to create a string from\n@param encoding The encoding of the string\n@return The created string" ]
[ "Looks up and returns the value of the given key in the properties file of\nthe currently-selected theme.\n\n@param code Key to look up in the theme properties file.\n@return The value of the code in the current theme properties file, or an\nempty string if the code could not be resolved.", "Reads all sub-categories below the provided category.\n@return The map from the provided category to it's sub-categories in a {@link CmsJspCategoryAccessBean}.", "Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the boolean.\n@return the boolean from the JSON or null if reading the boolean fails.", "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>.", "Write resource assignment.\n\n@param record resource assignment instance\n@throws IOException", "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)", "Builds the mapping table.", "Links the form with an HTML element which can be clicked.\n\n@param form the collection of the input fields\n@return a FormAction\n@see Form", "Formats a double value.\n\n@param number numeric value\n@return Double instance" ]
public @Nullable ChangeEvent<BsonDocument> getUnprocessedEventForDocumentId( final BsonValue documentId ) { final ChangeEvent<BsonDocument> event; nsLock.readLock().lock(); try { event = this.events.get(documentId); } finally { nsLock.readLock().unlock(); } nsLock.writeLock().lock(); try { this.events.remove(documentId); return event; } finally { nsLock.writeLock().unlock(); } }
[ "If there is an unprocessed change event for a particular document ID, fetch it from the\nchange stream listener, and remove it. By reading the event here, we are assuming it will be\nprocessed by the consumer.\n\n@return the latest unprocessed change event for the given document ID, or null if none exists." ]
[ "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", "Initialize the class if this is being called with Spring.", "Creates a map of metadata from json.\n@param jsonObject metadata json object for metadata field in get /files?fileds=,etadata.scope.template response\n@return Map of String as key a value another Map with a String key and Metadata value", "Overridden method always creating a new instance\n\n@param contextual The bean to create\n@param creationalContext The creation context", "Uncheck all items in the list including all sub-items.\n@param list list of CmsTreeItem entries.", "Read a single outline code field extended attribute.\n\n@param entityID parent entity\n@param row field data", "Installs the given set of URIs as the source level URIs. Does not copy the given\nset but uses it directly.", "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", "Check whether the patch can be applied to a given target.\n\n@param condition the conditions\n@param target the target\n@throws PatchingException" ]
public Duration getWork(Date date, TimeUnit format) { ProjectCalendarDateRanges ranges = getRanges(date, null, null); long time = getTotalTime(ranges); return convertFormat(time, format); }
[ "Retrieves the amount of work on a given day, and\nreturns it in the specified format.\n\n@param date target date\n@param format required format\n@return work duration" ]
[ "Returns a string representation of map of chunk id to number of chunks\n\n@return String of map of chunk id to number of chunks", "We have obtained a beat grid for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this beat grid\n@param beatGrid the beat grid which we retrieved", "Called when app's singleton registry has been initialized", "object -> xml\n\n@param object\n@param childClass", "The transaction will be executed with caching enabled. However, all newly cached values will be discarded as soon\nas the transaction is over.\n@since 2.1", "Resolve the single type argument of the given generic interface against\nthe given target class which is assumed to implement the generic interface\nand possibly declare a concrete type for its type variable.\n@param clazz the target class to check against\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved type of the argument, or {@code null} if not resolvable", "Validates that the data structure at position startEndRecord has a field in the expected position\nthat points to the start of the first central directory file, and, if so, that the file\nhas a complete end of central directory record comment at the end.\n\n@param file the file being checked\n@param channel the channel\n@param startEndRecord the start of the end of central directory record\n@param endSig the end of central dir signature\n@return true if it can be confirmed that the end of directory record points to a central directory\nfile and a complete comment is present, false otherwise\n@throws java.io.IOException", "Returns the currently set filters in a map column -> filter.\n\n@return the currently set filters in a map column -> filter.", "Print the lead string followed by centered formatted string. The whole\nlength of the line is 80 chars.\n\nExample:\n\n```java\nprintCenterWithLead(\" *\", \"Hello %s\", \"World\");\n```\n\nwill print something like\n\n```\n* Hello World\n```\n\nNote the above is just a demo, the exact number of whitespace might not be correct.\n\n\n@param lead\nthe lead string\n@param format\nThe string format pattern\n@param args\nThe string format arguments" ]
@Api public static void configureNoCaching(HttpServletResponse response) { // HTTP 1.0 header: response.setHeader(HTTP_EXPIRES_HEADER, HTTP_EXPIRES_HEADER_NOCACHE_VALUE); response.setHeader(HTTP_CACHE_PRAGMA, HTTP_CACHE_PRAGMA_VALUE); // HTTP 1.1 header: response.setHeader(HTTP_CACHE_CONTROL_HEADER, HTTP_CACHE_CONTROL_HEADER_NOCACHE_VALUE); }
[ "Configure the HTTP response to switch off caching.\n\n@param response response to configure\n@since 1.9.0" ]
[ "Get all views from the list content\n@return list of views currently visible", "Copies from buffer to our internal strBufferIndex, expanding the internal buffer if necessary\n@param offset offset in the buffer to start copying from\n@param length length to copy", "Use this API to fetch vpntrafficpolicy_vpnglobal_binding resources of given name .", "Generate a map of UUID values to field types.\n\n@return UUID field value map", "Cosine interpolation.\n\n@param x1 X1 Value.\n@param x2 X2 Value.\n@param a Value.\n@return Value.", "Use this API to add linkset.", "fetch correct array index if index is less than 0\n\nArrayNode will convert all negative integers into 0...\n\n@param index wanted index\n@return {@link Integer} new index", "Read the header data for a single file.\n\n@param header header data\n@return SynchroTable instance", "Creates a project shared with the given team.\n\nReturns the full record of the newly created project.\n\n@param team The team to create the project in.\n@return Request object" ]
public static transformpolicylabel[] get(nitro_service service) throws Exception{ transformpolicylabel obj = new transformpolicylabel(); transformpolicylabel[] response = (transformpolicylabel[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the transformpolicylabel resources that are configured on netscaler." ]
[ "Show a toast-like message for the specified duration\n\n@param message\n@param duration in seconds", "Use this API to add snmpmanager resources.", "Get the context for a photo in the group pool.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@param groupId\nThe group ID\n@return The PhotoContext\n@throws FlickrException", "Returns the map from resourcetype names to default timestamp modes.\n@return the map from resourcetype names to default timestamp modes.", "This method writes assignment data to a JSON file.", "Get the response headers for URL, following redirects\n\n@param stringUrl URL to use\n@param followRedirects whether to follow redirects\n@return headers HTTP Headers\n@throws IOException I/O error happened", "Process the graphical indicator data.", "Submits the configured assembly to Transloadit for processing.\n\n@param isResumable boolean value that tells the assembly whether or not to use tus.\n@return {@link AssemblyResponse} the response received from the Transloadit server.\n@throws RequestException if request to Transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.", "Sets the proxy class to be used.\n@param newProxyClass java.lang.Class" ]
public static tmsessionpolicy_binding get(nitro_service service, String name) throws Exception{ tmsessionpolicy_binding obj = new tmsessionpolicy_binding(); obj.set_name(name); tmsessionpolicy_binding response = (tmsessionpolicy_binding) obj.get_resource(service); return response; }
[ "Use this API to fetch tmsessionpolicy_binding resource of given name ." ]
[ "Changes the volume of an existing sound.\n@param volume volume value. Should range from 0 (mute) to 1 (max)", "Sets any application-specific custom fields. The values\nare presented to the application and the iPhone doesn't\ndisplay them automatically.\n\nThis can be used to pass specific values (urls, ids, etc) to\nthe application in addition to the notification message\nitself.\n\n@param key the custom field name\n@param value the custom field value\n@return this", "Another method to force an input string into a fixed width field\nand set it on the right with the left side filled with space ' ' characters.\n\n@param input input string\n@param width required width\n@return formatted string", "Use this API to fetch onlinkipv6prefix resource of given name .", "Deploys application reading resources from specified classpath location\n\n@param applicationName to configure in cluster\n@param classpathLocations where resources are read\n@throws IOException", "Add new control at the end of control bar with specified touch listener.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param properties JSON control specific properties\n@param listener touch listener", "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", "Returns the configured fields of the current field configuration.\n\n@return the configured fields of the current field configuration", "Returns the index of the eigenvalue which has the smallest magnitude.\n\n@return index of the smallest magnitude eigen value." ]
@SuppressWarnings("SameParameterValue") private void sendField(Field field) throws IOException { if (isConnected()) { try { field.write(channel); } catch (IOException e) { logger.warn("Problem trying to write field to dbserver, closing connection", e); close(); throw e; } return; } throw new IOException("sendField() called after dbserver connection was closed"); }
[ "Attempt to send the specified field to the dbserver.\nThis low-level function is available only to the package itself for use in setting up the connection. It was\npreviously also used for sending parts of larger-scale messages, but because that sometimes led to them being\nfragmented into multiple network packets, and Windows rekordbox cannot handle that, full message sending no\nlonger uses this method.\n\n@param field the field to be sent\n\n@throws IOException if the field cannot be sent" ]
[ "Mapping originator.\n\n@param originator the originator\n@return the originator type", "Create parameter converters from methods annotated with @AsParameterConverter\n@see {@link AbstractStepsFactory}", "Reads primary key information from current RS row and generates a\n\ncorresponding Identity, and returns a proxy from the Identity.\n\n@throws PersistenceBrokerException\nif there was an error creating the proxy class", "Returns the parsed story from the given text\n\n@param configuration the Configuration used to run story\n@param storyAsText the story text\n@param storyId the story Id, which will be returned as story path\n@return The parsed Story", "Render the scalebar.\n\n@param mapContext The context of the map for which the scalebar is created.\n@param scalebarParams The scalebar parameters.\n@param tempFolder The directory in which the graphic file is created.\n@param template The template that containts the scalebar processor", "Return the equivalence class of the argument. If the argument is not contained in\nand equivalence class, then an empty string is returned.\n\n@param punc\n@return The class name if found. Otherwise, an empty string.", "Generates the routing Java source code", "Decode long from byte array at offset\n\n@param ba byte array\n@param offset Offset\n@return long value", "create partitions in the broker\n\n@param topic topic name\n@param partitionNum partition numbers\n@param enlarge enlarge partition number if broker configuration has\nsetted\n@return partition number in the broker\n@throws IOException if an I/O error occurs" ]
public static BMatrixRMaj elementLessThan(DMatrixRMaj A , double value , BMatrixRMaj output ) { if( output == null ) { output = new BMatrixRMaj(A.numRows,A.numCols); } output.reshape(A.numRows, A.numCols); int N = A.getNumElements(); for (int i = 0; i < N; i++) { output.data[i] = A.data[i] < value; } return output; }
[ "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" ]
[ "Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler.", "Defers an event for processing in a later phase of the current\ntransaction.\n\n@param metadata The event object", "Initialize the random generator with a seed.", "Build the tree of joins for the given criteria", "Given a year, month, and day, find the number of occurrences of that day in the month\n\n@param year the year\n@param month the month\n@param day the day\n@return the number of occurrences of the day in the month", "Delete a module from Grapes server\n\n@param name\n@param version\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Convert a name into initials.\n\n@param name source name\n@return initials", "Get a property as a string or throw an exception.\n\n@param key the property name", "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" ]
public static void writeObject(File file, Object object) throws IOException { FileOutputStream fileOut = new FileOutputStream(file); ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(fileOut)); try { out.writeObject(object); out.flush(); // Force sync fileOut.getFD().sync(); } finally { IoUtils.safeClose(out); } }
[ "To store an object in a quick & dirty way." ]
[ "Two stage distribution, dry run and actual promotion to verify correctness.\n\n@param distributionBuilder\n@param client\n@param listener\n@param buildName\n@param buildNumber\n@throws IOException", "1-D Integer array to double array.\n\n@param array Integer array.\n@return Double array.", "Bind a prepared statment that represents a call to a procedure or\nuser-defined function.\n\n@param stmt the statement to bind.\n@param cld the class descriptor of the object that triggered the\ninvocation of the procedure or user-defined function.\n@param obj the object that triggered the invocation of the procedure\nor user-defined function.\n@param proc the procedure descriptor that provides information about\nthe arguments that shoudl be passed to the procedure or\nuser-defined function", "Returns redirect information for the given ID\n\n@param id ID of redirect\n@return ServerRedirect\n@throws Exception exception", "Set a bean in the context.\n\n@param name bean name\n@param object bean value", "Use this API to fetch all the gslbsite resources that are configured on netscaler.", "Configs created by this ConfigBuilder will have the given Redis hostname.\n\n@param host the Redis hostname\n@return this ConfigBuilder", "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", "Processes a runtime procedure argument tag.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the procedure as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the procedure\"\[email protected] name=\"field-ref\" optional=\"true\" description=\"Identifies the field that provides the value\nif a runtime argument; if not set, then null is used\"\[email protected] name=\"name\" optional=\"false\" description=\"The identifier of the argument tag\"\[email protected] name=\"return\" optional=\"true\" description=\"Whether this is a return value (if a runtime argument)\"\nvalues=\"true,false\"\[email protected] name=\"value\" optional=\"false\" description=\"The value if a constant argument\"" ]
public static <T, A extends Annotation> String getClassAnnotationValue(Class<T> classType, Class<A> annotationType, String attributeName) { String value = null; Annotation annotation = classType.getAnnotation(annotationType); if (annotation != null) { try { value = (String) annotation.annotationType().getMethod(attributeName).invoke(annotation); } catch (Exception ex) {} } return value; }
[ "Get the value of a Annotation in a class declaration.\n@param classType\n@param annotationType\n@param attributeName\n@return the value of the annotation as String or null if something goes wrong" ]
[ "Use this API to disable nsacl6 resources of given names.", "Use this API to fetch all the appfwlearningsettings resources that are configured on netscaler.", "Clears the proxy. A cleared proxy is defined as loaded\n\n@see Collection#clear()", "Creates the project used to import module resources and sets it on the CmsObject.\n\n@param cms the CmsObject to set the project on\n@param module the module\n@return the created project\n@throws CmsException if something goes wrong", "Checks whether the given set of properties is available.\n\n@param keys the keys to check\n@return true if all properties are available, false otherwise", "depth- first search for any module - just to check that the suggestion has any chance of delivering correct result", "Remove the listener active in this session.\n\n@param listenerId the id of the listener to remove", "Find the earliest start time of the specified methods.\n@param methods A list of test methods.\n@return The earliest start time.", "Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges" ]
private Map<Integer, Integer> getNodeIdToZonePrimaryCount(Cluster cluster, StoreRoutingPlan storeRoutingPlan) { Map<Integer, Integer> nodeIdToZonePrimaryCount = Maps.newHashMap(); for(Integer nodeId: cluster.getNodeIds()) { nodeIdToZonePrimaryCount.put(nodeId, storeRoutingPlan.getZonePrimaryPartitionIds(nodeId).size()); } return nodeIdToZonePrimaryCount; }
[ "Go through all partition IDs and determine which node is \"first\" in the\nreplicating node list for every zone. This determines the number of\n\"zone primaries\" each node hosts.\n\n@return map of nodeId to number of zone-primaries hosted on node." ]
[ "Send JSON representation of a data object to all connections of a certain user\n\n@param data the data to be sent\n@param username the username\n@return this context", "Prints a suggestion to stderr for the argument based on the levenshtein distance metric\n\n@param arg the argument which could not be assigned to a flag\n@param co the {@link ConfigOption} List where every flag is stored", "Takes a numeric string value and converts it to a integer between 0 and 100.\n\nreturns 0 if the string is not numeric.\n\n@param percentage - A numeric string value\n@return a integer between 0 and 100", "Transfer the ownership of an application to another user.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param to Username of the person to transfer the app to. This is usually in the form of \"[email protected]\".", "returns a collection of Reader LockEntries for object obj.\nIf now LockEntries could be found an empty Vector is returned.", "Use this API to fetch authenticationradiusaction resource of given name .", "Create a forward curve from given times and discount factors.\n\nThe forward curve will have times.length-1 fixing times from times[0] to times[times.length-2]\n<code>\nforward[timeIndex] = (givenDiscountFactors[timeIndex]/givenDiscountFactors[timeIndex+1]-1.0) / (times[timeIndex+1] - times[timeIndex]);\n</code>\nNote: If time[0] &gt; 0, then the discount factor 1.0 will inserted at time 0.0\n\n@param name The name of this curve.\n@param times A vector of given time points.\n@param givenDiscountFactors A vector of given discount factors (corresponding to the given time points).\n@param paymentOffset The maturity of the underlying index modeled by this curve.\n@return A new ForwardCurve object.", "Moves a calendar to the last named day of the month.\n\n@param calendar current date", "Receive some bytes from the player we are requesting metadata from.\n\n@param is the input stream associated with the player metadata socket.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response" ]
protected SingleBusLocatorRegistrar getRegistrar(Bus bus) { SingleBusLocatorRegistrar registrar = busRegistrars.get(bus); if (registrar == null) { check(locatorClient, "serviceLocator", "registerService"); registrar = new SingleBusLocatorRegistrar(bus); registrar.setServiceLocator(locatorClient); registrar.setEndpointPrefix(endpointPrefix); Map<String, String> endpointPrefixes = new HashMap<String, String>(); endpointPrefixes.put("HTTP", endpointPrefixHttp); endpointPrefixes.put("HTTPS", endpointPrefixHttps); registrar.setEndpointPrefixes(endpointPrefixes); busRegistrars.put(bus, registrar); addLifeCycleListener(bus); } return registrar; }
[ "Retrieves the registar linked to the bus.\nCreates a new registar is not present.\n\n@param bus\n@return" ]
[ "Main method to start reading the plain text given by the client\n\n@param args\n, where arg[0] is Beast configuration file (beast.properties)\nand arg[1] is Logger configuration file (logger.properties)\n@throws Exception", "Converts the suggestions from the Solrj format to JSON format.\n\n@param response The SpellCheckResponse object containing the spellcheck results.\n@return The spellcheck suggestions as JSON object or null if something goes wrong.", "Might not fill all of dst.", "Return the discount factor within a given model context for a given maturity.\n@param model The model used as a context (not required for this class).\n@param maturity The maturity in terms of ACT/365 daycount form this curve reference date. Note that this parameter might get rescaled to a different time parameter.\n@see net.finmath.marketdata.model.curves.DiscountCurveInterface#getDiscountFactor(net.finmath.marketdata.model.AnalyticModelInterface, double)", "Creates a new Message from the specified text.", "Convert an MPXJ Duration instance into an integer duration in minutes\nready to be written to an MPX file.\n\n@param properties project properties, used for duration units conversion\n@param duration Duration instance\n@return integer duration in minutes", "Extracts a particular data model instance from a JSON response\nreturned by MediaWiki. The location is described by a list of successive\nfields to use, from the root to the target object.\n\n@param response\nthe API response as returned by MediaWiki\n@param path\na list of fields from the root to the target object\n@return\nthe parsed POJO object\n@throws JsonProcessingException", "Return the list of corporate GroupId prefix configured for an organization.\n\n@param organizationId String Organization name\n@return Response A list of corporate groupId prefix in HTML or JSON", "Read leaf tasks attached to the WBS.\n\n@param id initial WBS ID" ]
protected static PatchElement createRollbackElement(final PatchEntry entry) { final PatchElement patchElement = entry.element; final String patchId; final Patch.PatchType patchType = patchElement.getProvider().getPatchType(); if (patchType == Patch.PatchType.CUMULATIVE) { patchId = entry.getCumulativePatchID(); } else { patchId = patchElement.getId(); } return createPatchElement(entry, patchId, entry.rollbackActions); }
[ "Create a patch element for the rollback patch.\n\n@param entry the entry\n@return the new patch element" ]
[ "Write the domain controller data to an S3 file.\n\n@param data the domain controller data\n@param domainName the name of the directory in the bucket to write the S3 file to\n@throws IOException", "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.", "Get the type created by selecting only a subset of properties from this\ntype. The type must be a map for this to work\n\n@param properties The properties to select\n@return The new type definition", "Returns values aggregated from all the delegates, without overriding\nvalues that already exist.\n\n@return The Map of aggregated values", "only TOP or Bottom", "Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object.", "Release the broker instance.", "Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available", "This method retrieves the data at the given offset and returns\nit as a String, assuming the underlying data is composed of\nsingle byte characters.\n\n@param offset offset of required data\n@return string containing required data" ]
public static nspbr6 get(nitro_service service, String name) throws Exception{ nspbr6 obj = new nspbr6(); obj.set_name(name); nspbr6 response = (nspbr6) obj.get_resource(service); return response; }
[ "Use this API to fetch nspbr6 resource of given name ." ]
[ "Use this API to enable nsacl6 resources of given names.", "Request a database sends a list of UUIDs.\n\n@param count The count of UUIDs.", "Remove control from the control bar. Size of control bar is updated based on new number of\ncontrols.\n@param name name of the control to remove", "Call the Yahoo! PlaceFinder service for a result.\n\n@param q\nsearch string\n@param maxRows\nmax number of rows in result, or 0 for all\n@param locale\nlocale for strings\n@return list of found results\n@throws Exception\noops\n@see <a\nhref=\"http://developer.yahoo.com/boss/geo/docs/free_YQL.html#table_pf\">Yahoo!\nBoss Geo PlaceFinder</a>", "Check position type.\n\n@param type the type\n@return the boolean", "Use this API to fetch appfwpolicy_csvserver_binding resources of given name .", "Log block data.\n\n@param blockIndex current block index\n@param startIndex start index\n@param blockLength length", "Try to link the declaration with the importerService referenced by the ServiceReference,.\nreturn true if they have been link together, false otherwise.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference<S> of S\n@return true if they have been link together, false otherwise.", "Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no\nlonger valid." ]
protected I_CmsSearchDocument appendFieldMappingsFromElementsOnThePage( I_CmsSearchDocument document, CmsObject cms, CmsResource resource, List<String> systemFields) { try { CmsFile file = cms.readFile(resource); CmsXmlContainerPage containerPage = CmsXmlContainerPageFactory.unmarshal(cms, file); CmsContainerPageBean containerBean = containerPage.getContainerPage(cms); if (containerBean != null) { for (CmsContainerElementBean element : containerBean.getElements()) { element.initResource(cms); CmsResource elemResource = element.getResource(); Set<CmsSearchField> mappedFields = getXSDMappingsForPage(cms, elemResource); if (mappedFields != null) { for (CmsSearchField field : mappedFields) { if (!systemFields.contains(field.getName())) { document = appendFieldMapping( document, field, cms, elemResource, CmsSolrDocumentXmlContent.extractXmlContent(cms, elemResource, getIndex()), cms.readPropertyObjects(resource, false), cms.readPropertyObjects(resource, true)); } else { LOG.error( Messages.get().getBundle().key( Messages.LOG_SOLR_ERR_MAPPING_TO_INTERNALLY_USED_FIELD_3, elemResource.getRootPath(), field.getName(), resource.getRootPath())); } } } } } } catch (CmsException e) { // Should be thrown if element on the page does not exist anymore - this is possible, but not necessarily an error. // Hence, just notice it in the debug log. if (LOG.isDebugEnabled()) { LOG.debug(e.getLocalizedMessage(), e); } } return document; }
[ "Adds search fields from elements on a container page to a container page's document.\n@param document The document for the container page\n@param cms The current CmsObject\n@param resource The resource of the container page\n@param systemFields The list of field names for fields where mappings to should be discarded, since these fields are used system internally.\n@return the manipulated document" ]
[ "Returns a collection of all profiles\n\n@return Collection of all Profiles\n@throws Exception exception", "This method writes calendar data to an MSPDI file.\n\n@param project Root node of the MSPDI file", "Inserts a CharSequence value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a CharSequence, or null\n@return this bundler instance to chain method calls", "The keywords to include in the PDF metadata.\n\n@param keywords the keywords of the PDF.", "This method is called to ensure that after a project file has been\nread, the cached unique ID values used to generate new unique IDs\nstart after the end of the existing set of unique IDs.", "Non-blocking call\n\n@param key\n@param value\n@return", "Calculate the finish variance.\n\n@return finish variance", "Gets the invalid message.\n\n@param key the key\n@return the invalid message", "Prioritises the list of step candidates that match a given step.\n\n@param stepAsText\nthe textual step to match\n@param candidates\nthe List of StepCandidate\n@return The prioritised list according to the\n{@link PrioritisingStrategy}." ]
private RawGcsCreationToken put(final GcsRestCreationToken token, ByteBuffer chunk, final boolean isFinalChunk, long timeoutMillis) throws IOException { final int length = chunk.remaining(); HTTPRequest req = createPutRequest(token, chunk, isFinalChunk, timeoutMillis, length); HTTPRequestInfo info = new HTTPRequestInfo(req); HTTPResponse response; try { response = urlfetch.fetch(req); } catch (IOException e) { throw createIOException(info, e); } return handlePutResponse(token, isFinalChunk, length, info, response); }
[ "Write the provided chunk at the offset specified in the token. If finalChunk is set, the file\nwill be closed." ]
[ "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", "Compares two annotated parameters and returns true if they are equal", "A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged\n\nWhen using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field.\n\nA custom field's `type` cannot be updated.\n\nAn enum custom field's `enum_options` cannot be updated with this endpoint. Instead see \"Work With Enum Options\" for information on how to update `enum_options`.\n\nReturns the complete updated custom field record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object", "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", "Registers the parameter for the value formatter for the given variable and puts\nit's implementation in the parameters map.\n@param djVariable\n@param variableName", "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", "Use this API to fetch the statistics of all ipseccounters_stats resources that are configured on netscaler.", "Compute eigenvalues. This is a routine not in ATLAS, but in the original\nLAPACK.", "Notification that the process has become unstable.\n\n@return {@code true} if this is a change in status" ]
public void merge(GVRSkeleton newSkel) { int numBones = getNumBones(); List<Integer> parentBoneIds = new ArrayList<Integer>(numBones + newSkel.getNumBones()); List<String> newBoneNames = new ArrayList<String>(newSkel.getNumBones()); List<Matrix4f> newMatrices = new ArrayList<Matrix4f>(newSkel.getNumBones()); GVRPose oldBindPose = getBindPose(); GVRPose curPose = getPose(); for (int i = 0; i < numBones; ++i) { parentBoneIds.add(mParentBones[i]); } for (int j = 0; j < newSkel.getNumBones(); ++j) { String boneName = newSkel.getBoneName(j); int boneId = getBoneIndex(boneName); if (boneId < 0) { int parentId = newSkel.getParentBoneIndex(j); Matrix4f m = new Matrix4f(); newSkel.getBindPose().getLocalMatrix(j, m); newMatrices.add(m); newBoneNames.add(boneName); if (parentId >= 0) { boneName = newSkel.getBoneName(parentId); parentId = getBoneIndex(boneName); } parentBoneIds.add(parentId); } } if (parentBoneIds.size() == numBones) { return; } int n = numBones + parentBoneIds.size(); int[] parentIds = Arrays.copyOf(mParentBones, n); int[] boneOptions = Arrays.copyOf(mBoneOptions, n); String[] boneNames = Arrays.copyOf(mBoneNames, n); mBones = Arrays.copyOf(mBones, n); mPoseMatrices = new float[n * 16]; for (int i = 0; i < parentBoneIds.size(); ++i) { n = numBones + i; parentIds[n] = parentBoneIds.get(i); boneNames[n] = newBoneNames.get(i); boneOptions[n] = BONE_ANIMATE; } mBoneOptions = boneOptions; mBoneNames = boneNames; mParentBones = parentIds; mPose = new GVRPose(this); mBindPose = new GVRPose(this); mBindPose.copy(oldBindPose); mPose.copy(curPose); mBindPose.sync(); for (int j = 0; j < newSkel.getNumBones(); ++j) { mBindPose.setLocalMatrix(numBones + j, newMatrices.get(j)); mPose.setLocalMatrix(numBones + j, newMatrices.get(j)); } setBindPose(mBindPose); mPose.sync(); updateBonePose(); }
[ "Merge the source skeleton with this one.\nThe result will be that this skeleton has all of its\noriginal bones and all the bones in the new skeleton.\n\n@param newSkel skeleton to merge with this one" ]
[ "Operators which affect the variables to its left and right", "Validate the Combination filter field in Multi configuration jobs", "Use this API to restore appfwprofile.", "Updates the options panel for a special configuration.\n@param gitConfig the git configuration.", "Add a marker so we can recognize this as a metadata archive. I would use the ZipFile comment, but\nthat is not available until Java 7, and Beat Link is supposed to be backwards compatible with Java 6.\nSince we are doing this anyway, we can also provide information about the nature of the cache, and\nhow many metadata entries it contains, which is useful for auto-attachment.\n\n@param trackListEntries the tracks contained in the cache, so we can record the number\n@param playlistId the playlist contained in the cache, or 0 if it is all tracks from the media\n@param zos the stream to which the ZipFile is being written\n\n@throws IOException if there is a problem creating the format entry", "Retrieve the jdbc type for the field descriptor that is related\nto this argument.", "Obtain collection of Parameters from request\n\n@param dataArray request parameters\n@return Map of parameters\n@throws Exception exception", "Finds the first mesh in the given model.\n@param model root of a model loaded by the asset loader.\n@return GVRMesh found or null if model does not contain meshes\n@see #loadMesh(GVRAndroidResource.MeshCallback, GVRAndroidResource, int)", "Remove a partition from the node provided\n\n@param node The node from which we're removing the partition\n@param donatedPartition The partitions to remove\n@return The new node without the partition" ]
public void recordServerGroupResult(final String serverGroup, final boolean failed) { synchronized (this) { if (groups.contains(serverGroup)) { responseCount++; if (failed) { this.failed = true; } DomainControllerLogger.HOST_CONTROLLER_LOGGER.tracef("Recorded group result for '%s': failed = %s", serverGroup, failed); notifyAll(); } else { throw DomainControllerLogger.HOST_CONTROLLER_LOGGER.unknownServerGroup(serverGroup); } } }
[ "Records the result of updating a server group.\n\n@param serverGroup the server group's name. Cannot be <code>null</code>\n@param failed <code>true</code> if the server group update failed;\n<code>false</code> if it succeeded" ]
[ "Restores a trashed folder back to its original location.\n@param folderID the ID of the trashed folder.\n@return info about the restored folder.", "add various getAt and setAt methods for primitive arrays\n@param receiver the receiver class\n@param name the name of the method\n@param args the argument classes", "Starts closing the keyboard when the hits are scrolled.", "Set the depth of the cursor.\nThis is the length of the ray from the origin\nto the cursor.\n@param depth default cursor depth", "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", "Set the ambient light intensity.\n\nThis designates the color of the ambient reflection.\nIt is multiplied by the material ambient color to derive\nthe hue of the ambient reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code ambient_intensity} to control the intensity of ambient light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)", "change server state between OFFLINE_SERVER and NORMAL_SERVER\n\n@param setToOffline True if set to OFFLINE_SERVER", "Test to determine if this is a split task.\n\n@param calendar current calendar\n@param list timephased resource assignment list\n@return boolean flag", "Extracts a particular data model instance from a JSON response\nreturned by MediaWiki. The location is described by a list of successive\nfields to use, from the root to the target object.\n\n@param response\nthe API response as returned by MediaWiki\n@param path\na list of fields from the root to the target object\n@return\nthe parsed POJO object\n@throws JsonProcessingException" ]
protected Element createLineElement(float x1, float y1, float x2, float y2) { HtmlDivLine line = new HtmlDivLine(x1, y1, x2, y2); String color = colorString(getGraphicsState().getStrokingColor()); StringBuilder pstyle = new StringBuilder(50); pstyle.append("left:").append(style.formatLength(line.getLeft())).append(';'); pstyle.append("top:").append(style.formatLength(line.getTop())).append(';'); pstyle.append("width:").append(style.formatLength(line.getWidth())).append(';'); pstyle.append("height:").append(style.formatLength(line.getHeight())).append(';'); pstyle.append(line.getBorderSide()).append(':').append(style.formatLength(line.getLineStrokeWidth())).append(" solid ").append(color).append(';'); if (line.getAngleDegrees() != 0) pstyle.append("transform:").append("rotate(").append(line.getAngleDegrees()).append("deg);"); Element el = doc.createElement("div"); el.setAttribute("class", "r"); el.setAttribute("style", pstyle.toString()); el.appendChild(doc.createEntityReference("nbsp")); return el; }
[ "Create an element that represents a horizntal or vertical line.\n@param x1\n@param y1\n@param x2\n@param y2\n@return the created DOM element" ]
[ "read the prefetchInLimit from Config based on OJB.properties", "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", "Returns formatted version of Iban.\n\n@return A string representing formatted Iban for printing.", "OJB can handle only classes that declare at least one primary key attribute,\nthis method checks this condition.\n\n@param realObject The real object to check\n@throws ClassNotPersistenceCapableException thrown if no primary key is specified for the objects class", "Configure column aliases.", "Creates a ServiceCall from an observable object.\n\n@param observable the observable to create from\n@param <T> the type of the response\n@return the created ServiceCall", "This method lists all tasks defined in the file in a hierarchical\nformat, reflecting the parent-child relationships between them.\n\n@param file MPX file", "Use this API to fetch the statistics of all audit_stats resources that are configured on netscaler.", "Returns the configured extra parameters that should be given to Solr, or the empty string if no parameters are configured.\n@return The configured extra parameters that should be given to Solr, or the empty string if no parameters are configured." ]
private static Data loadLeapSeconds(URL url) throws ClassNotFoundException, IOException { List<String> lines; try (BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), StandardCharsets.UTF_8))) { lines = reader.lines().collect(Collectors.toList()); } List<Long> dates = new ArrayList<>(); List<Integer> offsets = new ArrayList<>(); for (String line : lines) { line = line.trim(); if (line.isEmpty() || line.startsWith("#")) { continue; } Matcher matcher = LEAP_FILE_FORMAT.matcher(line); if (matcher.matches() == false) { throw new StreamCorruptedException("Invalid leap second file"); } dates.add(LocalDate.parse(matcher.group(1)).getLong(JulianFields.MODIFIED_JULIAN_DAY)); offsets.add(Integer.valueOf(matcher.group(2))); } long[] datesData = new long[dates.size()]; int[] offsetsData = new int[dates.size()]; long[] taiData = new long[dates.size()]; for (int i = 0; i < datesData.length; i++) { datesData[i] = dates.get(i); offsetsData[i] = offsets.get(i); taiData[i] = tai(datesData[i], offsetsData[i]); } return new Data(datesData, offsetsData, taiData); }
[ "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" ]
[ "Gets information about a trashed file.\n@param fileID the ID of the trashed file.\n@return info about the trashed file.", "Visits a method instruction. A method instruction is an instruction that\ninvokes a method.\n\n@param opcode\nthe opcode of the type instruction to be visited. This opcode\nis either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or\nINVOKEINTERFACE.\n@param owner\nthe internal name of the method's owner class (see\n{@link Type#getInternalName() getInternalName}).\n@param name\nthe method's name.\n@param desc\nthe method's descriptor (see {@link Type Type}).\n@param itf\nif the method's owner class is an interface.", "Use this API to fetch rewritepolicylabel_rewritepolicy_binding resources of given name .", "Given a BSON document, remove any forbidden fields and return the document. If no changes are\nmade, the original document reference is returned. If changes are made, a cloned copy of the\ndocument with the changes will be returned.\n\n@param document the document from which to remove forbidden fields\n\n@return a BsonDocument without any forbidden fields.", "Processes the template for all column definitions of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Use this API to fetch all the lbvserver resources that are configured on netscaler.", "Parses and removes embedded gallery configuration strings.\n\n@param configuration the configuration string to parse\n\n@return a map containing both the string resulting from removing the embedded configurations, and the embedded configurations as a a map", "Extracts the column of A and copies it into u while computing the magnitude of the\nlargest element and returning it.\n\n<pre>\nu[ (offsetU+row0+i)*2 ] = A.getReal(row0+i,col)\nu[ (offsetU+row0+i)*2 + 1] = A.getImag(row0+i,col)\n</pre>\n\n@param A Complex matrix\n@param row0 First row in A to be copied\n@param row1 Last row in A + 1 to be copied\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U\n@return magnitude of largest element", "Resize and return the image passing the new height and width\n\n@param height\n@param width\n@return" ]
public void shutdown() { final Connection connection; synchronized (this) { if(shutdown) return; shutdown = true; connection = this.connection; if(connectTask != null) { connectTask.shutdown(); } } if (connection != null) { connection.closeAsync(); } }
[ "Shutdown the connection manager." ]
[ "Returns the current revision.", "Utility function to get the current text.", "except for the ones that make the content appear under the system bars.", "Removes the observation that fits the model the worst and recomputes the coefficients.\nThis is done efficiently by using an adjustable solver. Often times the elements with\nthe largest errors are outliers and not part of the system being modeled. By removing them\na more accurate set of coefficients can be computed.", "Helper to read a mandatory String value.\n@param path The XML path of the element to read.\n@return The String value stored in the XML.\n@throws Exception thrown if the value could not be read.", "Loads the SPI backing bean.\n\n@return the instance of MonetaryFormatsSingletonSpi to be used by this singleton.", "Gets the Jaccard distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Jaccard distance between x and y.", "Add an exception to a calendar.\n\n@param parentNode parent node\n@param exception calendar exceptions", "decodes the uriFragment\n\n@param res the resource that contains the feature holder\n@param uriFragment the fragment that should be decoded\n@return the decoded information\n@see LazyURIEncoder#encode(EObject, EReference, INode)" ]
public Collection<Group> getPublicGroups(String userId) throws FlickrException { List<Group> groups = new ArrayList<Group>(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_PUBLIC_GROUPS); parameters.put("user_id", userId); Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element groupsElement = response.getPayload(); NodeList groupNodes = groupsElement.getElementsByTagName("group"); for (int i = 0; i < groupNodes.getLength(); i++) { Element groupElement = (Element) groupNodes.item(i); Group group = new Group(); group.setId(groupElement.getAttribute("nsid")); group.setName(groupElement.getAttribute("name")); group.setAdmin("1".equals(groupElement.getAttribute("admin"))); group.setEighteenPlus(groupElement.getAttribute("eighteenplus").equals("0") ? false : true); groups.add(group); } return groups; }
[ "Get a collection of public groups for the user.\n\nThe groups will contain only the members nsid, name, admin and eighteenplus. If you want the whole group-information, you have to call\n{@link com.flickr4java.flickr.groups.GroupsInterface#getInfo(String)}.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The public groups\n@throws FlickrException" ]
[ "Seeks to the given holiday within the given year\n\n@param holidayString\n@param yearString", "Convenience routine to move to the next iterator if needed.\n@return true if the iterator is changed, false if no changes.", "Default implementation returns unmodified original Query\n\n@see org.apache.ojb.broker.accesslayer.QueryCustomizer#customizeQuery", "Overridden to skip some symbolizers.", "Collapses all parents in a range of indices in the list of parents.\n\n@param startParentPosition The index at which to to start collapsing parents\n@param parentCount The number of parents to collapse", "Start the actual migration. Take the version of the database, get all required migrations and execute them or do\nnothing if the DB is already up to date.\n\nAt the end the underlying database instance is closed.\n\n@throws MigrationException if a migration fails", "Move the SQL value to the next one for version processing.", "Get image ID from imageTag on the current agent.\n\n@param imageTag\n@return", "Use this API to fetch the statistics of all rnatip_stats resources that are configured on netscaler." ]
public Script getScript(int id) { PreparedStatement statement = null; ResultSet results = null; try (Connection sqlConnection = SQLService.getInstance().getConnection()) { statement = sqlConnection.prepareStatement( "SELECT * FROM " + Constants.DB_TABLE_SCRIPT + " WHERE id = ?" ); statement.setInt(1, id); results = statement.executeQuery(); if (results.next()) { return scriptFromSQLResult(results); } } catch (Exception e) { } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (statement != null) { statement.close(); } } catch (Exception e) { } } return null; }
[ "Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null" ]
[ "Obtains the collection of server groups defined for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception", "A safe wrapper to destroy the given resource request.", "Tells you if the ASTNode is a method node for the given name, arity, and return type.\n@param node\nthe node to inspect\n@param methodNamePattern\nthe expected name of the method\n@param numArguments\nthe expected number of arguments, optional\n@param returnType\nthe expected return type, optional\n@return\ntrue if this node is a MethodNode meeting the parameters. false otherwise", "Time since last time the store was swapped\n\n@return Time in milliseconds since the store was swapped", "Compares two vectors and determines if they are numeric equals,\nindependent of its type.\n\n@param vector1\nthe first vector\n@param vector2\nthe second vector\n@return true if the vectors are numeric equals", "lookup current maximum value for a single field in\ntable the given class descriptor was associated.", "Returns the key for the best matching local-specific property version.\n\n@param propertiesMap the \"raw\" property map\n@param key the name of the property to search for\n@param locale the locale to search for\n\n@return the key for the best matching local-specific property version.", "This takes into account scrolling and will be in absolute\ncoordinates where the top left corner of the page is 0,0 but\nthe viewport may be scrolled to something else.", "If the HttpRequest is valid and handled it will be sent upstream, if it cannot be invoked\nthe response will be written back immediately." ]
public static String join(int[] array, String separator) { if (array != null) { StringBuilder buf = new StringBuilder(Math.max(16, (separator.length() + 1) * array.length)); char singleChar = separator.length() == 1 ? separator.charAt(0) : 0; for (int i = 0; i < array.length; i++) { if (i != 0) { if (singleChar != 0) { // More efficient buf.append(singleChar); } else { buf.append(separator); } } buf.append(array[i]); } return buf.toString(); } else { return ""; } }
[ "Joins the given ints using the given separator into a single string.\n\n@return the joined string or an empty string if the int array is null" ]
[ "Calculate power of a complex number.\n\n@param z1 Complex Number.\n@param n Power.\n@return Returns a new complex number containing the power of a specified number.", "Create a new server group for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception", "Returns a new intern odmg-transaction for the current database.", "Uploads a new file to this folder with custom upload parameters.\n\n@param uploadParams the custom upload parameters.\n@return the uploaded file's info.", "Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)", "The Maven3Builder class is looking for the PATH+JDK environment variable due to legacy code.\nIn The pipeline flow we need to convert the JAVA_HOME to PATH+JDK in order to reuse the code.", "Return fallback if first string is null or empty", "Removes the expiration flag.", "Load the given configuration file." ]
public static Mono<Void> waitForCompletion(CloudFoundryClient cloudFoundryClient, Duration completionTimeout, String jobId) { return requestJobV3(cloudFoundryClient, jobId) .filter(job -> JobState.PROCESSING != job.getState()) .repeatWhenEmpty(exponentialBackOff(Duration.ofSeconds(1), Duration.ofSeconds(15), completionTimeout)) .filter(job -> JobState.FAILED == job.getState()) .flatMap(JobUtils::getError); }
[ "Waits for a job V3 to complete\n\n@param cloudFoundryClient the client to use to request job status\n@param completionTimeout the amount of time to wait for the job to complete.\n@param jobId the id of the job\n@return {@code onComplete} once job has completed" ]
[ "Modifies the specified mode and length arrays to combine adjacent modes of the same type, returning the updated index point.", "Read one collection element from the current row of the JDBC result set\n\n@param optionalOwner the collection owner\n@param optionalKey the collection key\n@param persister the collection persister\n@param descriptor the collection aliases\n@param rs the result set\n@param session the session\n@throws HibernateException if an error occurs\n@throws SQLException if an error occurs during the query execution", "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.", "Shuts down a standalone server.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a graceful shutdown\n\n@throws IOException if an error occurs communicating with the server", "This method is used to recreate the hierarchical structure of the\nproject file from scratch. The method sorts the list of all tasks,\nthen iterates through it creating the parent-child structure defined\nby the outline level field.", "Makes the scene object pickable by eyes. However, the object has to be touchable to process\nthe touch events.\n\n@param sceneObject", "Tells you if the given ASTNode is a VariableExpression with the given name.\n@param expression\nany AST Node\n@param pattern\na string pattern to match\n@return\ntrue if the node is a variable with the specified name", "Returns the inverse of a given matrix.\n\n@param matrix A matrix given as double[n][n].\n@return The inverse of the given matrix.", "Returns the complete record for a single section.\n\n@param section The section to get.\n@return Request object" ]
public void fireTaskWrittenEvent(Task task) { if (m_projectListeners != null) { for (ProjectListener listener : m_projectListeners) { listener.taskWritten(task); } } }
[ "This method is called to alert project listeners to the fact that\na task has been written to a project file.\n\n@param task task instance" ]
[ "Return the knot at a given position.\n@param x the position\n@return the knot number, or 1 if no knot found", "Parser for forecast\n\n@param feed\n@return", "Flushes all changes to disk.", "Performs an inline lower Cholesky decomposition on an inner row-major matrix. Only\nthe lower triangular portion of the matrix is read or written to.\n\n@param T Array containing an inner row-major matrix. Modified.\n@param indexT First index of the inner row-major matrix.\n@param n Number of rows and columns of the matrix.\n@return If the decomposition succeeded.", "Use this API to update gslbsite resources.", "Checks if the last argument matches the vararg type.\n@param params\n@param args\n@return -1 if no match, 0 if the last argument is exactly the vararg type and 1 if of an assignable type", "Use this API to add dospolicy resources.", "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.", "Compute costs." ]
public void setScriptText(String scriptText, String language) { GVRScriptFile newScript = new GVRJavascriptScriptFile(getGVRContext(), scriptText); mLanguage = GVRScriptManager.LANG_JAVASCRIPT; setScriptFile(newScript); }
[ "Loads the script from a text string.\n@param scriptText text string containing script to execute.\n@param language language (\"js\" or \"lua\")" ]
[ "Obtain plugin information\n\n@return", "Uploads files from the given file input fields.<p<\n\n@param fields the set of names of fields containing the files to upload\n@param filenameCallback the callback to call with the resulting map from field names to file paths\n@param errorCallback the callback to call with an error message", "Internal initialization.\n@throws ParserConfigurationException", "Returns the error correction codewords for the specified data codewords.\n\n@param codewords the codewords that we need error correction codewords for\n@param ecclen the number of error correction codewords needed\n@return the error correction codewords for the specified data codewords", "Get all info for the specified photo.\n\nThe calling user must have permission to view the photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo Id\n@param secret\nThe optional secret String\n@return The Photo\n@throws FlickrException", "Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment", "Attempt to shutdown the server. As much shutdown as possible will be\ncompleted, even if intermediate errors are encountered.\n\n@throws VoldemortException", "End building the script, adding a return value statement\n@param config the configuration for the script to build\n@param value the value to return\n@return the new {@link LuaScript} instance", "The click handler for the add button." ]
public ParallelTask getTaskFromInProgressMap(String jobId) { if (!inprogressTaskMap.containsKey(jobId)) return null; return inprogressTaskMap.get(jobId); }
[ "Gets the task from in progress map.\n\n@param jobId\nthe job id\n@return the task from in progress map" ]
[ "Return all server groups for a profile\n\n@param profileId ID of profile\n@return collection of ServerGroups for a profile", "Check if the current version match the last release or the last snapshot one\n\n@param artifact\n@return boolean", "Creates SLD rules for each old style.", "Reads the categories assigned to a resource.\n\n@return map from the resource path (root path) to the assigned categories", "Requests the waveform detail for a specific track ID, given a connection to a player that has already been\nset up.\n\n@param rekordboxId the track whose waveform detail is desired\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved waveform detail, or {@code null} if none was available\n@throws IOException if there is a communication problem", "Find Flickr Places information by Place URL.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link PlacesInterface#getInfoByUrl(String)} instead.\n@param flickrPlacesUrl\n@return A Location\n@throws FlickrException", "Close the ClientRequestExecutor.", "Check if all cluster objects in the list are congruent.\n\n@param clusterUrls of cluster objects\n@return", "Old SOAP client uses new SOAP service" ]
public static String getSimpleClassName(String className) { // get the last part of the class name String[] parts = className.split("\\."); if (parts.length <= 1) { return className; } else { return parts[parts.length - 1]; } }
[ "Return the single class name from a class-name string." ]
[ "Extract the generic type from the given Class object.\n@param clazz the Class to check\n@param source the expected raw source type (can be {@code null})\n@param typeIndex the index of the actual type argument\n@param nestingLevel the nesting level of the target type\n@param currentLevel the current nested level\n@return the generic type as Class, or {@code null} if none", "Main entry point used to determine the format used to write\ncalendar exceptions.\n\n@param calendar parent calendar\n@param dayList list of calendar days\n@param exceptions list of exceptions", "Get the Operation metadata for a single operation on an MBean by name.\n@param operationName the Operation name (can be URL-encoded).\n@return the {@link MBeanOperationInfo} for the operation.\n@throws OperationNotFoundException Method was not found\n@throws UnsupportedEncodingException if the encoding is not supported.", "Remove a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param isDirectory whether the file is a directory or not\n@return the builder", "Rehashes the contents of the receiver into a new table\nwith a smaller or larger capacity.\nThis method is called automatically when the\nnumber of keys in the receiver exceeds the high water mark or falls below the low water mark.", "Send a fader start command to all registered listeners.\n\n@param playersToStart contains the device numbers of all players that should start playing\n@param playersToStop contains the device numbers of all players that should stop playing", "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-", "Create a discount curve from forwards given by a LIBORMonteCarloModel. If the model uses multiple curves, return its discount curve.\n\n@param forwardCurveName name of the forward curve.\n@param model Monte Carlo model providing the forwards.\n@param startTime time at which the curve starts, i.e. zero time for the curve\n@return a discount curve from forwards given by a LIBORMonteCarloModel.\n@throws CalculationException Thrown if the model failed to provide the forward rates.", "Returns the first found autoincrement field\ndefined in this class descriptor. Use carefully\nwhen multiple autoincrement field were defined.\n@deprecated does not make sense because it's possible to\ndefine more than one autoincrement field. Alternative\nsee {@link #getAutoIncrementFields}" ]
public float getBoundsWidth() { if (mSceneObject != null) { GVRSceneObject.BoundingVolume v = mSceneObject.getBoundingVolume(); return v.maxCorner.x - v.minCorner.x; } return 0f; }
[ "Gets Widget bounds width\n@return width" ]
[ "Read an individual Phoenix task relationship.\n\n@param relation Phoenix task relationship", "Send JSON representation of a data object to all connections of a certain user\n\n@param data the data to be sent\n@param username the username\n@return this context", "Token Info\nReturns the Token Information\n@return ApiResponse&lt;TokenInfoSuccessResponse&gt;\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file", "Upload a file and attach it to a task\n\n@param task Globally unique identifier for the task.\n@param fileContent Content of the file to be uploaded\n@param fileName Name of the file to be uploaded\n@param fileType MIME type of the file to be uploaded\n@return Request object", "Publish the changes to main registry", "Delivers the correct JSON Object for the Bounds\n\n@param bounds\n@throws org.json.JSONException", "Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value", "Use this API to fetch all the sslpolicylabel resources that are configured on netscaler." ]
public CollectionRequest<Story> findByTask(String task) { String path = String.format("/tasks/%s/stories", task); return new CollectionRequest<Story>(this, Story.class, path, "GET"); }
[ "Returns the compact records for all stories on the task.\n\n@param task Globally unique identifier for the task.\n@return Request object" ]
[ "Gets the date time str standard.\n\n@param d\nthe d\n@return the date time str standard", "Use this API to unset the properties of snmpmanager resource.\nProperties that need to be unset are specified in args array.", "Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value", "Mark objects no longer available in collection for delete and new objects for insert.\n\n@param broker the PB to persist all objects", "Mark for creation all newly introduced dependent references.\nMark for deletion all nullified dependent references.\n@return the list of created objects", "do delete given object. Should be used by all intern classes to delete\nobjects.", "Gets information about a trashed folder.\n@param folderID the ID of the trashed folder.\n@return info about the trashed folder.", "Set the menu's width in pixels.", "Confirm that all nodes shared between clusters host exact same partition\nIDs and that nodes only in the super set cluster have no partition IDs.\n\n@param subsetCluster\n@param supersetCluster" ]
@Override @SuppressWarnings("unchecked") public ChronoLocalDateTime<AccountingDate> localDateTime(TemporalAccessor temporal) { return (ChronoLocalDateTime<AccountingDate>) super.localDateTime(temporal); }
[ "Obtains a Accounting local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting local date-time, not null\n@throws DateTimeException if unable to create the date-time" ]
[ "Answer the TableAlias for aPath\n@param aPath\n@param hintClasses\n@return TableAlias, null if none", "Deletes the given directory.\n\n@param directory The directory to delete.", "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", "Send a master handoff yield command to all registered listeners.\n\n@param toPlayer the device number to which we are being instructed to yield the tempo master role", "Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for", "Finishes the current box - empties the text line buffer and creates a DOM element from it.", "Create an LBuffer from a given file.\n@param file\n@return\n@throws IOException", "This procedure is invoked to process the \"subst\" Tcl command.\nSee the user documentation for details on what it does.\n\n@param interp the current interpreter.\n@param argv command arguments.\n@exception TclException if wrong # of args or invalid argument(s).", "Adds a file to your assembly but automatically generates the field name of the file.\n\n@param file {@link File} the file to be uploaded." ]
protected ValueContainer[] getNonKeyValues(PersistenceBroker broker, ClassDescriptor cld, Object obj) throws PersistenceBrokerException { return broker.serviceBrokerHelper().getNonKeyRwValues(cld, obj); }
[ "returns an Array with an Objects NON-PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values" ]
[ "Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the width by. value < 1 scales down, and value > one scales up\n@param fHeight What to multiply the height by. value < 1 scales down, and value > one scales up\n@return A scaled image", "Sets the name of the base calendar associated with this task.\nNote that this attribute appears in MPP9 and MSPDI files.\n\n@param calendar calendar instance", "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.", "Lookup a PortComponentMetaData by wsdl-port local part\n\n@param name - the wsdl-port local part\n@return PortComponentMetaData if found, null otherwise", "Use this API to add vpath resources.", "Use this API to unset the properties of inatparam resource.\nProperties that need to be unset are specified in args array.", "Sets the value for the API's \"props\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters", "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.", "Send JSON representation of a data object to all connections of a certain user\n\n@param data the data to be sent\n@param username the username\n@return this context" ]
private void validateSameDay(ProjectCalendar calendar, LinkedList<TimephasedWork> list) { for (TimephasedWork assignment : list) { Date assignmentStart = assignment.getStart(); Date calendarStartTime = calendar.getStartTime(assignmentStart); Date assignmentStartTime = DateHelper.getCanonicalTime(assignmentStart); Date assignmentFinish = assignment.getFinish(); Date calendarFinishTime = calendar.getFinishTime(assignmentFinish); Date assignmentFinishTime = DateHelper.getCanonicalTime(assignmentFinish); double totalWork = assignment.getTotalAmount().getDuration(); if (assignmentStartTime != null && calendarStartTime != null) { if ((totalWork == 0 && assignmentStartTime.getTime() != calendarStartTime.getTime()) || (assignmentStartTime.getTime() < calendarStartTime.getTime())) { assignmentStart = DateHelper.setTime(assignmentStart, calendarStartTime); assignment.setStart(assignmentStart); } } if (assignmentFinishTime != null && calendarFinishTime != null) { if ((totalWork == 0 && assignmentFinishTime.getTime() != calendarFinishTime.getTime()) || (assignmentFinishTime.getTime() > calendarFinishTime.getTime())) { assignmentFinish = DateHelper.setTime(assignmentFinish, calendarFinishTime); assignment.setFinish(assignmentFinish); } } } }
[ "Ensures that the start and end dates for ranges fit within the\nworking times for a given day.\n\n@param calendar current calendar\n@param list assignment data" ]
[ "Retrieve the most recent storepoint.\n\n@param phoenixProject project data\n@return Storepoint instance", "Removes from this set all of its elements that are contained in the specified members array\n@param members the members to remove\n@return the number of members actually removed", "Use this API to enable nsacl6 resources of given names.", "Generates the routing Java source code", "Extracts location result from intent object\n\n@param intent valid intent object\n@return location result.\n@since 1.1.0", "Creates an operation to read a resource.\n\n@param address the address to create the read for\n@param recursive whether to search recursively or not\n\n@return the operation", "Prioritises the list of step candidates that match a given step.\n\n@param stepAsText\nthe textual step to match\n@param candidates\nthe List of StepCandidate\n@return The prioritised list according to the\n{@link PrioritisingStrategy}.", "Creates an attachment from a given array of bytes.\nThe bytes will be Base64 encoded.\n@throws java.lang.IllegalArgumentException if mediaType is not binary", "Reads a combined date and time value expressed in tenths of a minute.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value" ]
public void setBackgroundColor(int colorRes) { if (getBackground() instanceof ShapeDrawable) { final Resources res = getResources(); ((ShapeDrawable) getBackground()).getPaint().setColor(res.getColor(colorRes)); } }
[ "Update the background color of the mBgCircle image view." ]
[ "Adds an EJB descriptor to the maps\n\n@param ejbDescriptor The EJB descriptor to add", "Use this API to fetch the statistics of all protocoludp_stats resources that are configured on netscaler.", "Arrange to become the tempo master. Starts a sequence of interactions with the other players that should end\nup with us in charge of the group tempo and beat alignment.\n\n@throws IllegalStateException if we are not sending status updates\n@throws IOException if there is a problem sending the master yield request", "Use this API to fetch clusternodegroup resource of given name .", "If needed, destroy the remaining conversation contexts after an HTTP session was invalidated within the current request.\n\n@param request", "Logs an error by sending an error event to all listeners.\n\nError events can be generated by any part of GearVRF,\nfrom any thread. They are always sent to the event receiver\nof the GVRContext.\n\n@param message error message\n@param sender object which had the error\n@see IErrorEvents", "Retrieve timephased baseline cost. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present", "Confirms that both clusters have the same number of nodes by comparing\nset of node Ids between clusters.\n\n@param lhs\n@param rhs", "Gets the flags associated with this attribute.\n@return the flags. Will not return {@code null}" ]
public CurrencyQueryBuilder setCountries(Locale... countries) { return set(CurrencyQuery.KEY_QUERY_COUNTRIES, Arrays.asList(countries)); }
[ "Sets the country for which currencies should be requested.\n\n@param countries The ISO countries.\n@return the query for chaining." ]
[ "A convenience method for creating an immutable list\n\n@param self a List\n@return an immutable List\n@see java.util.Collections#unmodifiableList(java.util.List)\n@since 1.0", "Set an enterprise text value.\n\n@param index text index (1-40)\n@param value text value", "Use this API to add autoscaleprofile resources.", "Parses the given XML doc to extract the properties and return them into a java.util.Properties.\n@param doc to parse\n@param sectionName which section to extract\n@return Properties map", "used for encoding queries or form data", "Update max.\n\n@param n the n\n@param c the c", "get string from post stream\n\n@param is\n@param encoding\n@return", "Converts days of the week into a bit field.\n\n@param data recurring data\n@return bit field", "Gets bounds which are identical for all dimensions.\n\n@param dim The number of dimensions.\n@param l The value of all lower bounds.\n@param u The value of all upper bounds.\n@return The new bounds." ]
private String getSubQuerySQL(Query subQuery) { ClassDescriptor cld = getRoot().cld.getRepository().getDescriptorFor(subQuery.getSearchClass()); String sql; if (subQuery instanceof QueryBySQL) { sql = ((QueryBySQL) subQuery).getSql(); } else { sql = new SqlSelectStatement(this, m_platform, cld, subQuery, m_logger).getStatement(); } return sql; }
[ "Convert subQuery to SQL\n@param subQuery the subQuery value of SelectionCriteria" ]
[ "Use this API to fetch authenticationtacacspolicy_authenticationvserver_binding resources of given name .", "Display a Notification message\n@param event", "Use this API to fetch all the autoscaleprofile resources that are configured on netscaler.", "This method extracts resource data from an MSPDI file.\n\n@param project Root node of the MSPDI file\n@param calendarMap Map of calendar UIDs to names", "Check type.\n\n@param type the type\n@return the boolean", "GENERIC!!! HELPER FUNCION FOR REPLACEMENT\n\nupdate the var: DYNAMIC REPLACEMENT of VAR.\n\nEvery task must have matching command data and task result\n\n@param task\nthe task\n@param replaceVarKey\nthe replace var key\n@param replaceVarValue\nthe replace var value", "Computes either the vector p-norm or the induced matrix p-norm depending on A\nbeing a vector or a matrix respectively.\n\n@param A Vector or matrix whose norm is to be computed.\n@param p The p value of the p-norm.\n@return The computed norm.", "Gets the data by id.\n\n@param id the id\n@return the data by id\n@throws IOException Signals that an I/O exception has occurred.", "todo remove, here only for binary compatibility of elytron subsystem, drop once it is in." ]
public void writeTo(Writer destination) { Element eltRuleset = new Element("ruleset"); addAttribute(eltRuleset, "name", name); addChild(eltRuleset, "description", description); for (PmdRule pmdRule : rules) { Element eltRule = new Element("rule"); addAttribute(eltRule, "ref", pmdRule.getRef()); addAttribute(eltRule, "class", pmdRule.getClazz()); addAttribute(eltRule, "message", pmdRule.getMessage()); addAttribute(eltRule, "name", pmdRule.getName()); addAttribute(eltRule, "language", pmdRule.getLanguage()); addChild(eltRule, "priority", String.valueOf(pmdRule.getPriority())); if (pmdRule.hasProperties()) { Element ruleProperties = processRuleProperties(pmdRule); if (ruleProperties.getContentSize() > 0) { eltRule.addContent(ruleProperties); } } eltRuleset.addContent(eltRule); } XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat()); try { serializer.output(new Document(eltRuleset), destination); } catch (IOException e) { throw new IllegalStateException("An exception occurred while serializing PmdRuleSet.", e); } }
[ "Serializes this RuleSet in an XML document.\n\n@param destination The writer to which the XML document shall be written." ]
[ "Set an attribute of this node as Object. This method is backed by\na HashMap, so all rules of HashMap apply to this method.\nFires a PropertyChangeEvent.", "Use this API to create sslfipskey resources.", "Use this API to fetch tmtrafficpolicy_lbvserver_binding resources of given name .", "Retrieves a string value from the extended data.\n\n@param type Type identifier\n@return string value", "Overridden to skip some symbolizers.", "Use this API to update responderpolicy.", "Retrieve list of task extended attributes.\n\n@return list of extended attributes", "Use this API to fetch aaauser_vpntrafficpolicy_binding resources of given name .", "Set the value of a field using its alias.\n\n@param alias field alias\n@param value field value" ]
public void setAttribute(final String name, final Attribute attribute) { if (name.equals(MAP_KEY)) { this.mapAttribute = (MapAttribute) attribute; } }
[ "Set the map attribute.\n\n@param name the attribute name\n@param attribute the attribute" ]
[ "Removes an accessory from being handled or advertised by this root. Any existing Homekit\nconnections will be terminated to allow the clients to reconnect and see the updated accessory\nlist.\n\n@param accessory accessory to cease advertising and handling", "Might not fill all of dst.", "Read a list of fixed sized blocks from the input stream.\n\n@return List of MapRow instances representing the fixed size blocks", "Checks if the provided duration information is valid.\n@return <code>null</code> if the information is valid, the key of the suitable error message otherwise.", "Returns the currently scheduled job description identified by the given id.\n\n@param id the job id\n\n@return a job or <code>null</code> if not found", "Use this API to fetch all the lbroute resources that are configured on netscaler.", "Skip to the next matching short value.\n\n@param buffer input data array\n@param offset start offset into the input array\n@param value value to match\n@return offset of matching pattern", "when divisionPrefixLen is null, isAutoSubnets has no effect", "Read task relationships from a Phoenix file.\n\n@param phoenixProject Phoenix project data" ]
public Replication targetOauth(String consumerSecret, String consumerKey, String tokenSecret, String token) { this.replication = replication.targetOauth(consumerSecret, consumerKey, tokenSecret, token); return this; }
[ "Set OAuth 1 authentication credentials for the replication target\n\n@param consumerSecret client secret\n@param consumerKey client identifier\n@param tokenSecret OAuth server token secret\n@param token OAuth server issued token\n@return this Replication instance to set more options or trigger the replication" ]
[ "Utility function that creates directory.\n\n@param dir Directory path\n@return File object of directory.", "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.", "Sets the duration for the animation to be played.\n\n@param start the animation will start playing from the specified time\n@param end the animation will stop playing at the specified time\n\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code start} is either negative value, greater than\n{@code end} value or {@code end} is greater than duration", "Sets the path of the edited file in the corresponding display.\n@param editedFilePath path of the edited file to set.", "Sum of the elements.\n\n@param data Data.\n@return Sum(data).", "Not used.", "Add a new server group\n\n@param groupName name of the group\n@param profileId ID of associated profile\n@return id of server group\n@throws Exception", "Split a span into two by adding a knot in the middle.\n@param n the span index", "Add a marker so we can recognize this as a metadata archive. I would use the ZipFile comment, but\nthat is not available until Java 7, and Beat Link is supposed to be backwards compatible with Java 6.\nSince we are doing this anyway, we can also provide information about the nature of the cache, and\nhow many metadata entries it contains, which is useful for auto-attachment.\n\n@param trackListEntries the tracks contained in the cache, so we can record the number\n@param playlistId the playlist contained in the cache, or 0 if it is all tracks from the media\n@param zos the stream to which the ZipFile is being written\n\n@throws IOException if there is a problem creating the format entry" ]
private void readContents(int maxFrames) { // Read GIF file content blocks. boolean done = false; while (!(done || err() || header.frameCount > maxFrames)) { int code = read(); switch (code) { // Image separator. case 0x2C: // The graphics control extension is optional, but will always come first if it exists. // If one did // exist, there will be a non-null current frame which we should use. However if one // did not exist, // the current frame will be null and we must create it here. See issue #134. if (header.currentFrame == null) { header.currentFrame = new GifFrame(); } readBitmap(); break; // Extension. case 0x21: code = read(); switch (code) { // Graphics control extension. case 0xf9: // Start a new frame. header.currentFrame = new GifFrame(); readGraphicControlExt(); break; // Application extension. case 0xff: readBlock(); String app = ""; for (int i = 0; i < 11; i++) { app += (char) block[i]; } if (app.equals("NETSCAPE2.0")) { readNetscapeExt(); } else { // Don't care. skip(); } break; // Comment extension. case 0xfe: skip(); break; // Plain text extension. case 0x01: skip(); break; // Uninteresting extension. default: skip(); } break; // Terminator. case 0x3b: done = true; break; // Bad byte, but keep going and see what happens break; case 0x00: default: header.status = GifDecoder.STATUS_FORMAT_ERROR; } } }
[ "Main file parser. Reads GIF content blocks. Stops after reading maxFrames" ]
[ "Renumbers all entity unique IDs.", "Obtains a Discordian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian local date-time, not null\n@throws DateTimeException if unable to create the date-time", "generates a Meta Object Protocol method, that is used to call a non public\nmethod, or to make a call to super.\n\n@param mopCalls list of methods a mop call method should be generated for\n@param useThis true if \"this\" should be used for the naming", "This static method calculated the vega of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The vega of the option", "Adds a filter definition to this project file.\n\n@param filter filter definition", "Write a size prefixed string where the size is stored as a 2 byte\nshort\n\n@param buffer The buffer to write to\n@param s The string to write", "Declaration of the variable within a block", "Static main.\n\n@param args\nProgram arguments.\n@throws IOException\nIf an IO error occurred.", "Gets a SerialMessage with the WAKE_UP_NO_MORE_INFORMATION command.\n@return the serial message" ]
public static int randomIntBetween(int min, int max) { Random rand = new Random(); return rand.nextInt((max - min) + 1) + min; }
[ "Returns an integer between interval\n@param min Minimum value\n@param max Maximum value\n@return int number" ]
[ "Entry point for the example.\n\n@param args Command-line arguments for the example. To use samplemachine.xml from resources, send\nno arguments. To use other file, send a filename without xml extension).", "Copies entries in the source map to target map.\n\n@param source source map\n@param target target map", "Gets the '.disabled' file for a given version of this store. That file may or may not\nexist.\n\n@param version of the store for which to get the '.disabled' file.\n@return an instance of {@link File} pointing to the '.disabled' file.\n@throws PersistenceFailureException if the requested version cannot be found.", "Create a Collection Proxy for a given query.\n\n@param brokerKey The key of the persistence broker\n@param query The query\n@param collectionClass The class to build the proxy for\n@return The collection proxy", "Insert entity object. The caller must first initialize the primary key\nfield.", "Returns the number of days from the given weekday to the next weekday the event should occur.\n@param weekDay the current weekday.\n@return the number of days to the next weekday an event could occur.", "Support the range subscript operator for CharSequence\n\n@param text a CharSequence\n@param range a Range\n@return the subsequence CharSequence\n@since 1.0", "Print duration in tenths of minutes.\n\n@param duration Duration instance\n@return duration in tenths of minutes", "Add the collection of elements to this collection. This will also them to the associated database table.\n\n@return Returns true if any of the items did not already exist in the collection otherwise false." ]
String calculateDisplayTimestamp(long time){ long now = System.currentTimeMillis()/1000; long diff = now-time; if(diff < 60){ return "Just Now"; }else if(diff > 60 && diff < 59*60){ return (diff/(60)) + " mins ago"; }else if(diff > 59*60 && diff < 23*59*60 ){ return diff/(60*60) > 1 ? diff/(60*60) + " hours ago" : diff/(60*60) + " hour ago"; }else if(diff > 24*60*60 && diff < 48*60*60){ return "Yesterday"; }else { @SuppressLint("SimpleDateFormat") SimpleDateFormat sdf = new SimpleDateFormat("dd MMM"); return sdf.format(new Date(time)); } }
[ "Logic for timestamp\n@param time Epoch date of creation\n@return String timestamp" ]
[ "This method allows nested tasks to be added, with the WBS being\ncompleted automatically.\n\n@return new task", "Adds the given property and value to the constructed reference.\n\n@param propertyIdValue\nthe property to add\n@param value\nthe value to add\n@return builder object to continue construction", "Convert this path address to its model node representation.\n\n@return the model node list of properties", "Returns the perma link for the current page based on the URI and detail content id stored in the CmsObject passed as a parameter.<p<\n\n@param cms the CMS context to use to generate the permalink\n\n@return the permalink", "Inserts the result of the migration into the migration table\n\n@param migration the migration that was executed\n@param wasSuccessful indicates if the migration was successful or not", "Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops", "returns all methods not in the group\n\n@param groupId Id of group\n@return List of Methods for a group\n@throws Exception exception", "Creates a new RgbaColor from the specified HSL components.\n\n<p>\n<i>Implementation based on <a\nhref=\"http://en.wikipedia.org/wiki/HSL_and_HSV\">wikipedia</a>\nand <a\nhref=\"http://www.w3.org/TR/css3-color/#hsl-color\">w3c</a></i>\n\n@param H\nHue [0,360)\n@param S\nSaturation [0,100]\n@param L\nLightness [0,100]", "Execute a server task.\n\n@param listener the transactional server listener\n@param task the server task\n@return time to wait in ms for a response from the server, or {@code -1} if the task execution failed locally" ]
@Override public void close() { logger.info("Finished processing."); this.timer.stop(); this.lastSeconds = (int) (timer.getTotalWallTime() / 1000000000); printStatus(); }
[ "Stops the processing and prints the final time." ]
[ "Use this API to fetch filtered set of dospolicy resources.\nset the filter parameter values in filtervalue object.", "scans right to left until max to maintain latest max values for the multi-value property specified by key.\n\n@param key the property key\n@param left original list\n@param right new list\n@param remove if remove new list from original\n@param vr ValidationResult for error and merged list return", "Sets the header of the collection component.", "Restarts a single dyno\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param dynoId the unique identifier of the dyno to restart", "Load the related repositories, plugins and a promotion config associated to the buildId.\nCalled from the UI.\n\n@param buildId - The unique build id.\n@return LoadBuildsResponse e.g. list of repositories, plugins and a promotion config.", "Use this API to add dnsaaaarec resources.", "Acquire a permit for a particular node id so as to allow rebalancing\n\n@param nodeId The id of the node for which we are acquiring a permit\n@return Returns true if permit acquired, false if the permit is already\nheld by someone", "Replaces current Collection mapped to key with the specified Collection.\nUse carefully!", "Write a single resource.\n\n@param mpxj Resource instance" ]
public static callhome get(nitro_service service) throws Exception{ callhome obj = new callhome(); callhome[] response = (callhome[])obj.get_resources(service); return response[0]; }
[ "Use this API to fetch all the callhome resources that are configured on netscaler." ]
[ "Read the data for all of the tables we're interested in.\n\n@param tables list of all available tables\n@param is input stream", "Assigns retention policy with givenID to folder or enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param assignTo object representing folder or enterprise to assign policy to.\n@return info about created assignment.", "Declares additional internal data structures.", "Layout which gets displayed if table is empty.\n\n@see org.opencms.ui.apps.user.I_CmsFilterableTable#getEmptyLayout()", "Function to perform the forward pass for batch convolution", "Adds a clause that checks whether ANY set bits in a bitmask are present\nin a numeric expression.\n\n@param expr\nSQL numeric expression to check.\n@param bits\nInteger containing the bits for which to check.", "Get maximum gray value in the image.\n\n@param fastBitmap Image to be processed.\n@param startX Initial X axis coordinate.\n@param startY Initial Y axis coordinate.\n@param width Width.\n@param height Height.\n@return Maximum gray.", "Get ComponentsMultiThread of current instance\n@return componentsMultiThread", "Extract a Class from the given Type." ]
public void resetResendCount() { this.resendCount = 0; if (this.initializationComplete) this.nodeStage = NodeStage.NODEBUILDINFO_DONE; this.lastUpdated = Calendar.getInstance().getTime(); }
[ "Resets the resend counter and possibly resets the\nnode stage to DONE when previous initialization was\ncomplete." ]
[ "Set text parameters from properties\n@param context Valid Android {@link Context}\n@param properties JSON text properties", "This method is called to format a priority.\n\n@param value priority instance\n@return formatted priority value", "Returns a reference definition of the given name if it exists.\n\n@param name The name of the reference\n@return The reference def or <code>null</code> if there is no such reference", "Transposes an individual block inside a block matrix.", "Print formatted string in the center of 80 chars line, left and right padded.\n\n@param format\nThe string format pattern\n@param args\nThe string format arguments", "Utility function that fetches quota types.", "Add a comment to a photoset. This method requires authentication with 'write' permission.\n\n@param photosetId\nThe id of the photoset to add a comment to.\n@param commentText\nText of the comment\n@return the comment id\n@throws FlickrException", "Not exposed directly - the Query object passed as parameter actually contains results...", "Get the account knowing his position\n@param position the position of the account (it can change at runtime!)\n@return the account" ]
public static double blackModelCapletValue( double forward, double volatility, double optionMaturity, double optionStrike, double periodLength, double discountFactor) { // May be interpreted as a special version of the Black-Scholes Formula return AnalyticFormulas.blackScholesGeneralizedOptionValue(forward, volatility, optionMaturity, optionStrike, periodLength * discountFactor); }
[ "Calculate the value of a caplet assuming the Black'76 model.\n\n@param forward The forward (spot).\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity\n@param optionStrike The option strike.\n@param periodLength The period length of the underlying forward rate.\n@param discountFactor The discount factor corresponding to the payment date (option maturity + period length).\n@return Returns the value of a caplet under the Black'76 model" ]
[ "Prints a few aspects of the TreebankLanguagePack, just for debugging.", "Retrieves a vertex attribute as a float buffer.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>float</i>\n@see #setFloatArray(String, float[])\n@see #getFloatVec(String)", "Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started.", "Record the connection establishment time\n\n@param dest Destination of the socket to connect to. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param connEstTimeUs The number of us to wait before establishing a\nconnection", "Retrieve the finish slack.\n\n@return finish slack", "Checks if request is intended for Gerrit host.", "Apply all attributes on the given context.\n\n@param context the context to be applied, not null.\n@param overwriteDuplicates flag, if existing entries should be overwritten.\n@return this Builder, for chaining", "Retrieve the dir pointed to by 'latest' symbolic-link or the current\nversion dir\n\n@return Current version directory, else null", "Makes object obj persistent in the underlying persistence system.\nE.G. by INSERT INTO ... or UPDATE ... in an RDBMS.\nThe ObjectModification parameter can be used to determine whether INSERT or update is to be used.\nThis functionality is typically called from transaction managers, that\ntrack which objects have to be stored. If the object is an unmaterialized\nproxy the method return immediately." ]
public BoxTaskAssignment.Info addAssignment(BoxUser assignTo) { JsonObject taskJSON = new JsonObject(); taskJSON.add("type", "task"); taskJSON.add("id", this.getID()); JsonObject assignToJSON = new JsonObject(); assignToJSON.add("id", assignTo.getID()); JsonObject requestJSON = new JsonObject(); requestJSON.add("task", taskJSON); requestJSON.add("assign_to", assignToJSON); URL url = ADD_TASK_ASSIGNMENT_URL_TEMPLATE.build(this.getAPI().getBaseURL()); BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST"); request.setBody(requestJSON.toString()); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject responseJSON = JsonObject.readFrom(response.getJSON()); BoxTaskAssignment addedAssignment = new BoxTaskAssignment(this.getAPI(), responseJSON.get("id").asString()); return addedAssignment.new Info(responseJSON); }
[ "Adds a new assignment to this task.\n@param assignTo the user to assign the assignment to.\n@return information about the newly added task assignment." ]
[ "Gets the object whose index is the integer argument.\n\n@param i the integer index to be queried for the corresponding argument\n@return the object whose index is the integer argument.", "Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.", "Get list of replies\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A reply object\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getList.html\">API Documentation</a>", "Creates the given connection pool with the given configuration. Extracted here to make unit mocking easier.\n@param config configuration object.\n@return BoneCP connection pool handle.", "Returns a signed string representation of the given number.\n\n@param number\n@return String for BigDecimal value", "Determines the offset code of a forward contract from a schedule. Rounds the average period length to full months.\n\n@param schedule The schedule.\n@return The offset code as String", "Get a boolean value from the values or null.\n\n@param key the look up key of the value", "Use this API to fetch systemsession resources of given names .", "Use this API to delete sslcertkey resources of given names." ]
private static long daysBetween(Date date1, Date date2) { long diff; if (date2.after(date1)) { diff = date2.getTime() - date1.getTime(); } else { diff = date1.getTime() - date2.getTime(); } return diff / (24 * 60 * 60 * 1000); }
[ "Naive implementation of the difference in days between two dates" ]
[ "Ensure that the node is not null.\n\n@param node the node to ensure to be not null\n@param expression the expression was used to find the node\n@throws SpinXPathException if the node is null", "Converts the positions to a 2D double array\n@return 2d double array [i][j], i=Time index, j=coordinate index", "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", "Return the max bounds of the layer as envelope.\n\n@param layer the layer to get envelope from\n@return Envelope the envelope", "Test a given date for being easter sunday.\n\nThe method uses the algorithms sometimes cited as Meeus,Jones, Butcher Gregorian algorithm.\nTaken from http://en.wikipedia.org/wiki/Computus\n\n@param date The date to check.\n@return True, if date is easter sunday.", "If there are any observer methods, they must be static or business\nmethods.", "Stop offering shared dbserver sessions.", "Close a transaction and do all the cleanup associated with it.", "return null if the operation has no params to validate" ]
public double Function2D(double x, double y) { double frequency = initFrequency; double amplitude = initAmplitude; double sum = 0; // octaves for (int i = 0; i < octaves; i++) { sum += SmoothedNoise(x * frequency, y * frequency) * amplitude; frequency *= 2; amplitude *= persistence; } return sum; }
[ "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." ]
[ "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.", "Transforms an input String into HTML using the given Configuration.\n\n@param input\nThe String to process.\n@param configuration\nThe Configuration.\n@return The processed String.\n@since 0.7\n@see Configuration", "Subtract two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the subtract of specified complex numbers.", "Read an individual GanttProject resource assignment.\n\n@param gpAllocation GanttProject resource assignment.", "Returns an array of non-empty ids from the given list of ids or values.\n\n@param idsOrValues\nlist of ids and/or values\n@return array of non-empty ids", "Return the number of ignored or assumption-ignored tests.", "Expands the cluster to include density-reachable items.\n\n@param cluster Cluster to expand\n@param point Point to add to cluster\n@param neighbors List of neighbors\n@param points the data set\n@param visited the set of already visited points\n@return the expanded cluster", "B = -A. Changes the sign of elements in A and stores it in B. A and B can be the same instance.\n\n@param A (Input) Matrix. Not modified.\n@param B (Output) Matrix. Modified.", "Post the specified photo to a blog.\n\n@param photo\nThe photo metadata\n@param blogId\nThe blog ID\n@throws FlickrException" ]
public static base_responses update(nitro_service client, ntpserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { ntpserver updateresources[] = new ntpserver[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new ntpserver(); updateresources[i].serverip = resources[i].serverip; updateresources[i].servername = resources[i].servername; updateresources[i].minpoll = resources[i].minpoll; updateresources[i].maxpoll = resources[i].maxpoll; updateresources[i].preferredntpserver = resources[i].preferredntpserver; updateresources[i].autokey = resources[i].autokey; updateresources[i].key = resources[i].key; } result = update_bulk_request(client, updateresources); } return result; }
[ "Use this API to update ntpserver resources." ]
[ "Returns details of a previously-requested Organization export.\n\n@param organizationExport Globally unique identifier for the Organization export.\n@return Request object", "Counts the number of elements in A which are not zero.\n@param A A matrix\n@return number of non-zero elements", "Determines whether the current object on the specified level has a specific property, and if so, processes the\ntemplate\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"", "Returns a File object whose path is the expected user directory.\nDoes not create or check for existence.\n@param prefix\n@param suffix\n@param parent\n@return", "We have an OLE compound document... but is it an MPP file?\n\n@param stream file input stream\n@return ProjectFile instance", "This method extracts data for a single calendar from an MSPDI file.\n\n@param calendar Calendar data\n@param map Map of calendar UIDs to names\n@param baseCalendars list of base calendars", "Gets all pending collaboration invites for the current user.\n\n@param api the API connection to use.\n@return a collection of pending collaboration infos.", "Get minimum gray value in the image.\n\n@param fastBitmap Image to be processed.\n@param startX Initial X axis coordinate.\n@param startY Initial Y axis coordinate.\n@param width Width.\n@param height Height.\n@return Minimum gray.", "Adds an additional site link to the constructed document.\n\n@param title\nthe title of the linked page\n@param siteKey\nidentifier of the site, e.g., \"enwiki\"\n@param badges\none or more badges" ]
private ModelNode addLocalHost(final ModelNode address, final List<ModelNode> operationList, final String hostName) { String resolvedHost = hostName != null ? hostName : defaultHostControllerName; // All further operations should modify the newly added host so the address passed in is updated. address.add(HOST, resolvedHost); // Add a step to setup the ManagementResourceRegistrations for the root host resource final ModelNode hostAddOp = new ModelNode(); hostAddOp.get(OP).set(HostAddHandler.OPERATION_NAME); hostAddOp.get(OP_ADDR).set(address); operationList.add(hostAddOp); // Add a step to store the HC name ModelNode nameValue = hostName == null ? new ModelNode() : new ModelNode(hostName); final ModelNode writeName = Util.getWriteAttributeOperation(address, NAME, nameValue); operationList.add(writeName); return hostAddOp; }
[ "Add the operation to add the local host definition." ]
[ "Checks that the modified features exist.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "Returns the orthogonal V matrix.\n\n@param V If not null then the results will be stored here. Otherwise a new matrix will be created.\n@return The extracted Q matrix.", "Calculate the starting content offset based on the layout orientation and Gravity\n@param totalSize total size occupied by the content", "Use this API to fetch lbmonitor_binding resources of given names .", "Obtains a local date in Symmetry454 calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Symmetry454 local date, not null\n@throws DateTimeException if unable to create the date", "Publish finish events for each of the specified query labels\n\n<pre>\n{@code\nLabelledEvents.start(\"get\", 1l, bus, \"typeA\", \"custom\");\ntry {\nreturn \"ok\";\n} finally {\nRequestEvents.finish(\"get\", 1l, bus, \"typeA\", \"custom\");\n}\n\n}\n</pre>\n\n\n@param query Completed query\n@param correlationId Identifier\n@param bus EventBus to post events to\n@param labels Query types to post to event bus", "Writes long strings to output stream as several chunks.\n\n@param stream stream to write to.\n@param str string to be written.\n@throws IOException if something went wrong", "Override for customizing XmlMapper and ObjectMapper", "Use this API to clear nssimpleacl." ]
public double getYield(double bondPrice, AnalyticModel model) { GoldenSectionSearch search = new GoldenSectionSearch(-2.0, 2.0); while(search.getAccuracy() > 1E-11 && !search.isDone()) { double x = search.getNextPoint(); double fx=getValueWithGivenYield(0.0,x,model); double y = (bondPrice-fx)*(bondPrice-fx); search.setValue(y); } return search.getBestPoint(); }
[ "Returns the yield value such that the sum of cash flows of the bond discounted with the yield curve\ncoincides with a given price.\n\n@param bondPrice The target price as double.\n@param model The model under which the product is valued.\n@return The optimal yield value." ]
[ "Flushes this output stream and forces any buffered output bytes to be written out to the stream. If propagate is\ntrue, the wrapped stream will also be flushed.\n\n@param propagate\nboolean flag to indicate whether the wrapped OutputStream should also be flushed.\n@throws IOException\nif an I/O error occurs.", "Bean types of a session bean.", "Specifies the container object class to be instantiated\n\n@param containerObjectClass\ncontainer object class to be instantiated\n\n@return the current builder instance", "Creates a real valued diagonal matrix of the specified type", "List all the environment variables for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return map of config vars", "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.", "If the resource has ordered child types, those child types will be stored in the attachment. If there are no\nordered child types, this method is a no-op.\n\n@param resourceAddress the address of the resource\n@param resource the resource which may or may not have ordered children.", "Controls whether we are currently staying in sync with the tempo master. Will only be meaningful if we are\nsending status packets.\n\n@param sync if {@code true}, our status packets will be tempo and beat aligned with the tempo master", "Get the active overrides with parameters and the active server group for a client\n\n@param profileID Id of profile to get configuration for\n@param clientUUID Client Id to export configuration\n@return SingleProfileBackup containing active overrides and active server group\n@throws Exception exception" ]
private void processKeyValue(Map<ConfigurationKey, Object> properties, ConfigurationKey key, Object value) { if (value instanceof String) { value = key.convertValue((String) value); } if (key.isValidValue(value)) { Object previous = properties.put(key, value); if (previous != null && !previous.equals(value)) { throw ConfigurationLogger.LOG.configurationKeyHasDifferentValues(key.get(), previous, value); } } else { throw ConfigurationLogger.LOG.invalidConfigurationPropertyValue(value, key.get()); } }
[ "Process the given key and value. First validate the value and check if there's no different value for the same key in the same source - invalid and\ndifferent values are treated as a deployment problem.\n\n@param properties\n@param key\n@param value" ]
[ "Create a Vendor from a Func0", "Download a specified URL to a file\n\n@param stringUrl URL to use\n@param parameters HTTP Headers\n@param fileToSave File to save content\n@throws IOException I/O error happened", "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", "Use this API to fetch Interface resource of given name .", "Adds a \"Post Run\" task to the collection.\n\n@param taskItem the \"Post Run\" task", "Use this API to delete ntpserver.", "Get the maximum width and height of the labels.\n\n@param settings Parameters for rendering the scalebar.", "Method to send Request messages to a specific df_service\n\n@param df_service\nThe name of the df_service\n@param msgContent\nThe content of the message to be sent\n@return Message sent to + the name of the df_service", "BuildInteractiveObjectFromAnchor is a special type of interactive object in that it does not get\nbuilt using ROUTE's.\n\n@param anchorSensor is the Sensor that describes the sensor set to an Anchor\n@param anchorDestination is either another Viewpoint, url to a web site or another x3d scene" ]
public ItemRequest<CustomField> updateEnumOption(String enumOption) { String path = String.format("/enum_options/%s", enumOption); return new ItemRequest<CustomField>(this, CustomField.class, path, "PUT"); }
[ "Updates an existing enum option. Enum custom fields require at least one enabled enum option.\n\nReturns the full record of the updated enum option.\n\n@param enumOption Globally unique identifier for the enum option.\n@return Request object" ]
[ "Check type.\n\n@param type the type\n@return the boolean", "Returns the mode in the Collection. If the Collection has multiple modes, this method picks one\narbitrarily.", "Convert an Image into a TYPE_INT_ARGB BufferedImage. If the image is already of this type, the original image is returned unchanged.\n@param image the image to convert\n@return the converted image", "Visit the implicit first frame of this method.", "Use this API to fetch statistics of gslbservice_stats resource of given name .", "Creates a new CRFDatum from the preprocessed allData format, given the\ndocument number, position number, and a List of Object labels.\n\n@return A new CRFDatum", "Determines whether the given documentation part contains the specified tag with the given parameter having the\ngiven value.\n\n@param doc The documentation part\n@param tagName The tag to be searched for\n@param paramName The parameter that the tag is required to have\n@param paramValue The value of the parameter\n@return boolean Whether the documentation part has the tag and parameter", "Appends formatted text to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>", "Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file" ]
public Query getCountQuery(Query aQuery) { if(aQuery instanceof QueryBySQL) { return getQueryBySqlCount((QueryBySQL) aQuery); } else if(aQuery instanceof ReportQueryByCriteria) { return getReportQueryByCriteriaCount((ReportQueryByCriteria) aQuery); } else { return getQueryByCriteriaCount((QueryByCriteria) aQuery); } }
[ "Build a Count-Query based on aQuery\n@param aQuery\n@return The count query" ]
[ "Returns the total number of weights associated with this classifier.\n\n@return number of weights", "Stores template parameters for OpenShiftAssistantTemplate.\n\n@param name template parameter name\n@param value template parameter value", "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-", "Print a duration represented by an arbitrary fraction of minutes.\n\n@param duration Duration instance\n@param factor required factor\n@return duration represented as an arbitrary fraction of minutes", "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", "Use this API to fetch vlan_nsip6_binding resources of given name .", "Handles Multi Instance Encapsulation message. Decapsulates\nan Application Command message and handles it using the right\ninstance.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing.", "Show books.\n\n@param booksList the books list", "Open a new content stream.\n\n@param item the content item\n@return the content stream" ]
public void awaitStartupCompletion() { try { Object obj = startedStatusQueue.take(); if(obj instanceof Throwable) throw new VoldemortException((Throwable) obj); } catch(InterruptedException e) { // this is okay, if we are interrupted we can stop waiting } }
[ "Blocks until the server has started successfully or an exception is\nthrown.\n\n@throws VoldemortException if a problem occurs during start-up wrapping\nthe original exception." ]
[ "Convert the Primavera string representation of a UUID into a Java UUID instance.\n\n@param value Primavera UUID\n@return Java UUID instance", "Use this API to add nsip6 resources.", "Gets all pending collaboration invites for the current user.\n\n@param api the API connection to use.\n@return a collection of pending collaboration infos.", "Adds labels to the item\n\n@param labels\nthe labels to add", "given the groupName, it returns the groupId\n\n@param groupName name of group\n@return ID of group", "Checks whether the compilation has been canceled and reports the given work increment to the compiler progress.", "validates operation against the definition and sets model for the parameters passed.\n\n@param operationObject model node of type {@link ModelType#OBJECT}, typically representing an operation request\n@param model model node in which the value should be stored\n@throws OperationFailedException if the value is not valid\n\n@deprecated Not used by the WildFly management kernel; will be removed in a future release", "Expands the cluster to include density-reachable items.\n\n@param cluster Cluster to expand\n@param point Point to add to cluster\n@param neighbors List of neighbors\n@param points the data set\n@param visited the set of already visited points\n@return the expanded cluster", "Reads, stems, and prints the trees in the file.\n\n@param args Usage: WordStemmer file" ]
public static void writeUnsignedShort(byte[] bytes, int value, int offset) { bytes[offset] = (byte) (0xFF & (value >> 8)); bytes[offset + 1] = (byte) (0xFF & value); }
[ "Write an unsigned short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at" ]
[ "Reads an HTML snippet with the given name.\n\n@return the HTML data", "Converts the given hash code into an index into the\nhash table.", "Wait until a scan of the table completes without seeing notifications AND without the Oracle\nissuing any timestamps during the scan.", "Configure a selector to choose documents that should be added to the index.", "Creates a ClassNode containing the wrapper of a ClassNode\nof primitive type. Any ClassNode representing a primitive\ntype should be created using the predefined types used in\nclass. The method will check the parameter for known\nreferences of ClassNode representing a primitive type. If\nReference is found, then a ClassNode will be contained that\nrepresents the wrapper class. For example for boolean, the\nwrapper class is java.lang.Boolean.\n\nIf the parameter is no primitive type, the redirected\nClassNode will be returned\n\n@see #make(Class)\n@see #make(String)\n@param cn the ClassNode containing a possible primitive type", "Assigns the provided square matrix to be a random Hermitian matrix with elements from min to max value.\n\n@param A The matrix that is to be modified. Must be square. Modified.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.", "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", "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.", "Use this API to delete ntpserver resources." ]
public void setActiveView(View v, int position) { final View oldView = mActiveView; mActiveView = v; mActivePosition = position; if (mAllowIndicatorAnimation && oldView != null) { startAnimatingIndicator(); } invalidate(); }
[ "Set the active view.\nIf the mdActiveIndicator attribute is set, this View will have the indicator drawn next to it.\n\n@param v The active view.\n@param position Optional position, usually used with ListView. v.setTag(R.id.mdActiveViewPosition, position)\nmust be called first." ]
[ "Get the names of all current registered providers.\n\n@return the names of all current registered providers, never null.", "Initialize. create the httpClientStore, tcpClientStore", "Implement the persistence handler for storing the user properties.", "Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file", "Retuns the Windows UNC style path with backslashs intead of forward slashes.\n\n@return The UNC path.", "Remove any device announcements that are so old that the device seems to have gone away.", "Create a Count-Query for ReportQueryByCriteria", "Retrieves a field type from a location in a data block.\n\n@param data data block\n@param offset offset into data block\n@return field type", "Get the status of the upload session. It contains the number of parts that are processed so far,\nthe total number of parts required for the commit and expiration date and time of the upload session.\n@return the status." ]
private GeometryCoordinateSequenceTransformer getTransformer() { if (unitToPixel == null) { unitToPixel = new GeometryCoordinateSequenceTransformer(); unitToPixel.setMathTransform(ProjectiveTransform.create(new AffineTransform(scale, 0, 0, -scale, -scale * panOrigin.x, scale * panOrigin.y))); } return unitToPixel; }
[ "Get transformer to use.\n\n@return transformation to apply" ]
[ "Return a String of length a minimum of totalChars characters by\npadding the input String str at the right end with spaces.\nIf str is already longer\nthan totalChars, it is returned unchanged.", "Gets the publisher wrapped by the specofoed FlexiblePublisher.\n@param publisher The FlexiblePublisher wrapping the publisher.\n@param type The type of the publisher wrapped by the FlexiblePublisher.\n@return The publisher object wrapped by the FlexiblePublisher.\nNull is returned if the FlexiblePublisher does not wrap a publisher of the specified type.\n@throws IllegalArgumentException In case publisher is not of type\n{@link org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher}", "Set OAuth 1 authentication credentials for the replication target\n\n@param consumerSecret client secret\n@param consumerKey client identifier\n@param tokenSecret OAuth server token secret\n@param token OAuth server issued token\n@return this Replication instance to set more options or trigger the replication", "Read a text file into a single string\n\n@param file\nThe file to read\n@return The contents, or null on error.", "Counts a single page of the specified gender. If this is the first page\nof that gender on this site, a suitable key is added to the list of the\nsite's genders.\n\n@param gender\nthe gender to count\n@param siteRecord\nthe site record to count it for", "Initialize the key set for an xml bundle.", "Returns the compact representations of all of the dependencies of a task.\n\n@param task The task to get dependencies on.\n@return Request object", "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.", "Use this API to enable clusterinstance of given name." ]
public <T extends Widget & Checkable> List<T> getCheckableChildren() { List<Widget> children = getChildren(); ArrayList<T> result = new ArrayList<>(); for (Widget c : children) { if (c instanceof Checkable) { result.add((T) c); } } return result; }
[ "Gets all Checkable widgets in the group\n@return list of Checkable widgets" ]
[ "Returns true if the input is a vector\n@param a A matrix or vector\n@return true if it's a vector. Column or row.", "Tests the string edit distance function.", "Register the given callback as to be executed after request completion.\n\n@param name The name of the bean.\n@param callback The callback of the bean to be executed for destruction.", "Determine if a CharSequence can be parsed as a Double.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isDouble(String)\n@since 1.8.2", "Read resource data.", "Generates a set of excluded method names.\n\n@param methodNames method names\n@return set of method names", "Get a list of topics from a group.\n\n@param groupId\nUnique identifier of a group returns a list of topics for a given group {@link Group}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A group topic list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getList.html\">API Documentation</a>", "Processes the template for the comma-separated value pairs in an attribute of the current object on the specified level.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"true\" description=\"The name of the attribute containg attributes (defaults to 'attributes')\"\[email protected] name=\"default-right\" optional=\"true\" description=\"The default right value if none is given (defaults to empty value)\"", "This method is called if the data set has been changed. Subclasses might want to override\nthis method to add some extra logic.\n\nGo through all items in the list:\n- reuse the existing views in the list\n- add new views in the list if needed\n- trim the unused views\n- request re-layout\n\n@param preferableCenterPosition the preferable center position. If it is -1 - keep the\ncurrent center position." ]
protected boolean setChannel(final Channel newChannel) { if(newChannel == null) { return false; } synchronized (lock) { if(state != State.OPEN || channel != null) { return false; } this.channel = newChannel; this.channel.addCloseHandler(new CloseHandler<Channel>() { @Override public void handleClose(final Channel closed, final IOException exception) { synchronized (lock) { if(FutureManagementChannel.this.channel == closed) { FutureManagementChannel.this.channel = null; } lock.notifyAll(); } } }); lock.notifyAll(); return true; } }
[ "Set the channel. This will return whether the channel could be set successfully or not.\n\n@param newChannel the channel\n@return whether the operation succeeded or not" ]
[ "Determine whether the given property matches this element.\nA property matches this element when property name and this key are equal,\nvalues are equal or this element value is a wildcard.\n@param property the property to check\n@return {@code true} if the property matches", "Checks to see if every value in the matrix is the specified value.\n\n@param mat The matrix being tested. Not modified.\n@param val Checks to see if every element in the matrix has this value.\n@param tol True if all the elements are within this tolerance.\n@return true if the test passes.", "Converts this IPv6 address segment into smaller segments,\ncopying them into the given array starting at the given index.\n\nIf a segment does not fit into the array because the segment index in the array is out of bounds of the array,\nthen it is not copied.\n\n@param segs\n@param index", "Use this API to update sslparameter.", "If there is a SubReport on a Group, we do the layout here\n@param columnsGroup\n@param jgroup", "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", "Generates a set of excluded method names.\n\n@param methodNames method names\n@return set of method names", "Handles an incoming request message.\nAn incoming request message is a message initiated by a node or the controller.\n@param incomingMessage the incoming message to process.", "Returns the 'Up' - vector of the camera coordinate system.\n\nThe returned vector is relative to the coordinate space defined by the\ncorresponding node.<p>\n\nThe 'right' vector of the camera coordinate system is the cross product\nof the up and lookAt vectors. The default value is 0|1|0. The vector\nmay be normalized, but it needn't.<p>\n\nThis method is part of the wrapped API (see {@link AiWrapperProvider}\nfor details on wrappers).<p>\n\nThe built-in behavior is to return a {@link AiVector}.\n\n@param wrapperProvider the wrapper provider (used for type inference)\n@return the 'Up' vector" ]
public void populateFromAttributes( @Nonnull final Template template, @Nonnull final Map<String, Attribute> attributes, @Nonnull final PObject requestJsonAttributes) { if (requestJsonAttributes.has(JSON_REQUEST_HEADERS) && requestJsonAttributes.getObject(JSON_REQUEST_HEADERS).has(JSON_REQUEST_HEADERS) && !attributes.containsKey(JSON_REQUEST_HEADERS)) { attributes.put(JSON_REQUEST_HEADERS, new HttpRequestHeadersAttribute()); } for (Map.Entry<String, Attribute> attribute: attributes.entrySet()) { try { put(attribute.getKey(), attribute.getValue().getValue(template, attribute.getKey(), requestJsonAttributes)); } catch (ObjectMissingException | IllegalArgumentException e) { throw e; } catch (Throwable e) { String templateName = "unknown"; for (Map.Entry<String, Template> entry: template.getConfiguration().getTemplates() .entrySet()) { if (entry.getValue() == template) { templateName = entry.getKey(); break; } } String defaults = ""; if (attribute instanceof ReflectiveAttribute<?>) { ReflectiveAttribute<?> reflectiveAttribute = (ReflectiveAttribute<?>) attribute; defaults = "\n\n The attribute defaults are: " + reflectiveAttribute.getDefaultValue(); } String errorMsg = "An error occurred when creating a value from the '" + attribute.getKey() + "' attribute for the '" + templateName + "' template.\n\nThe JSON is: \n" + requestJsonAttributes + defaults + "\n" + e.toString(); throw new AttributeParsingException(errorMsg, e); } } if (template.getConfiguration().isThrowErrorOnExtraParameters()) { final List<String> extraProperties = new ArrayList<>(); for (Iterator<String> it = requestJsonAttributes.keys(); it.hasNext(); ) { final String attributeName = it.next(); if (!attributes.containsKey(attributeName)) { extraProperties.add(attributeName); } } if (!extraProperties.isEmpty()) { throw new ExtraPropertyException("Extra properties found in the request attributes", extraProperties, attributes.keySet()); } } }
[ "Process the requestJsonAttributes using the attributes and the MapfishParser and add all resulting\nvalues to this values object.\n\n@param template the template of the current request.\n@param attributes the attributes that will be used to add values to this values object\n@param requestJsonAttributes the json data for populating the attribute values" ]
[ "Creates a slice for directly a raw memory address. This is\ninherently unsafe as it may be used to access arbitrary memory.\n\n@param address the raw memory address base\n@param size the size of the slice\n@return the unsafe slice", "Returns the start of this resource assignment.\n\n@return start date", "Try to unlink the declaration from the importerService referenced by the ServiceReference,.\nreturn true if they have been cleanly unlink, false otherwise.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference of the ImporterService\n@return true if they have been cleanly unlink, false otherwise.", "Add a custom Log Record Handler to the root of the tree\n@param handler The handler to add\n@return this", "Add the given person to the photo. Optionally, send in co-ordinates\n\n@param photoId\n@param userId\n@param bounds\n@throws FlickrException", "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", "Parses operations where the input comes from variables to its left only. Hard coded to only look\nfor transpose for now\n\n@param tokens List of all the tokens\n@param sequence List of operation sequence", "Set the refresh frequency of this scene object.\nUse NONE for improved performance when the text is set initially and never\nchanged.\n\n@param frequency\nThe refresh frequency of this TextViewSceneObject.", "Convert an Object to a DateTime." ]
private static void checkPreconditions(final String dateFormat, final Locale locale) { if( dateFormat == null ) { throw new NullPointerException("dateFormat should not be null"); } else if( locale == null ) { throw new NullPointerException("locale should not be null"); } }
[ "Checks the preconditions for creating a new ParseDateTimeAbstract processor with date format and locale.\n\n@param dateFormat\nthe date format to use\n@param locale\nthe Locale used to parse the date\n@throws NullPointerException\nif dateFormat or locale is null" ]
[ "Check if one Renderer is recyclable getting it from the convertView's tag and checking the\nclass used.\n\n@param convertView to get the renderer if is not null.\n@param content used to get the prototype class.\n@return true if the renderer is recyclable.", "Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance", "Determine the enum value corresponding to the track type found in the packet.\n\n@return the proper value", "Populate data for analytics.", "Fill the attributes in the processor.\n\n@param processors The processors\n@param initialAttributes The attributes\n@see RequireAttributes\n@see ProvideAttributes", "Confirms a user with the given token and token id.\n\n@param token the confirmation token.\n@param tokenId the id of the confirmation token.\n@return A {@link Task} that completes when confirmation completes/fails.", "Obtain the master partition for a given key\n\n@param key\n@return master partition id", "Converts a Map to an array of objects, adding only those entries whose key is in the nameMapping array.\n\n@param values\nthe Map of values to convert\n@param nameMapping\nthe keys to extract from the Map (elements in the target array will be added in this order)\n@return the array of Objects\n@throws NullPointerException\nif values or nameMapping is null", "Build filter for the request.\n\n@param layerFilter layer filter\n@param featureIds features to include in report (null for all)\n@return filter\n@throws GeomajasException filter could not be parsed/created" ]
public DesignDocument get(String id) { assertNotEmpty(id, "id"); return db.find(DesignDocument.class, ensureDesignPrefix(id)); }
[ "Gets a design document from the database.\n\n@param id the design document id (optionally prefixed with \"_design/\")\n@return {@link DesignDocument}" ]
[ "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", "Returns a new instance of the class with the given qualified name using the constructor with\nthe specified parameter.\n\n@param className The qualified name of the class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance", "Extract task data.", "Sets the number of ms to wait before attempting to obtain a connection again after a failure.\n@param acquireRetryDelay the acquireRetryDelay to set\n@param timeUnit time granularity", "Set a status message in the JTextComponent passed to this\nmodel.\n@param message The message that should be displayed.", "Active inverter colors", "Get the metadata of all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the track information reported by all current players, including any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the MetadataFinder is not running", "Process each regex group matched substring of the given string. If the closure\nparameter takes one argument, an array with all match groups is passed to it.\nIf the closure takes as many arguments as there are match groups, then each\nparameter will be one match group.\n\n@param self the source string\n@param regex a Regex string\n@param closure a closure with one parameter or as much parameters as groups\n@return the source string\n@since 1.6.0", "Add the collection of elements to this collection. This will also them to the associated database table.\n\n@return Returns true if any of the items did not already exist in the collection otherwise false." ]
public double[] sampleToEigenSpace( double[] sampleData ) { if( sampleData.length != A.getNumCols() ) throw new IllegalArgumentException("Unexpected sample length"); DMatrixRMaj mean = DMatrixRMaj.wrap(A.getNumCols(),1,this.mean); DMatrixRMaj s = new DMatrixRMaj(A.getNumCols(),1,true,sampleData); DMatrixRMaj r = new DMatrixRMaj(numComponents,1); CommonOps_DDRM.subtract(s, mean, s); CommonOps_DDRM.mult(V_t,s,r); return r.data; }
[ "Converts a vector from sample space into eigen space.\n\n@param sampleData Sample space data.\n@return Eigen space projection." ]
[ "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", "Initialize dates panel elements.", "Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid", "Fires an event on an element using its identification.\n\n@param eventable The eventable.\n@return true if it is able to fire the event successfully on the element.\n@throws InterruptedException when interrupted during the wait.", "This method writes calendar data to an MSPDI file.\n\n@param project Root node of the MSPDI file", "This creates a new audit log file with default permissions.\n\n@param file File to create", "Use this API to update inat resources.", "Create all the links possible between the Declaration and all the ImporterService matching the.\nImporterServiceFilter of the Linker.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration", "Execute a Runnable on a thread pool thread\n\n@param priority\nThe thread priority. Be careful with this! <blockquote>\n<b>Note:</b> Use Thread.MIN_PRIORITY..Thread.MAX_PRIORITY\n(1..10), <b>not</b> the Process/Linux -20..19 range!\n</blockquote>\n@param threadProc\nThe code to run. It doesn't matter if this code never returns\n- by using spawn (and, hence the thread pool) there is at\nleast a chance that you will be reusing a thread, thus saving\nteardown/startup costs.\n\n@return A Future<?> that lets you wait for thread completion, if\nnecessary" ]
public static void writeCorrelationId(Message message, String correlationId) { if (!(message instanceof SoapMessage)) { return; } SoapMessage soapMessage = (SoapMessage) message; Header hdCorrelationId = soapMessage.getHeader(CORRELATION_ID_QNAME); if (hdCorrelationId != null) { LOG.warning("CorrelationId already existing in soap header, need not to write CorrelationId header."); return; } if ((soapMessage.getContent(javax.xml.stream.XMLStreamWriter.class) != null) && (soapMessage.getContent(javax.xml.stream.XMLStreamWriter.class) instanceof SAAJStreamWriter) && (((SAAJStreamWriter) soapMessage.getContent(javax.xml.stream.XMLStreamWriter.class)) .getDocument() .getElementsByTagNameNS("http://www.talend.com/esb/sam/correlationId/v1", "correlationId").getLength() > 0)) { LOG.warning("CorrelationId already existing in soap header, need not to write CorrelationId header."); return; } try { soapMessage.getHeaders().add( new Header(CORRELATION_ID_QNAME, correlationId, new JAXBDataBinding(String.class))); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Stored correlationId '" + correlationId + "' in soap header: " + CORRELATION_ID_QNAME); } } catch (JAXBException e) { LOG.log(Level.SEVERE, "Couldn't create correlationId header.", e); } }
[ "Write correlation id to message.\n\n@param message the message\n@param correlationId the correlation id" ]
[ "Get a date range that correctly handles the case where the end time\nis midnight. In this instance the end time should be the start of the\nnext day.\n\n@param hours calendar hours\n@param start start date\n@param end end date", "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", "Returns the resource bundle for current Locale, i.e. locale set in the PageComponent.\nAlways create a new instance, this avoids getting the incorrect locale information.\n\n@return resourcebundle for internationalized messages", "Determine which unit to use when creating grid labels.\n\n@param mapCrs the crs of the map, used if the {@link #labelProjection} is not defined.", "the 1st request from the manager.", "Process events in the order as they were received.\n\n<p/>\n\nThe overall time to process the events must be within the bounds of the\ntimeout or an {@link InsufficientOperationalNodesException} will be\nthrown.", "Apply modifications to a content task definition.\n\n@param patchId the patch id\n@param modifications the modifications\n@param definitions the task definitions\n@param filter the content item filter", "Generates the InputValue for the form input by inspecting the current\nvalue of the corresponding WebElement on the DOM.\n\n@return The current InputValue for the element on the DOM.", "Use this API to fetch nstimer_binding resource of given name ." ]
public Task<Void> registerWithEmail(@NonNull final String email, @NonNull final String password) { return dispatcher.dispatchTask( new Callable<Void>() { @Override public Void call() { registerWithEmailInternal(email, password); return null; } }); }
[ "Registers a new user with the given email and password.\n\n@param email the email to register with. This will be the username used during log in.\n@param password the password to associated with the email. The password must be between\n6 and 128 characters long.\n@return A {@link Task} that completes when registration completes/fails." ]
[ "Downloads this version of the file to a given OutputStream while reporting the progress to a ProgressListener.\n@param output the stream to where the file will be written.\n@param listener a listener for monitoring the download's progress.", "Performs an efficient update of each columns' norm", "Does the slice contain only 7-bit ASCII characters.", "Create and serialize a WorkerStatus for a pause event.\n\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus", "Builder method for specifying the name of an app.\n@param name The name to give an app.\n@return A copy of the {@link App}", "at this point definition below is not really needed as it is the same as for 1.1, but it is here as place holder when subsystem parser evolves.", "Determines a histogram of contiguous runs of partitions within a zone.\nI.e., for each run length of contiguous partitions, how many such runs\nare there.\n\nDoes not correctly address \"wrap around\" of partition IDs (i.e., the fact\nthat partition ID 0 is \"next\" to partition ID 'max')\n\n@param cluster\n@param zoneId\n@return map of length of contiguous run of partitions to count of number\nof such runs.", "Creates a date from the equivalent long value. This conversion\ntakes account of the time zone.\n\n@param date date expressed as a long integer\n@return new Date instance", "callers of doLogin should be serialized before calling in." ]
private void readResource(net.sf.mpxj.planner.schema.Resource plannerResource) throws MPXJException { Resource mpxjResource = m_projectFile.addResource(); //mpxjResource.setResourceCalendar(m_projectFile.getBaseCalendarByUniqueID(getInteger(plannerResource.getCalendar()))); mpxjResource.setEmailAddress(plannerResource.getEmail()); mpxjResource.setUniqueID(getInteger(plannerResource.getId())); mpxjResource.setName(plannerResource.getName()); mpxjResource.setNotes(plannerResource.getNote()); mpxjResource.setInitials(plannerResource.getShortName()); mpxjResource.setType(getInt(plannerResource.getType()) == 2 ? ResourceType.MATERIAL : ResourceType.WORK); //plannerResource.getStdRate(); //plannerResource.getOvtRate(); //plannerResource.getUnits(); //plannerResource.getProperties(); ProjectCalendar calendar = mpxjResource.addResourceCalendar(); calendar.setWorkingDay(Day.SUNDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.MONDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.TUESDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.WEDNESDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.THURSDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.FRIDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.SATURDAY, DayType.DEFAULT); ProjectCalendar baseCalendar = m_projectFile.getCalendarByUniqueID(getInteger(plannerResource.getCalendar())); if (baseCalendar == null) { baseCalendar = m_defaultCalendar; } calendar.setParent(baseCalendar); m_eventManager.fireResourceReadEvent(mpxjResource); }
[ "This method extracts data for a single resource from a Planner file.\n\n@param plannerResource Resource data" ]
[ "Initialize the various DAO configurations after the various setters have been called.", "Retrieve a finish date time in the form required by Phoenix.\n\n@param value Date instance\n@return formatted date time", "Set the mesh to be tested against.\n\n@param mesh\nThe {@link GVRMesh} that the picking ray will test against.", "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>", "Creates a new fixed size ThreadPoolExecutor\n\n@param threads\nthe number of threads\n@param groupname\na label to identify the threadpool; useful for profiling.\n@param queueSize\nthe size of the queue to store Runnables when all threads are busy\n@return the new ExecutorService", "Set the menu view from a layout resource.\n\n@param layoutResId Resource ID to be inflated.", "Convert a document List into arrays storing the data features and labels.\n\n@param document\nTraining documents\n@return A Pair, where the first element is an int[][][] representing the\ndata and the second element is an int[] representing the labels", "Checks if the given argument is null and throws an exception with a\nmessage containing the argument name if that it true.\n\n@param argument the argument to check for null\n@param argumentName the name of the argument to check.\nThis is used in the exception message.\n@param <T> the type of the argument\n@return the argument itself\n@throws IllegalArgumentException in case argument is null", "Create a new service activator for the domain server communication services.\n\n@param endpointConfig the endpoint configuration\n@param managementURI the management connection URI\n@param serverName the server name\n@param serverProcessName the server process name\n@param authKey the authentication key\n@param managementSubsystemEndpoint whether to use the mgmt subsystem endpoint or not\n@return the service activator" ]
private boolean containsValue(StatementGroup statementGroup, Value value) { for (Statement s : statementGroup) { if (value.equals(s.getValue())) { return true; } } return false; }
[ "Checks if the given group of statements contains the given value as the\nvalue of a main snak of some statement.\n\n@param statementGroup\nthe statement group to scan\n@param value\nthe value to scan for\n@return true if value was found" ]
[ "Removes the specified type from the frame.", "Use this API to fetch statistics of gslbservice_stats resource of given name .", "Transforms an input file into HTML using the given Configuration.\n\n@param file\nThe File to process.\n@param configuration\nthe Configuration\n@return The processed String.\n@throws IOException\nif an IO error occurs\n@since 0.7\n@see Configuration", "Get the available sizes of a Photo.\n\nThe boolean toggle allows to (api-)sign the call.\n\nThis way the calling user can retrieve sizes for <b>his own</b> private photos.\n\n@param photoId\nThe photo ID\n@param sign\ntoggle to allow optionally signing the call (Authenticate)\n@return A collection of {@link Size}\n@throws FlickrException", "Starts the animation with the given index.\n@param animIndex 0-based index of {@link GVRAnimator} to start;\n@see GVRAvatar#stop()\n@see #start(String)", "Authenticates the API connection by obtaining access and refresh tokens using the auth code that was obtained\nfrom the first half of OAuth.\n@param authCode the auth code obtained from the first half of the OAuth process.", "Set the ambient light intensity.\n\nThis designates the color of the ambient reflection.\nIt is multiplied by the material ambient color to derive\nthe hue of the ambient reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code ambient_intensity} to control the intensity of ambient light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)", "Detects Opera Mobile or Opera Mini.\n@return detection of an Opera browser for a mobile device", "Append the text at the end of the Path.\n\n@param self a Path\n@param text the text to append at the end of the Path\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0" ]
private static TransportType map2TransportType(String transportId) { TransportType type; if (CXF_HTTP_TRANSPORT_ID.equals(transportId) || SOAP_HTTP_TRANSPORT_ID.equals(transportId)) { type = TransportType.HTTP; } else { type = TransportType.OTHER; } return type; }
[ "Maps a transportId to its corresponding TransportType.\n@param transportId\n@return" ]
[ "Get the SuggestionsInterface.\n\n@return The SuggestionsInterface", "Use this API to update snmpuser resources.", "Check that an array only contains elements that are not null.\n@param values, can't be null\n@return", "If a text contains double quotes, escape them.\n\n@param text the text to escape\n@return Escaped text or {@code null} if the text is null", "Use this API to diff nsconfig.", "Accessor method used to retrieve a Float object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Opens the favorite dialog.\n\n@param explorer the explorer instance (null if not currently in explorer)", "Creates a Sink Processor\n\n@param dataSink the data sink itself\n@param parallelism the parallelism of this processor\n@param description the description for this processor\n@param taskConf the configuration for this processor\n@param system actor system\n@return the new created sink processor", "Get the value for a particular configuration property\n\n@param name - name of the property\n@return The first value encountered or null" ]
public CRFDatum<List<String>, CRFLabel> makeDatum(List<IN> info, int loc, edu.stanford.nlp.sequences.FeatureFactory<IN> featureFactory) { pad.set(AnswerAnnotation.class, flags.backgroundSymbol); PaddedList<IN> pInfo = new PaddedList<IN>(info, pad); ArrayList<List<String>> features = new ArrayList<List<String>>(); // for (int i = 0; i < windowSize; i++) { // List featuresC = new ArrayList(); // for (int j = 0; j < FeatureFactory.win[i].length; j++) { // featuresC.addAll(featureFactory.features(info, loc, // FeatureFactory.win[i][j])); // } // features.add(featuresC); // } Collection<Clique> done = new HashSet<Clique>(); for (int i = 0; i < windowSize; i++) { List<String> featuresC = new ArrayList<String>(); List<Clique> windowCliques = FeatureFactory.getCliques(i, 0); windowCliques.removeAll(done); done.addAll(windowCliques); for (Clique c : windowCliques) { featuresC.addAll(featureFactory.getCliqueFeatures(pInfo, loc, c)); //todo useless copy because of typing reasons } features.add(featuresC); } int[] labels = new int[windowSize]; for (int i = 0; i < windowSize; i++) { String answer = pInfo.get(loc + i - windowSize + 1).get(AnswerAnnotation.class); labels[i] = classIndex.indexOf(answer); } printFeatureLists(pInfo.get(loc), features); CRFDatum<List<String>, CRFLabel> d = new CRFDatum<List<String>, CRFLabel>(features, new CRFLabel(labels)); // System.err.println(d); return d; }
[ "Makes a CRFDatum by producing features and a label from input data at a\nspecific position, using the provided factory.\n\n@param info\nThe input data\n@param loc\nThe position to build a datum at\n@param featureFactory\nThe FeatureFactory to use to extract features\n@return The constructed CRFDatum" ]
[ "Set the classpath for loading the driver using the classpath reference.\n\n@param r reference to the classpath", "Retrieve a finish date time in the form required by Phoenix.\n\n@param value Date instance\n@return formatted date time", "Use this API to fetch vpnsessionaction resource of given name .", "Converts from partitionId to nodeId. The list of partition IDs,\npartitionIds, is expected to be a \"replicating partition list\", i.e., the\nmapping from partition ID to node ID should be one to one.\n\n@param partitionIds List of partition IDs for which to find the Node ID\nfor the Node that owns the partition.\n@return List of node ids, one for each partition ID in partitionIds\n@throws VoldemortException If multiple partition IDs in partitionIds map\nto the same Node ID.", "Obtains a Discordian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Initializes communication with the Z-Wave controller stick.", "Add a creatable \"post-run\" dependent for this task item.\n\n@param creatable the creatable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve created \"post-run\" dependent", "Returns the result of a stored procedure executed on the backend.\n\n@param embeddedCacheManager embedded cache manager\n@param storedProcedureName name of stored procedure\n@param queryParameters parameters passed for this query\n@param classLoaderService the class loader service\n\n@return a {@link ClosableIterator} with the result of the query", "Transform the root bone of the pose by the given matrix.\n@param trans matrix to transform the pose by." ]
private void addPropertyCounters(UsageStatistics usageStatistics, PropertyIdValue property) { if (!usageStatistics.propertyCountsMain.containsKey(property)) { usageStatistics.propertyCountsMain.put(property, 0); usageStatistics.propertyCountsQualifier.put(property, 0); usageStatistics.propertyCountsReferences.put(property, 0); } }
[ "Initializes the counters for a property to zero if not done yet.\n\n@param usageStatistics\nstatistics object to initialize\n@param property\nthe property to count" ]
[ "Adds a parameter to the MIMEType.\n\n@param name name of parameter\n@param value value of parameter\n@return returns a new instance with the parameter set", "Returns the list of atlas information necessary to map\nthe texture atlas to each scene object.\n\n@return List of atlas information.", "Read the optional row header and UUID.\n\n@param stream input stream\n@param map row map", "Use this API to export appfwlearningdata.", "public for testing purpose", "Callback when each frame in the indicator animation should be drawn.", "Creates a new ServerDetails object for deployer, this will take URL and name from the oldDeployer ServerDetails", "Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.", "Consumes a produced result. Calls every transformer in sequence, then\ncalls every dataWriter in sequence.\n\n@param initialVars a map containing the initial variables assignments\n@return the number of lines written" ]
public static long access2d(DMatrixRMaj a , DMatrixRMaj b , DMatrixRMaj c ) { long timeBefore = System.currentTimeMillis(); for( int i = 0; i < a.numRows; i++ ) { for( int j = 0; j < b.numCols; j++ ) { c.set(i,j,a.get(i,0)*b.get(0,j)); } for( int k = 1; k < b.numRows; k++ ) { for( int j = 0; j < b.numCols; j++ ) { // c.set(i,j, c.get(i,j) + a.get(i,k)*b.get(k,j)); c.data[i*b.numCols+j] +=a.get(i,k)*b.get(k,j); } } } return System.currentTimeMillis() - timeBefore; }
[ "Only sets and gets that are by row and column are used." ]
[ "Creates a XopBean. The image on the disk is included as a byte array,\na DataHandler and java.awt.Image\n@return the bean\n@throws Exception", "Restores a trashed folder to a new location with a new name.\n@param folderID the ID of the trashed folder.\n@param newName an optional new name to give the folder. This can be null to use the folder's original name.\n@param newParentID an optional new parent ID for the folder. This can be null to use the folder's original\nparent.\n@return info about the restored folder.", "Returns an iterator that iterates over all elements greater or equal to key in ascending order\n\n@param key key\n@return iterator", "Moves the elements contained in \"band\" in the Y axis \"yOffset\"\n@param yOffset\n@param band", "Session connect generate channel.\n\n@param session\nthe session\n@return the channel\n@throws JSchException\nthe j sch exception", "To populate the dropdown list from the jelly", "Returns the red color component of a color from a vertex color set.\n\n@param vertex the vertex index\n@param colorset the color set\n@return the red color component", "Deletes all steps of scenario cases where a data table\nis generated to reduce the size of the data file.\nIn this case only the steps of the first scenario case are actually needed.", "Update the context session to mark a user logged in\n\n@param userIdentifier\nthe user identifier, could be either userId or username" ]
private void gobble(Iterator iter) { if (eatTheRest) { while (iter.hasNext()) { tokens.add(iter.next()); } } }
[ "Adds the remaining tokens to the processed tokens list.\n\n@param iter An iterator over the remaining tokens" ]
[ "Returns the screen width in pixels\n\n@param context is the context to get the resources\n@return the screen width in pixels", "Log a message with a throwable at the provided level.", "The read timeout for the underlying URLConnection to the twitter stream.", "Set the name of the schema containing the Primavera tables.\n\n@param schema schema name.", "Returns the list of atlas information necessary to map\nthe texture atlas to each scene object.\n\n@return List of atlas information.", "Creates a simple, annotation defined Enterprise Web Bean using the annotations specified on type\n\n@param <T> The type\n@param beanManager the current manager\n@param type the AnnotatedType to use\n@return An Enterprise Web Bean", "Add a BETWEEN clause so the column must be between the low and high parameters.", "Add a partition to the node provided\n\n@param node The node to which we'll add the partition\n@param donatedPartition The partition to add\n@return The new node with the new partition", "Used to add working hours to the calendar. Note that the MPX file\ndefinition allows a maximum of 7 calendar hours records to be added to\na single calendar.\n\n@param day day number\n@return new ProjectCalendarHours instance" ]
public ContentAssistContext.Builder copy() { Builder result = builderProvider.get(); result.copyFrom(this); return result; }
[ "Use this context as prototype for a new mutable builder. The new builder is\npre-populated with the current settings of this context instance." ]
[ "Return the basis functions for the regression suitable for this product.\n\n@param fixingDate The condition time.\n@param model The model\n@return The basis functions for the regression suitable for this product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "This method handles submitting and then waiting for the request from the\nserver. It uses the ClientRequest API to actually write the request and\nthen read back the response. This implementation will block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest implementation used to write the\nrequest and read the response\n@param operationName Simple string representing the type of request\n\n@return Data returned by the individual requests", "Get the known locations where the secure keyring can be located.\nLooks through known locations of the GNU PG secure keyring.\n\n@return The location of the PGP secure keyring if it was found,\nnull otherwise", "a small static helper to set the color to a GradientDrawable null save\n\n@param colorHolder\n@param ctx\n@param gradientDrawable", "Gets the property by key converted to lowercase if requested\n@param key property key\n@param lowerCase convert property to lowercase if it is true, keep the original one if it is\nfalse\n@return node property", "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.", "Extract resource type from a resource ID string.\n@param id the resource ID string\n@return the resource type", "Registers the parameter for the value formatter for the given variable and puts\nit's implementation in the parameters map.\n@param djVariable\n@param variableName", "Geta the specified metadata template by its ID.\n@param api the API connection to be used.\n@param templateID the ID of the template to get.\n@return the metadata template object." ]
private Pair<Cluster, List<StoreDefinition>> getCurrentClusterState() { // Retrieve the latest cluster metadata from the existing nodes Versioned<Cluster> currentVersionedCluster = adminClient.rebalanceOps.getLatestCluster(Utils.nodeListToNodeIdList(Lists.newArrayList(adminClient.getAdminClientCluster() .getNodes()))); Cluster cluster = currentVersionedCluster.getValue(); List<StoreDefinition> storeDefs = adminClient.rebalanceOps.getCurrentStoreDefinitions(cluster); return new Pair<Cluster, List<StoreDefinition>>(cluster, storeDefs); }
[ "Probe the existing cluster to retrieve the current cluster xml and stores\nxml.\n\n@return Pair of Cluster and List<StoreDefinition> from current cluster." ]
[ "JSObject will return the String \"undefined\" at certain times, so we\nneed to make sure we're not getting a value that looks valid, but isn't.\n\n@param val The value from Javascript to be checked.\n@return Either null or the value passed in.", "Require that the namespace of the current element matches the required namespace.\n\n@param reader the reader\n@param requiredNs the namespace required\n@throws XMLStreamException if the current namespace does not match the required namespace", "For a given activity, retrieve a map of the activity code values which have been assigned to it.\n\n@param activity target activity\n@return map of activity code value UUIDs", "Parses int value and returns the provided default if the value can't be parsed.\n@param value the int to parse.\n@param defaultValue the default value.\n@return the parsed int, or the default value if parsing fails.", "Print a a basic type t", "Constraint that ensures that the field has a conversion if the java type requires it. Also checks the conversion class.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If the conversion class is invalid", "Provide Jersey client for the targeted Grapes server\n\n@return webResource", "Processes the template for all extents of the current class.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "helper to calculate the navigationBar height\n\n@param context\n@return" ]