query
stringlengths 74
6.1k
| positive
listlengths 1
1
| negative
listlengths 9
9
|
---|---|---|
public void deleteById(String id) {
if (idToVersion.containsKey(id)) {
String version = idToVersion.remove(id);
expirationVersion.remove(version);
versionToItem.remove(version);
if (collectionCachePath != null
&& !collectionCachePath.resolve(version).toFile().delete()) {
log.debug("couldn't delete " + version);
}
}
} | [
"Delete by id.\n\n@param id the id"
]
| [
"Returns the map from resourcetype names to default timestamp modes.\n@return the map from resourcetype names to default timestamp modes.",
"Add SQL to handle a unique=true field. THis is not for uniqueCombo=true.",
"Obtain parameters from query\n\n@param query query to scan\n@return Map of parameters",
"Transits a float propertyId from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self",
"Get the element at the index as a json array.\n\n@param i the index of the element to access",
"Get info about the shards in the database.\n\n@return List of shards\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-database-_shards-\"\ntarget=\"_blank\">_shards</a>",
"Walks from the most outer embeddable to the most inner one\nlook for all columns contained in these embeddables\nand exclude the embeddables that have a non null column\nbecause of caching, the algorithm is only run once per column parameter",
"The CommandContext can be retrieved thatnks to the ExecutableBuilder.",
"Convenience method dispatches the specified event to the source appender,\nwhich will result in the custom event data being appended to the new file.\n\n@param customLoggingEvent\nThe custom Log4J event to be appended."
]
|
public static void validate(final ArtifactQuery artifactQuery) {
final Pattern invalidChars = Pattern.compile("[^A-Fa-f0-9]");
if(artifactQuery.getUser() == null ||
artifactQuery.getUser().isEmpty()){
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
.entity("Mandatory field [user] missing")
.build());
}
if( artifactQuery.getStage() != 0 && artifactQuery.getStage() !=1 ){
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
.entity("Invalid [stage] value (supported 0 | 1)")
.build());
}
if(artifactQuery.getName() == null ||
artifactQuery.getName().isEmpty()){
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
.entity("Mandatory field [name] missing, it should be the file name")
.build());
}
if(artifactQuery.getSha256() == null ||
artifactQuery.getSha256().isEmpty()){
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
.entity("Mandatory field [sha256] missing")
.build());
}
if(artifactQuery.getSha256().length() < 64 || invalidChars.matcher(artifactQuery.getSha256()).find()){
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
.entity("Invalid file checksum value")
.build());
}
if(artifactQuery.getType() == null ||
artifactQuery.getType().isEmpty()){
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
.entity("Mandatory field [type] missing")
.build());
}
} | [
"Checks if the provided artifactQuery is valid\n\n@param artifactQuery ArtifactQuery\n@throws WebApplicationException if the data is corrupted"
]
| [
"Recursively add indirect subclasses to a class record.\n\n@param directSuperClass\nthe superclass to add (together with its own superclasses)\n@param subClassRecord\nthe subclass to add to",
"Resend the confirmation for a user to the given email.\n\n@param email the email of the user.\n@return A {@link Task} that completes when the resend request completes/fails.",
"Use this API to fetch appfwpolicylabel_binding resource of given name .",
"Create a list out of the items in the Iterable.\n\n@param <T>\nThe type of items in the Iterable.\n@param items\nThe items to be made into a list.\n@return A list consisting of the items of the Iterable, in the same order.",
"Use this API to add sslcertkey.",
"Support the range subscript operator for CharSequence with IntRange\n\n@param text a CharSequence\n@param range an IntRange\n@return the subsequence CharSequence\n@since 1.0",
"Gets the publisher of the specified type, if it is wrapped by the \"Flexible Publish\" publisher in a project.\nNull is returned if no such publisher is found.\n@param project The project\n@param type The type of the publisher",
"Transforms the configuration.\n\n@throws Exception if something goes wrong",
"Returns the adapter position of the Parent associated with this ParentViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled."
]
|
public double nonNormalizedTreeDist(LblTree t1, LblTree t2) {
init(t1, t2);
STR = new int[size1][size2];
computeOptimalStrategy();
return computeDistUsingStrArray(it1, it2);
} | [
"Computes the tree edit distance between trees t1 and t2.\n\n@param t1\n@param t2\n@return tree edit distance between trees t1 and t2"
]
| [
"Use this API to unset the properties of sslcertkey resources.\nProperties that need to be unset are specified in args array.",
"Main method for testing fetching",
"Performs spellchecking using Solr and returns the spellchecking results using JSON.\n\n@param res The HttpServletResponse object.\n@param servletRequest The ServletRequest object.\n@param cms The CmsObject object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user\n@throws IOException if writing the response fails",
"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",
"This method is called when the locale of the parent file is updated.\nIt resets the locale specific date attributes to the default values\nfor the new locale.\n\n@param locale new locale",
"Add an addon to the app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param addonName Addon name. See {@link #listAllAddons} to get a list of addons that can be used.\n@return The request object",
"Get the best guess we have for the current track position on the specified player.\n\n@param player the player number whose position is desired\n\n@return the milliseconds into the track that we believe playback has reached, or -1 if we don't know\n\n@throws IllegalStateException if the TimeFinder is not running",
"Returns a compact representation of all of the tags the task has.\n\n@param task The task to get tags on.\n@return Request object",
"A property tied to the map, updated when the idle state event is fired.\n\n@return"
]
|
public static <S extends Matrix, D extends Matrix> LinearSolver<S,D> safe(LinearSolver<S,D> solver ) {
if( solver.modifiesA() || solver.modifiesB() ) {
if( solver instanceof LinearSolverDense ) {
return new LinearSolverSafe((LinearSolverDense)solver);
} else if( solver instanceof LinearSolverSparse ) {
return new LinearSolverSparseSafe((LinearSolverSparse)solver);
} else {
throw new IllegalArgumentException("Unknown solver type");
}
} else {
return solver;
}
} | [
"Wraps a linear solver of any type with a safe solver the ensures inputs are not modified"
]
| [
"Adds custom header to request\n\n@param key\n@param value",
"Process the graphical indicator criteria for a single column.\n\n@param type field type\n@return indicator criteria data",
"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",
"Creates a random diagonal matrix where the diagonal elements are selected from a uniform\ndistribution that goes from min to max.\n\n@param N Dimension of the matrix.\n@param min Minimum value of a diagonal element.\n@param max Maximum value of a diagonal element.\n@param rand Random number generator.\n@return A random diagonal matrix.",
"Scale all widgets in Main Scene hierarchy\n@param scale",
"This method is used to launch mock agents. First it creates them, with\nthe generic df_service_name \\\"mock_agent\\\", and then the method sends to\nthe agent a message with the new df_service_name and its behaviour.\n\n@param agent_name\nThe name of the mock agent\n@param agent_path\nThe path of the agent, described in\nmocks/jadex/common/Definitions file\n@param configuration\nWhere the new df_service_name and the agents behaviour is\nsaved\n@param scenario\nThe Scenario of the Test",
"Use this API to delete sslcertkey resources of given names.",
"Use this API to fetch sslocspresponder resource of given name .",
"Creates a scatter query from the given user query\n\n@param query the user's query.\n@param numSplits the number of splits to create."
]
|
public static vpnglobal_vpnnexthopserver_binding[] get(nitro_service service) throws Exception{
vpnglobal_vpnnexthopserver_binding obj = new vpnglobal_vpnnexthopserver_binding();
vpnglobal_vpnnexthopserver_binding response[] = (vpnglobal_vpnnexthopserver_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch a vpnglobal_vpnnexthopserver_binding resources."
]
| [
"Call the appropriate handler for handling the httprequest. 404 if path is not found. 405 if path is found but\nhttpMethod does not match what's configured.\n\n@param request instance of {@code HttpRequest}\n@param responder instance of {@code HttpResponder} to handle the request.",
"Use this API to enable clusterinstance resources of given names.",
"Returns the metallic factor for PBR shading",
"Runs a query that returns a single int.",
"Replaces new line delimiters in the input stream with the Unix line feed.\n\n@param input",
"Decrease the indent level.",
"Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\nThe outIdentifier can be null.\nThe entryPoint, which can also be null, specifies the entrypoint the object is inserted into.\n\n@param object\n@param outIdentifier\n@param entryPoint\n@return",
"Process the start of this element.\n\n@param attributes The attribute list for this element\n@param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace\naware or the element has no namespace\n@param name the local name if the parser is namespace aware, or just the element name otherwise\n@throws Exception if something goes wrong",
"Parses an RgbaColor from a hexadecimal, rgb, rgba, hsl, or hsla\nvalue.\n\n@return returns the parsed color"
]
|
private ProjectFile readProjectFile(ProjectReader reader, File file) throws MPXJException
{
addListeners(reader);
return reader.read(file);
} | [
"Adds listeners and reads from a file.\n\n@param reader reader for file type\n@param file schedule data\n@return ProjectFile instance"
]
| [
"Save the values to the bundle descriptor.\n@throws CmsException thrown if saving fails.",
"Set the buttons size.",
"Sends a text message using given server setup for SMTP.\n\n@param to the to address.\n@param from the from address.\n@param subject the subject.\n@param msg the test message.\n@param setup the SMTP setup.",
"Retrieve the next page and store the continuation token, the new data, and any IOException that may occur.\n\nNote that it is safe to pass null values to {@link CollectionRequest#query(String, Object)}. Method\n{@link com.asana.Client#request(com.asana.requests.Request)} will not include such options.",
"Recursively read a task, and any sub tasks.\n\n@param mpxjParent Parent for the MPXJ tasks\n@param gpTask GanttProject task",
"Rewrites the file passed to 'this' constructor so that the actual line numbers match the recipe passed to 'this'\nconstructor.",
"Returns the context menu for the table item.\n@param itemId the table item.\n@return the context menu for the given item.",
"Write attributes for an individual custom field.\nNote that at present we are only writing a subset of the\navailable data... in this instance the field alias.\nIf the field does not have an alias we won't write an\nentry.\n\n@param field custom field to write\n@throws IOException",
"Use this API to clear configuration on netscaler.\n@param force clear confirmation without prompting.\n@param level clear config according to the level. eg: basic, extended, full\n@return status of the operation performed.\n@throws Exception Nitro exception is thrown."
]
|
private void clearDeckPreview(TrackMetadataUpdate update) {
if (previewHotCache.remove(DeckReference.getDeckReference(update.player, 0)) != null) {
deliverWaveformPreviewUpdate(update.player, null);
}
} | [
"We have received an update that invalidates the waveform preview for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no waveform preview for the associated player"
]
| [
"Returns the coordinates of the vertex points of this hull.\n\n@param coords\nreturns the x, y, z coordinates of each vertex. This length of\nthis array must be at least three times the number of\nvertices.\n@return the number of vertices\n@see QuickHull3D#getVertices()\n@see QuickHull3D#getFaces()",
"Unregister all servlets registered by this exporter.",
"Creates a Source Processor\n\n@param source the data source itself\n@param parallelism the parallelism of this processor\n@param description the description of this processor\n@param taskConf the configuration of this processor\n@param system actor system\n@return the new created source processor",
"Creates a PathAddress from the given ModelNode address. The given node is expected to be an address node.\n\n@param node the node (cannot be {@code null})\n\n@return the update identifier",
"Process a module or bundle root.\n\n@param root the root\n@param layers the processed layers\n@param setter the bundle or module path setter\n@throws IOException",
"Add an event to the queue. It will be processed in the order received.\n\n@param event Event",
"Gets the URL of the service with the given name that has been created during the current session.\n\n@param name to return its URL\n@return URL of the service.",
"Establish a new master tempo, and if it is a change from the existing one, report it to the listeners.\n\n@param newTempo the newly reported master tempo.",
"Returns all the pixels for the image\n\n@return an array of pixels for this image"
]
|
private void initUpperLeftComponent() {
m_upperLeftComponent = new HorizontalLayout();
m_upperLeftComponent.setHeight("100%");
m_upperLeftComponent.setSpacing(true);
m_upperLeftComponent.setDefaultComponentAlignment(Alignment.MIDDLE_RIGHT);
m_upperLeftComponent.addComponent(m_languageSwitch);
m_upperLeftComponent.addComponent(m_filePathLabel);
} | [
"Initializes the upper left component. Does not show the mode switch."
]
| [
"Returns the ReportModel with given name.",
"Iterate through dependencies",
"Sets in-place the right child with the same first byte.\n\n@param b next byte of child suffix.\n@param child child node.",
"This method processes any extended attributes associated with a task.\n\n@param xml MSPDI task instance\n@param mpx MPX task instance",
"Commit all written data to the physical disk\n\n@throws IOException any io exception",
"Removes a tag from the resource.\n@param key the key of the tag to remove\n@return the next stage of the definition/update",
"Is the user password reset?\n\n@param user User to check\n@return boolean",
"Get public photos from the user's contacts.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param userId\nThe user ID\n@param count\nThe number of photos to return\n@param justFriends\nTrue to include friends\n@param singlePhoto\nTrue to get a single photo\n@param includeSelf\nTrue to include self\n@return A collection of Photo objects\n@throws FlickrException",
"Layout which gets displayed if table is empty.\n\n@see org.opencms.ui.apps.user.I_CmsFilterableTable#getEmptyLayout()"
]
|
void persist(final String key, final String value, final boolean enableDisableMode, final boolean disable, final File file) throws IOException, StartException {
persist(key, value, enableDisableMode, disable, file, null);
} | [
"Implement the persistence handler for storing the group properties."
]
| [
"Returns true if the specified class node is a trait.\n@param cNode a class node to test\n@return true if the classnode represents a trait",
"Check, if all values used for calculating the series for a specific pattern are valid.\n@return <code>null</code> if the pattern is valid, a suitable error message otherwise.",
"This should be called from a subclass constructor, if offset or length\nare unknown at a time when SubIIMInputStream constructor is called. This\nmethod shouldn't be called more than once.\n\n@param offset\nbyte offset\n@param length\nbyte length\n@throws IOException\nif underlying stream can't be read",
"This method works as the one above, adding some properties to the message\n\n@param agent_name\nThe id of the agents that receive the message\n@param msgtype\n@param message_content\nThe content of the message\n@param properties\nto be added to the message\n@param connector\nThe connector to get the external access",
"Use this API to fetch autoscaleprofile resource of given name .",
"Returns the primarykey fields.\n\n@return The field descriptors of the primarykey fields",
"Await service container stability ignoring thread interruption.\n\n@param timeout maximum period to wait for service container stability\n@param timeUnit unit in which {@code timeout} is expressed\n\n@throws java.util.concurrent.TimeoutException if service container stability is not reached before the specified timeout",
"Get the sub registry for the servers.\n\n@param range the version range\n@return the sub registry",
"Build a standard-format UDP packet for sending to port 50001 or 50002 in the protocol.\n\n@param type the type of packet to create.\n@param deviceName the 0x14 (twenty) bytes of the device name to send in the packet.\n@param payload the remaining bytes which come after the device name.\n@return the packet to send."
]
|
public static base_response unset(nitro_service client, protocolhttpband resource, String[] args) throws Exception{
protocolhttpband unsetresource = new protocolhttpband();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of protocolhttpband resource.\nProperties that need to be unset are specified in args array."
]
| [
"Navigate to this address in the given model node.\n\n@param model the model node\n@param create {@code true} to create the last part of the node if it does not exist\n@return the submodel\n@throws NoSuchElementException if the model contains no such element\n\n@deprecated manipulating a deep DMR node tree via PathAddress is no longer how the management layer works\ninternally, so this method has become legacy cruft. Management operation handlers\nshould obtain a {@link org.jboss.as.controller.registry.Resource Resource} from the\n{@link org.jboss.as.controller.OperationContext#readResource(PathAddress) OperationContext}\nand use the {@code Resource} API to access child resources",
"I promise that this is always a collection of HazeltaskTasks",
"Get a list of all methods.\n\n@return The method names\n@throws FlickrException",
"Remove the realm name block.\n\n@see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String)",
"Unregister the mbean with the given name, if there is one registered\n\n@param name The mbean name to unregister\n@see #registerMBean(Object, String)",
"Check whether vector addition works. This is pure Java code and should work.",
"Populate the constraint type and constraint date.\nNote that Merlin allows both start and end constraints simultaneously.\nAs we can't have both, we'll prefer the start constraint.\n\n@param row task data from database\n@param task Task instance",
"Get a unique reference to the media slot on the network from which the specified data was loaded.\n\n@param dataReference the data whose media slot is of interest\n\n@return the instance that will always represent the slot associated with the specified data",
"Copy a single named resource from the classpath to the output directory.\n@param outputDirectory The destination directory for the copied resource.\n@param resourceName The filename of the resource.\n@param targetFileName The name of the file created in {@literal outputDirectory}.\n@throws IOException If the resource cannot be copied."
]
|
public List<EnabledEndpoint> getEnabledEndpoints(int pathId, String clientUUID, String[] filters) throws Exception {
ArrayList<EnabledEndpoint> enabledOverrides = new ArrayList<EnabledEndpoint>();
PreparedStatement query = null;
ResultSet results = null;
try (Connection sqlConnection = sqlService.getConnection()) {
query = sqlConnection.prepareStatement(
"SELECT * FROM " + Constants.DB_TABLE_ENABLED_OVERRIDE +
" WHERE " + Constants.ENABLED_OVERRIDES_PATH_ID + "=?" +
" AND " + Constants.GENERIC_CLIENT_UUID + "=?" +
" ORDER BY " + Constants.ENABLED_OVERRIDES_PRIORITY
);
query.setInt(1, pathId);
query.setString(2, clientUUID);
results = query.executeQuery();
while (results.next()) {
EnabledEndpoint endpoint = this.getPartialEnabledEndpointFromResultset(results);
com.groupon.odo.proxylib.models.Method m = PathOverrideService.getInstance().getMethodForOverrideId(endpoint.getOverrideId());
// this is an errant entry.. perhaps a method got deleted from a plugin
// we'll also remove it from the endpoint
if (m == null) {
PathOverrideService.getInstance().removeOverride(endpoint.getOverrideId());
continue;
}
// check filters and see if any match
boolean addOverride = false;
if (filters != null) {
for (String filter : filters) {
if (m.getMethodType().endsWith(filter)) {
addOverride = true;
break;
}
}
} else {
// if there are no filters then we assume that the requester wants all enabled overrides
addOverride = true;
}
if (addOverride) {
enabledOverrides.add(endpoint);
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (results != null) {
results.close();
}
} catch (Exception e) {
}
try {
if (query != null) {
query.close();
}
} catch (Exception e) {
}
}
// now go through the ArrayList and get the method for all of the endpoints
// have to do this so we don't have overlapping SQL queries
ArrayList<EnabledEndpoint> enabledOverridesWithMethods = new ArrayList<EnabledEndpoint>();
for (EnabledEndpoint endpoint : enabledOverrides) {
if (endpoint.getOverrideId() >= 0) {
com.groupon.odo.proxylib.models.Method m = PathOverrideService.getInstance().getMethodForOverrideId(endpoint.getOverrideId());
endpoint.setMethodInformation(m);
}
enabledOverridesWithMethods.add(endpoint);
}
return enabledOverridesWithMethods;
} | [
"Returns an array of the enabled endpoints as Integer IDs\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@param filters If supplied, only endpoints ending with values in filters are returned\n@return Collection of endpoints\n@throws Exception exception"
]
| [
"If users want to implement clone on all their objects, we can use this\nto make copies. This is hazardous as user may mess it up, but it is also\npotentially the fastest way of making a copy.\n\nUsually the OjbCloneable interface should just be delegating to the clone()\noperation that the user has implemented.\n\n@see org.apache.ojb.otm.copy.ObjectCopyStrategy#copy(Object)",
"Reads a \"flags\" argument from the request.",
"convert a param object to a multimap.\n\n@param objectParams the parameters to convert.\n@return the corresponding Multimap.",
"Delete an index with the specified name and type in the given design document.\n\n@param indexName name of the index\n@param designDocId ID of the design doc (the _design prefix will be added if not present)\n@param type type of the index, valid values or \"text\" or \"json\"",
"Use this API to add autoscaleprofile.",
"the applications main loop.",
"Sign in a group of connections to the registry by key\n\n@param key\nthe key\n@param connections\na collection of websocket connections",
"Configure file logging and stop console logging.\n\n@param filename\nLog to this file.",
"Adds all options from the passed container to this container.\n\n@param container a container with options to add"
]
|
public byte[] getMessageBuffer() {
ByteArrayOutputStream resultByteBuffer = new ByteArrayOutputStream();
byte[] result;
resultByteBuffer.write((byte)0x01);
int messageLength = messagePayload.length +
(this.messageClass == SerialMessageClass.SendData &&
this.messageType == SerialMessageType.Request ? 5 : 3); // calculate and set length
resultByteBuffer.write((byte) messageLength);
resultByteBuffer.write((byte) messageType.ordinal());
resultByteBuffer.write((byte) messageClass.getKey());
try {
resultByteBuffer.write(messagePayload);
} catch (IOException e) {
}
// callback ID and transmit options for a Send Data message.
if (this.messageClass == SerialMessageClass.SendData && this.messageType == SerialMessageType.Request) {
resultByteBuffer.write(transmitOptions);
resultByteBuffer.write(callbackId);
}
resultByteBuffer.write((byte) 0x00);
result = resultByteBuffer.toByteArray();
result[result.length - 1] = 0x01;
result[result.length - 1] = calculateChecksum(result);
logger.debug("Assembled message buffer = " + SerialMessage.bb2hex(result));
return result;
} | [
"Gets the SerialMessage as a byte array.\n@return the message"
]
| [
"Internal method used to retrieve a integer from an\nembedded data block.\n\n@param blocks list of data blocks\n@return int value",
"Return the AnnotationNode for the named annotation, or else null.\nSupports Groovy 1.5 and Groovy 1.6.\n@param node - the AnnotatedNode\n@param name - the name of the annotation\n@return the AnnotationNode or else null",
"Get a configured database connection via JNDI.",
"legacy helper for setting background",
"Attaches locale groups to the copied page.\n@param copiedPage the copied page.\n@throws CmsException thrown if the root cms cannot be retrieved.",
"Returns the log conditional likelihood of the given dataset.\n\n@return The log conditional likelihood of the given dataset.",
"Are both Id's the same?\n\n@param otherElement the other element to compare\n@return true if id == otherElement.id",
"Use this API to fetch auditsyslogpolicy_systemglobal_binding resources of given name .",
"Called when the surface is created or recreated. Avoided because this can\nbe called twice at the beginning."
]
|
public static GVRCameraRig makeInstance(GVRContext gvrContext) {
final GVRCameraRig result = gvrContext.getApplication().getDelegate().makeCameraRig(gvrContext);
result.init(gvrContext);
return result;
} | [
"Constructs a camera rig with cameras attached. An owner scene object is automatically\ncreated for the camera rig.\n\nDo not try to change the owner object of the camera rig - not supported currently and will\nlead to native crashes."
]
| [
"Remove the S3 file that contains the domain controller data.\n\n@param directoryName the name of the directory that contains the S3 file",
"Reads next frame image.",
"Given a list of store definitions, find out and return a map of similar\nstore definitions + count of them\n\n@param storeDefs All store definitions\n@return Map of a unique store definition + counts",
"Returns the WDTK datatype IRI for the property datatype as represented by\nthe given JSON datatype string.\n\n@param jsonDatatype\nthe JSON datatype string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known",
"This function computes which reduce task to shuffle a record to.",
"Logs an error message for unhandled exception thrown from the target method.\n\n@param joinPoint - the joint point cut that contains information about the target\n@param throwable - the cause of the exception from the target method invocation",
"Create the work pattern assignment map.\n\n@param rows calendar rows\n@return work pattern assignment map",
"Use this API to add dbdbprofile resources.",
"Initial random seed used for shuffling test suites and other sources\nof pseudo-randomness. If not set, any random value is set.\n\n<p>The seed's format is compatible with {@link RandomizedRunner} so that\nseed can be fixed for suites and methods alike."
]
|
public static rnat6_nsip6_binding[] get(nitro_service service, String name) throws Exception{
rnat6_nsip6_binding obj = new rnat6_nsip6_binding();
obj.set_name(name);
rnat6_nsip6_binding response[] = (rnat6_nsip6_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch rnat6_nsip6_binding resources of given name ."
]
| [
"Process each regex group matched substring of the given CharSequence. 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 CharSequence\n@param regex a Regex CharSequence\n@param closure a closure with one parameter or as much parameters as groups\n@return the source CharSequence\n@see #eachMatch(String, String, groovy.lang.Closure)\n@since 1.8.2",
"Counts a single pair of coordinates in all datasets.\n\n@param xCoord\n@param yCoord\n@param itemDocument",
"This method is used to push install referrer via Intent\n@param intent An Intent with the install referrer parameters",
"This method writes data for a single task to a Planner file.\n\n@param mpxjTask MPXJ Task instance\n@param taskList list of child tasks for current parent",
"Sets the left padding character for all cells in the table.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining",
"Generates a Map of query parameters for Artifact regarding the filters\n\n@return Map<String, Object>",
"Use this API to fetch vpnvserver_authenticationradiuspolicy_binding resources of given name .",
"Create a directory at the given path if it does not exist yet.\n\n@param path\nthe path to the directory\n@throws IOException\nif it was not possible to create a directory at the given\npath",
"Determines whether or not a given feature matches this pattern.\n\n@param feature\nSpecified feature to examine.\n\n@return Flag confirming whether or not this feature is inside the filter."
]
|
@Override
public void put(ByteArray keyBytes, Versioned<byte[]> valueBytes, byte[] transforms)
throws VoldemortException {
// acquire write lock
writeLock.lock();
try {
String key = ByteUtils.getString(keyBytes.get(), "UTF-8");
Versioned<String> value = new Versioned<String>(ByteUtils.getString(valueBytes.getValue(),
"UTF-8"),
valueBytes.getVersion());
Versioned<Object> valueObject = convertStringToObject(key, value);
this.put(key, valueObject);
} finally {
writeLock.unlock();
}
} | [
"A write through put to inner-store.\n\n@param keyBytes : keyName strings serialized as bytes eg. 'cluster.xml'\n@param valueBytes : versioned byte[] eg. UTF bytes for cluster xml\ndefinitions\n@throws VoldemortException"
]
| [
"Find the index of this animation if it is in this animator.\n\n@param findme {@link GVRAnimation} to find.\n@returns 0 based index of animation or -1 if not found\n@see GVRAnimator#addAnimation(GVRAnimation)",
"Make all elements of a String array lower case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements lower case",
"Copy new grayscale data to the GPU texture. This one is also safe even\nin a non-GL thread. An updateGPU request on a non-GL thread will\nbe forwarded to the GL thread and be executed before main rendering happens.\n\nBe aware that updating a texture will affect any and all\n{@linkplain GVRMaterial materials} and/or post effects that use the texture!\n@param width width of grayscale image\n@param height height of grayscale image\n@param grayscaleData A byte array containing grayscale data\n\n@since 1.6.3",
"Returns the negative of the input variable",
"Writes a WBS entity to the PM XML file.\n\n@param mpxj MPXJ Task entity",
"Returns the comma separated list of available scopes\n\n@return String",
"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",
"Creates a ServiceCall from a paging operation.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element type\n@return the future based ServiceCall",
"See if there is an auto-attach cache file that seems to match the media in the specified slot, and if so,\nattach it.\n\n@param slot the player slot that is under consideration for automatic cache attachment"
]
|
public static Stack getStack() {
Stack stack = interceptionContexts.get();
if (stack == null) {
stack = new Stack(interceptionContexts);
interceptionContexts.set(stack);
}
return stack;
} | [
"Gets the current Stack. If the stack is not set, a new empty instance is created and set.\n@return"
]
| [
"Fall-back for types that are not handled by a subclasse's dispatch method.",
"Removes a corporate groupId from an Organisation\n\n@param organizationId String\n@param corporateGroupId String",
"Retrieve the Charset used to read the file.\n\n@return Charset instance",
"Gets validation errors either as a JSON string, or null if there are no validation errors.\n\n@return the validation error JSON",
"Set the week days the events should occur.\n@param weekDays the week days to set.",
"Creates a list of placeholders for use in a PreparedStatement\n\n@param length number of placeholders\n@return String of placeholders, seperated by comma",
"Calculates the Black-Scholes option value of a digital call option.\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 Returns the value of a European call option under the Black-Scholes model",
"Inserts the LokenList immediately following the 'before' token",
"ensures that the first invocation of a date seeking\nrule is captured"
]
|
public <Result, Param extends Resource> Result execWithTemporaryCaching(Param resource, IUnitOfWork<Result, Param> transaction) throws WrappedException {
CacheAdapter cacheAdapter = getOrCreate(resource);
IgnoreValuesMemento memento = cacheAdapter.ignoreNewValues();
try {
return transaction.exec(resource);
} catch (Exception e) {
throw new WrappedException(e);
} finally {
memento.done();
}
} | [
"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"
]
| [
"Color waveforms are represented by a series of sixteen bit integers into which color and height information are\npacked. This function returns the integer corresponding to a particular half-frame in the waveform.\n\n@param waveBytes the raw data making up the waveform\n@param segment the index of hte half-frame of interest\n\n@return the sixteen-bit number encoding the height and RGB values of that segment",
"Use this API to add dnssuffix resources.",
"Retrieve the number of minutes per day for this calendar.\n\n@return minutes per day",
"Main method of the class, which handles the process of creating the tests\n\n@param requirementsFolder\n, it is the folder where the plain text given by the client is\nstored\n@param platformName\n, to choose the MAS platform (JADE, JADEX, etc.)\n@param src_test_dir\n, the folder where our classes are created\n@param tests_package\n, the name of the package where the stories are created\n@param casemanager_package\n, the path where casemanager must be created\n@param loggingPropFile\n, properties file\n@throws Exception\n, if any error is found in the configuration",
"Resolve all files from a given path and simplify its definition.",
"If UPDATE, INSERT or DELETE, return BatchPreparedStatement,\notherwise return null.",
"Sets the initial MoificationState of the wrapped object myObj. The initial state will be StateNewDirty if myObj\nis not persisten already. The state will be set to StateOldClean if the object is already persistent.",
"Lock a file lazily, if a value that should be written to the file has changed.\n@param propertyId the table column in which the value has changed (e.g., KEY, TRANSLATION, ...)\n@throws CmsException thrown if locking fails.",
"List details of all calendars in the file.\n\n@param file ProjectFile instance"
]
|
@Override
public void onDismiss(DialogInterface dialog) {
if (mOldDialog != null && mOldDialog == dialog) {
// This is the callback from the old progress dialog that was already dismissed before
// the device orientation change, so just ignore it.
return;
}
super.onDismiss(dialog);
} | [
"There is a race condition that is not handled properly by the DialogFragment class.\nIf we don't check that this onDismiss callback isn't for the old progress dialog from before\nthe device orientation change, then this will cause the newly created dialog after the\norientation change to be dismissed immediately."
]
| [
"Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException",
"Find the index of the first matching element in the list\n@param element the element value to find\n@return the index of the first matching element, or <code>-1</code> if none found",
"Given a partition ID, determine which replica of this partition is hosted by the\ncurrent node, if any.\n\nNote: This is an implementation detail of the READONLY_V2 naming scheme, and should\nnot be used outside of that scope.\n\n@param partitionId for which we want to know the replica type\n@return the requested partition's replica type (which ranges from 0 to replication\nfactor -1) if the partition is hosted on the current node, or -1 if the\nrequested partition is not hosted on this node.",
"Get a collection of methods declared on this object by method name.\n\n@param name the name of the method\n@return the (possibly empty) collection of methods with the given name",
"This method is used to parse a string representation of a time\nunit, and return the appropriate constant value.\n\n@param units string representation of a time unit\n@param locale target locale\n@return numeric constant\n@throws MPXJException normally thrown when parsing fails",
"Use this API to fetch filterpolicy_binding resource of given name .",
"Initializes data structures",
"Finish a state transition from a notification.\n\n@param current\n@param next",
"a small static helper which catches nulls for us\n\n@param imageHolder\n@param ctx\n@param iconColor\n@param tint\n@return"
]
|
static void showWarning(final String caption, final String description) {
Notification warning = new Notification(caption, description, Type.WARNING_MESSAGE, true);
warning.setDelayMsec(-1);
warning.show(UI.getCurrent().getPage());
} | [
"Displays a localized warning.\n@param caption the caption of the warning.\n@param description the description of the warning."
]
| [
"Convenience method for setting the value of a private object field,\nwithout the stress of checked exceptions in the reflection API.\n\n@param object\nObject containing the field.\n@param fieldName\nName of the field to set.\n@param value\nValue to which to set the field.",
"This method is used to configure the primary and alternative\nformat patterns.\n\n@param primaryPattern new format pattern\n@param alternativePatterns alternative format patterns\n@param decimalSeparator Locale specific decimal separator to replace placeholder\n@param groupingSeparator Locale specific grouping separator to replace placeholder",
"Indicates that contextual session bean instance has been constructed.",
"Create the index and associate it with all project models in the Application",
"This filter uses a 9-patch to overlay the image.\n\n@param imageUrl Watermark image URL. It is very important to understand that the same image\nloader that Thumbor uses will be used here.",
"Create a new DateTime. To the last second. This will not create any\nextra-millis-seconds, which may cause bugs when writing to stores such as\ndatabases that round milli-seconds up and down.",
"Get the metadata cache files that are currently configured to be automatically attached when matching media is\nmounted in a player on the network.\n\n@return the current auto-attache cache files, sorted by name",
"Has to be called when the scenario is finished in order to execute after methods.",
"Handle click on \"Add\" button.\n@param e the click event."
]
|
public static boolean hasPermission(Permission permission) {
SecurityManager security = System.getSecurityManager();
if (security != null) {
try {
security.checkPermission(permission);
} catch (java.security.AccessControlException e) {
return false;
}
}
return true;
} | [
"Determines whether the specified permission is permitted.\n\n@param permission\n@return <tt>false<tt> if the specified permission is not permitted, based on the current security policy; <tt>true<tt> otherwise"
]
| [
"Generate a sql where-clause for the array of fields\n\n@param fields array containing all columns used in WHERE clause",
"Returns the average event value in the current interval",
"Use this API to create sslfipskey resources.",
"Add a task to the project.\n\n@return new task instance",
"Add a new profile with the profileName given.\n\n@param profileName name of new profile\n@return newly created profile\n@throws Exception exception",
"Logs the time taken by this rule, and attaches this to the total for the RuleProvider",
"Join to internal threads and wait millis time per thread or until all\nthreads are finished if millis is 0.\n\n@param millis the time to wait in milliseconds for the threads to join; a timeout of 0 means to wait forever.\n@throws InterruptedException if any thread has interrupted the current thread.\nThe interrupted status of the current thread is cleared when this exception is thrown.",
"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",
"Filters all exceptions from the provided dates.\n@param dates the dates to filter.\n@return the provided dates, except the ones that match some exception."
]
|
String urlDecode(String name, String encoding) throws UnsupportedEncodingException {
return URLDecoder.decode(name, encoding);
} | [
"Convert a URL Encoded name back to the original form.\n@param name the name to URL urlDecode.\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the name in original form.\n@throws UnsupportedEncodingException if the encoding is not supported."
]
| [
"Adds the deploy operation as a step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment to deploy",
"Set day.\n\n@param d day instance",
"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",
"Read the given source byte array, then overwrite this buffer's contents\n\n@param src source byte array\n@param srcOffset offset in source byte array to read from\n@param destOffset offset in this buffer to read to\n@param length max number of bytes to read\n@return the number of bytes read",
"Processes the template if the property value of the current object on the specified level equals the given value.\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\"\[email protected] name=\"value\" optional=\"false\" description=\"The value to check for\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\"",
"This solution is based on an absolute path",
"This method is called to alert project listeners to the fact that\na relation has been written to a project file.\n\n@param relation relation instance",
"Send a media details response to all registered listeners.\n\n@param details the response that has just arrived",
"Gets the thread dump.\n\n@return the thread dump"
]
|
private ArrayList handleDependentCollections(Identity oid, Object obj,
Object[] origCollections, Object[] newCollections,
Object[] newCollectionsOfObjects)
throws LockingException
{
ClassDescriptor mif = _pb.getClassDescriptor(obj.getClass());
Collection colDescs = mif.getCollectionDescriptors();
ArrayList newObjects = new ArrayList();
int count = 0;
for (Iterator it = colDescs.iterator(); it.hasNext(); count++)
{
CollectionDescriptor cds = (CollectionDescriptor) it.next();
if (cds.getOtmDependent())
{
ArrayList origList = (origCollections == null ? null
: (ArrayList) origCollections[count]);
ArrayList newList = (ArrayList) newCollections[count];
if (origList != null)
{
for (Iterator it2 = origList.iterator(); it2.hasNext(); )
{
Identity origOid = (Identity) it2.next();
if ((newList == null) || !newList.contains(origOid))
{
markDelete(origOid, oid, true);
}
}
}
if (newList != null)
{
int countElem = 0;
for (Iterator it2 = newList.iterator(); it2.hasNext(); countElem++)
{
Identity newOid = (Identity) it2.next();
if ((origList == null) || !origList.contains(newOid))
{
ContextEntry entry = (ContextEntry) _objects.get(newOid);
if (entry == null)
{
ArrayList relCol = (ArrayList)
newCollectionsOfObjects[count];
Object relObj = relCol.get(countElem);
insertInternal(newOid, relObj, LockType.WRITE_LOCK,
true, null, new Stack());
newObjects.add(newOid);
}
}
}
}
}
}
return newObjects;
} | [
"Mark for creation all objects that were included into dependent collections.\nMark for deletion all objects that were excluded from dependent collections."
]
| [
"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}.",
"Performs an implicit double step given the set of two imaginary eigenvalues provided.\nSince one eigenvalue is the complex conjugate of the other only one set of real and imaginary\nnumbers is needed.\n\n@param x1 upper index of submatrix.\n@param x2 lower index of submatrix.\n@param real Real component of each of the eigenvalues.\n@param img Imaginary component of one of the eigenvalues.",
"Updates the image information.",
"Add a date with a certain check state.\n@param date the date to add.\n@param checkState the check state.",
"Initialize the ui elements for the management part.",
"Use this API to fetch all the cacheobject resources that are configured on netscaler.",
"Sets the underlying write timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#writeTimeout(long, TimeUnit)",
"Convert to IPv6 EUI-64 section\n\nhttp://standards.ieee.org/develop/regauth/tut/eui64.pdf\n\n@param asMAC if true, this address is considered MAC and the EUI-64 is extended using ff-ff, otherwise this address is considered EUI-48 and extended using ff-fe\nNote that IPv6 treats MAC as EUI-48 and extends MAC to IPv6 addresses using ff-fe\n@return",
"When the descriptor was added while editing, but the change was not saved, it has to be removed\nwhen the editor is closed.\n@throws CmsException thrown when deleting the descriptor resource fails"
]
|
@Deprecated
public static OptionMap create(final ExpressionResolver resolver, final ModelNode model, final OptionMap defaults) throws OperationFailedException {
final OptionMap map = OptionMap.builder()
.addAll(defaults)
.set(Options.WORKER_READ_THREADS, RemotingSubsystemRootResource.WORKER_READ_THREADS.resolveModelAttribute(resolver, model).asInt())
.set(Options.WORKER_TASK_CORE_THREADS, RemotingSubsystemRootResource.WORKER_TASK_CORE_THREADS.resolveModelAttribute(resolver, model).asInt())
.set(Options.WORKER_TASK_KEEPALIVE, RemotingSubsystemRootResource.WORKER_TASK_KEEPALIVE.resolveModelAttribute(resolver, model).asInt())
.set(Options.WORKER_TASK_LIMIT, RemotingSubsystemRootResource.WORKER_TASK_LIMIT.resolveModelAttribute(resolver, model).asInt())
.set(Options.WORKER_TASK_MAX_THREADS, RemotingSubsystemRootResource.WORKER_TASK_MAX_THREADS.resolveModelAttribute(resolver, model).asInt())
.set(Options.WORKER_WRITE_THREADS, RemotingSubsystemRootResource.WORKER_WRITE_THREADS.resolveModelAttribute(resolver, model).asInt())
.set(Options.WORKER_READ_THREADS, RemotingSubsystemRootResource.WORKER_READ_THREADS.resolveModelAttribute(resolver, model).asInt())
.getMap();
return map;
} | [
"creates option map for remoting connections\n@param resolver\n@param model\n@param defaults\n@return\n@throws OperationFailedException\n@deprecated configuring xnio worker options is no longer supported and should be replaced for referencing IO subsystem"
]
| [
"Select a List of values from a Matcher using a Collection\nto identify the indices to be selected.\n\n@param self a Matcher\n@param indices a Collection of indices\n@return a String of the values at the given indices\n@since 1.6.0",
"Returns the path in the RFS where the Solr spellcheck files reside.\n@return String representation of Solrs spellcheck RFS path.",
"Validate the header signature.\n\n@param input The input to read the signature from\n@throws IOException If any read problems occur",
"Computes the QR decomposition of A and store the results in A.\n\n@param A The A matrix in the linear equation. Modified. Reference saved.\n@return true if the decomposition was successful.",
"Gets an iterable of all the collections for the given user.\n@param api the API connection to be used when retrieving the collections.\n@return an iterable containing info about all the collections.",
"This method writes project properties to a Planner file.",
"returns a new segment masked by the given mask\n\nThis method applies the mask first to every address in the range, and it does not preserve any existing prefix.\nThe given prefix will be applied to the range of addresses after the mask.\nIf the combination of the two does not result in a contiguous range, then {@link IncompatibleAddressException} is thrown.",
"Writes references that have been added recently. Auxiliary triples that\nare generated for serializing snaks in references will be written right\nafterwards. This will also trigger any other auxiliary triples to be\nwritten that the snak converter object may have buffered.\n\n@throws RDFHandlerException\nif there was a problem writing the restrictions",
"Returns true if the predicate is true for all pixels in the image.\n\n@param predicate a predicate function that accepts 3 parameters - the x,y coordinate and the pixel at that coordinate\n@return true if f holds for at least one pixel"
]
|
private void addEdgesForVertex(Vertex vertex)
{
ClassDescriptor cld = vertex.getEnvelope().getClassDescriptor();
Iterator rdsIter = cld.getObjectReferenceDescriptors(true).iterator();
while (rdsIter.hasNext())
{
ObjectReferenceDescriptor rds = (ObjectReferenceDescriptor) rdsIter.next();
addObjectReferenceEdges(vertex, rds);
}
Iterator cdsIter = cld.getCollectionDescriptors(true).iterator();
while (cdsIter.hasNext())
{
CollectionDescriptor cds = (CollectionDescriptor) cdsIter.next();
addCollectionEdges(vertex, cds);
}
} | [
"Adds all edges for a given object envelope vertex. All edges are\nadded to the edgeList map.\n@param vertex the Vertex object to find edges for"
]
| [
"Locate a feature in the file by match a byte pattern.\n\n@param patterns patterns to match\n@param bufferIndex start index\n@return true if the bytes at the position match a pattern",
"Given a GanttProject priority value, turn this into an MPXJ Priority instance.\n\n@param gpPriority GanttProject priority\n@return Priority instance",
"Use this API to expire cachecontentgroup resources.",
"Examines the error data returned from Facebook and throws the most applicable exception.\n@param errorDetails a Map containing a \"type\" and a \"message\" corresponding to the Graph API's error response structure.",
"Add fields to the text index configuration.\n\n@param fields the {@link TextIndex.Field} configurations to add\n@return the builder for chaining",
"This method writes assignment data to a JSON file.",
"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).",
"Returns all visble sets and pools the photo belongs to.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo to return information for.\n@return a list of {@link PhotoContext} objects\n@throws FlickrException",
"Get the output mapper from processor."
]
|
public boolean changeState(StateVertex nextState) {
if (nextState == null) {
LOGGER.info("nextState given is null");
return false;
}
LOGGER.debug("Trying to change to state: '{}' from: '{}'", nextState.getName(),
currentState.getName());
if (stateFlowGraph.canGoTo(currentState, nextState)) {
LOGGER.debug("Changed to state: '{}' from: '{}'", nextState.getName(),
currentState.getName());
setCurrentState(nextState);
return true;
} else {
LOGGER.info("Cannot go to state: '{}' from: '{}'", nextState.getName(),
currentState.getName());
return false;
}
} | [
"Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed."
]
| [
"Obtains a local date in Ethiopic calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Ethiopic era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Ethiopic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code EthiopicEra}",
"Abort and close the transaction. Calling abort abandons all persistent\nobject modifications and releases the associated locks. Aborting a\ntransaction does not restore the state of modified transient objects",
"Add the declarationBinderRef to the ImportersManager, create the corresponding.\nBinderDescriptor.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder\n@throws InvalidFilterException",
"Create an Product delivery\n\n@throws AuthenticationException, GrapesCommunicationException, IOException",
"Commit all written data to the physical disk\n\n@throws IOException any io exception",
"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",
"Returns the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.\n\n@param namespace the namespace referring to the undo collection.\n@return the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.",
"Calculate the determinant.\n\n@return Determinant.",
"Removing surrounding space in image. Get trim color from specified pixel.\n@param value orientation from where to get the pixel color.\n@param colorTolerance 0 - 442. This is the euclidian distance\nbetween the colors of the reference pixel and the surrounding pixels is used.\nIf the distance is within the tolerance they'll get trimmed."
]
|
public T modifyBundle(final String moduleName, final String slot, final byte[] existingHash, final byte[] newHash) {
final ContentItem item = createBundleItem(moduleName, slot, newHash);
addContentModification(createContentModification(item, ModificationType.MODIFY, existingHash));
return returnThis();
} | [
"Modify a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder"
]
| [
"Update a variable name with a date if the variable is detected as being a date.\n\n@param variableName the variable name.\n@param date the date to replace the value with if the variable is a date variable.",
"Re-reads the given entity, refreshing any properties updated on the server-side during insert or update.",
"Heat Equation Boundary Conditions",
"Replace the current with a new generated identity object and\nreturns the old one.",
"Checks all data sets in a given record for constraint violations.\n\n@param record\nIIM record (1,2,3, ...) to check\n\n@return list of constraint violations, empty set if IIM file is valid",
"Use this API to delete route6 resources of given names.",
"Generates a full list of all parents and their children, in order. Uses Map to preserve\nlast expanded state.\n\n@param parentList A list of the parents from\nthe {@link ExpandableRecyclerAdapter}\n@param savedLastExpansionState A map of the last expanded state for a given parent key.\n@return A list of all parents and their children, expanded accordingly",
"We have identified that we have an MDB file. This could be a Microsoft Project database\nor an Asta database. Open the database and use the table names present to determine\nwhich type this is.\n\n@param stream schedule data\n@return ProjectFile instance",
"Sets the server groups for the deployment.\n\n@param serverGroups the server groups to set\n\n@return this deployment"
]
|
public SerialMessage getMultiInstanceGetMessage(CommandClass commandClass) {
logger.debug("Creating new message for application command MULTI_INSTANCE_GET for node {} and command class {}", this.getNode().getNodeId(), commandClass.getLabel());
SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.ApplicationCommandHandler, SerialMessagePriority.Get);
byte[] newPayload = { (byte) this.getNode().getNodeId(),
3,
(byte) getCommandClass().getKey(),
(byte) MULTI_INSTANCE_GET,
(byte) commandClass.getKey()
};
result.setMessagePayload(newPayload);
return result;
} | [
"Gets a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message."
]
| [
"Creates the tables according to the schema files.\n\n@throws PlatformException If some error occurred",
"Add server redirect to a profile\n\n@param region region\n@param srcUrl source URL\n@param destUrl destination URL\n@param hostHeader host header\n@param profileId profile ID\n@param groupId group ID\n@return ID of added ServerRedirect\n@throws Exception exception",
"Set the header names to forward from the request. Should not be defined if all is set to true\n\n@param names the header names.",
"Process a beat packet, potentially updating the master tempo and sending our listeners a master\nbeat notification. Does nothing if we are not active.",
"Sets the width and height of the canvas the text is drawn to.\n\n@param width\nwidth of the new canvas.\n\n@param height\nhegiht of the new canvas.",
"Set day.\n\n@param d day instance",
"Return the hostname of this address such as \"MYCOMPUTER\".",
"Marshal the assertion as a JSON object.\n\n@param assertion the assertion to marshal",
"Use this API to fetch Interface resource of given name ."
]
|
private static String getColumnTitle(final PropertyDescriptor _property) {
final StringBuilder buffer = new StringBuilder();
final String name = _property.getName();
buffer.append(Character.toUpperCase(name.charAt(0)));
for (int i = 1; i < name.length(); i++) {
final char c = name.charAt(i);
if (Character.isUpperCase(c)) {
buffer.append(' ');
}
buffer.append(c);
}
return buffer.toString();
} | [
"Calculates a column title using camel humps to separate words.\n@param _property the property descriptor.\n@return the column title for the given property."
]
| [
"Try to get an attribute value from two elements.\n\n@param firstElement\n@param secondElement\n@return attribute value",
"find all accessibility object and set active true for enable talk back.",
"Computes the p=2 norm. If A is a matrix then the induced norm is computed. This\nimplementation is faster, but more prone to buffer overflow or underflow problems.\n\n@param A Matrix or vector.\n@return The norm.",
"Runs through the log removing segments until the size of the log is at least\nlogRetentionSize bytes in size\n\n@throws IOException",
"Start export and check in of the selected modules.\n@return The exit code of the check in procedure (like a script's exit code).",
"Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.",
"Adds a free connection.\n\n@param connectionHandle\n@throws SQLException on error",
"Add new control at the control bar with specified touch listener, resource and position.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener\n@param position control position in the bar",
"Does the headset the device is docked into have a dedicated home key\n@return"
]
|
public int size() {
int size = cleared ? 0 : snapshot.size();
for ( Map.Entry<RowKey,AssociationOperation> op : currentState.entrySet() ) {
switch ( op.getValue().getType() ) {
case PUT:
if ( cleared || !snapshot.containsKey( op.getKey() ) ) {
size++;
}
break;
case REMOVE:
if ( !cleared && snapshot.containsKey( op.getKey() ) ) {
size--;
}
break;
}
}
return size;
} | [
"Returns the number of rows within this association.\n\n@return the number of rows within this association"
]
| [
"Will start the HiveServer.\n\n@param testConfig Specific test case properties. Will be merged with the HiveConf of the context\n@param hiveVars HiveVars to pass on to the HiveServer for this session",
"Return the factor loading for a given time and a given component.\n\nThe factor loading is the vector <i>f<sub>i</sub></i> such that the scalar product <br>\n<i>f<sub>j</sub>f<sub>k</sub> = f<sub>j,1</sub>f<sub>k,1</sub> + ... + f<sub>j,m</sub>f<sub>k,m</sub></i> <br>\nis the instantaneous covariance of the component <i>j</i> and <i>k</i>.\n\nWith respect to simulation time <i>t</i>, this method uses a piece wise constant interpolation, i.e.,\nit calculates <i>t_<sub>i</sub></i> such that <i>t_<sub>i</sub></i> is the largest point in <code>getTimeDiscretization</code>\nsuch that <i>t_<sub>i</sub> ≤ t </i>.\n\nThe component here, it given via a double <i>T</i> which may be associated with the LIBOR fixing date.\nWith respect to component time <i>T</i>, this method uses a piece wise constant interpolation, i.e.,\nit calculates <i>T_<sub>j</sub></i> such that <i>T_<sub>j</sub></i> is the largest point in <code>getTimeDiscretization</code>\nsuch that <i>T_<sub>j</sub> ≤ T </i>.\n\n@param time The time <i>t</i> at which factor loading is requested.\n@param component The component time (as a double associated with the fixing of the forward rate) <i>T<sub>i</sub></i>.\n@param realizationAtTimeIndex The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).\n@return The factor loading <i>f<sub>i</sub>(t)</i>.",
"Prepare the filter for the transiton at a given time.\nThe default implementation sets the given filter property, but you could override this method to make other changes.\n@param transition the transition time in the range 0 - 1",
"Loads the asset referenced by the file name\nunder the owner of this component.\nIf this component was constructed to replace the scene with\nthe asset, the main scene of the current context\nwill contain only the owner of this\ncomponent upon return. Otherwise, the loaded asset is a\nchild of this component's owner.\n\nLoading the asset is performed in a separate thread.\nThis function returns before the asset has finished loading.\nIAssetEvents are emitted to the input event handler and\nto any event listener on the context.\n\n@param handler\nIAssetEvents handler to process asset loading events",
"Configure high fps settings in the camera for VR mode\n\n@param fpsMode integer indicating the desired fps: 0 means 30 fps, 1 means 60\nfps, and 2 means 120 fps. Any other value is invalid.\n@return A boolean indicating the status of the method call. It may be false due\nto multiple reasons including: 1) supplying invalid fpsMode as the input\nparameter, 2) VR mode not supported.",
"Check, if the resource should be exported with minimal meta-data.\nThis holds for resources that are not part of the export, but must be\nexported as super-folders.\n\n@param path export-site relative path of the resource to check.\n\n@return flag, indicating if the resource should be exported with minimal meta data.",
"Use this API to unset the properties of systemuser resource.\nProperties that need to be unset are specified in args array.",
"Formats a date or a time range according to the local conventions.\n\nYou should ensure that start/end are in the same timezone; formatDateRange()\ndoesn't handle start/end in different timezones well.\n\nSee {@link android.text.format.DateUtils#formatDateRange} for full docs.\n\n@param context the context is required only if the time is shown\n@param start the start time\n@param end the end time\n@param flags a bit mask of options\n@return a string containing the formatted date/time range",
"Convert given value to given target\n\n@param fromValue\nthe value to convert\n@param toType\ntarget target\n@param <T>\ntarget of the result\n@return the value converted to given target\n@throws TypeCastException\nif conversion was not possible"
]
|
public static CssSel sel(String selector, String value) {
return j.sel(selector, value);
} | [
"Create a Css Selector Transform"
]
| [
"Use this API to fetch authenticationldappolicy_authenticationvserver_binding resources of given name .",
"Process calendar hours.\n\n@param calendar parent calendar\n@param row calendar hours data\n@param dayIndex day index",
"Hardcode a copy method as being valid. This should be used to tell Mutability Detector about\na method which copies a collection, and when the copy can be wrapped in an immutable wrapper\nwe can consider the assignment immutable. Useful for allowing Mutability Detector to correctly\nwork with other collections frameworks such as Google Guava. Reflection is used to obtain the\nmethod's descriptor and to verify the method's existence.\n\n@param fieldType - the type of the field to which the result of the copy is assigned\n@param fullyQualifiedMethodName - the fully qualified method name\n@param argType - the type of the argument passed to the copy method\n\n@throws MutabilityAnalysisException - if the specified class or method does not exist\n@throws IllegalArgumentException - if any of the arguments are null",
"Adds a resource collection with execution hints.",
"Returns a reasonable timeout duration for a watch request.\n\n@param expectedTimeoutMillis timeout duration that a user wants to use, in milliseconds\n@param bufferMillis buffer duration which needs to be added, in milliseconds\n@return timeout duration in milliseconds, between the specified {@code bufferMillis} and\nthe {@link #MAX_MILLIS}.",
"Set an enterprise cost value.\n\n@param index cost index (1-30)\n@param value cost value",
"Write a message to the console.\n\n@param pattern\nA {@link String#format(String, Object...)} pattern\n@param parameters\nOptional parameters to plug into the pattern",
"Sets the text alignment for all cells in the table.\n@param textAlignment new text alignment\n@throws NullPointerException if the argument was null\n@return this to allow chaining\n@throws {@link NullPointerException} if the argument was null",
"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"
]
|
private ServerDetails createInitialResolveDetailsFromDeployDetails(ServerDetails deployerDetails) {
RepositoryConf oldResolveRepositoryConfig = deployerDetails.getResolveReleaseRepository();
RepositoryConf oldSnapshotResolveRepositoryConfig = deployerDetails.getResolveSnapshotRepository();
RepositoryConf resolverReleaseRepos = oldResolveRepositoryConfig == null ? RepositoryConf.emptyRepositoryConfig : oldResolveRepositoryConfig;
RepositoryConf resolveSnapshotRepos = oldSnapshotResolveRepositoryConfig == null ? RepositoryConf.emptyRepositoryConfig : oldSnapshotResolveRepositoryConfig;
return new ServerDetails(deployerDetails.getArtifactoryName(), deployerDetails.getArtifactoryUrl(),
null, null, resolverReleaseRepos, resolveSnapshotRepos, null, null);
} | [
"Creates a new ServerDetails object for resolver, this will take URL and name from the deployer ServerDetails as a default behaviour"
]
| [
"Return the position of an element inside an array\n\n@param array the array where it looks for an element\n@param element the element to find in the array\n@param <T> the type of elements in the array\n@return the position of the element if it's found in the array, -1 otherwise",
"Try to reconnect to a started server.",
"Throws an exception if the current thread is not a GL thread.\n\n@since 1.6.5",
"Notifies that an existing footer item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.",
"Creates an temporary directory. The created directory will be deleted when\ncommand will ended.",
"Given the current and final cluster dumps it into the output directory\n\n@param currentCluster Initial cluster metadata\n@param finalCluster Final cluster metadata\n@param outputDirName Output directory where to dump this file\n@throws IOException",
"End a \"track;\" that is, return to logging at one level shallower.\n@param title A title that should match the beginning of this track.",
"Allows the closure to be called for NullObject\n\n@param closure the closure to call on the object\n@return result of calling the closure",
"Stops all transitions."
]
|
public static final Bytes of(String s) {
Objects.requireNonNull(s);
if (s.isEmpty()) {
return EMPTY;
}
byte[] data = s.getBytes(StandardCharsets.UTF_8);
return new Bytes(data, s);
} | [
"Creates a Bytes object by copying the value of the given String"
]
| [
"Returns all resources that belong to the bundle\nThis includes the descriptor if one exists.\n\n@return List of the bundle resources, including the descriptor.",
"Used by TracedParallelBatch where its used to wrap a TraceContext and puts it in the\nregistry for the forked execution. This is marked deprecated as we prefer not to\nexpose details of the RatpackCurrentTraceContext implementation.\n\n@param traceContext a trace context.\n@return a holder for the trace context, which can be put into the registry.",
"Use this API to rename a gslbservice resource.",
"Cut all characters from maxLength and replace it with \"...\"",
"Uses data from a bar to populate a task.\n\n@param row bar data\n@param task task to populate",
"Resolves an idl jar for the artifact.\n@return Returns idl artifact\n@throws MojoExecutionException is idl jar is not present for the artifact.",
"Calculates the bearing, in degrees, of the end LatLong point from this\nLatLong point.\n\n@param end The point that the bearing is calculated for.\n@return The bearing, in degrees, of the supplied point from this point.",
"Use this API to fetch the statistics of all servicegroup_stats resources that are configured on netscaler.",
"Reconstructs a number that is represented by more than one byte in a network packet in big-endian order.\n\n@param buffer the byte array containing the packet data\n@param start the index of the first byte containing a numeric value\n@param length the number of bytes making up the value\n@return the reconstructed number"
]
|
public void readLock(EntityKey key, int timeout) {
ReadWriteLock lock = getLock( key );
Lock readLock = lock.readLock();
acquireLock( key, timeout, readLock );
} | [
"Acquires a read lock on a specific key.\n@param key The key to lock\n@param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait."
]
| [
"Resolve a path from the rootPath checking that it doesn't go out of the rootPath.\n@param rootPath the starting point for resolution.\n@param path the path we want to resolve.\n@return the resolved path.\n@throws IllegalArgumentException if the resolved path is out of the rootPath or if the resolution failed.",
"Use this API to fetch all the dnstxtrec resources that are configured on netscaler.",
"Evaluates an EL.\n\n@param vars the variables to be available for the evaluation.\n@param el the EL string to evaluate.\n@param returnType the class the EL evaluates to.\n@return the evaluated EL as an instance of the specified return type.\n@throws ELEvalException if the EL could not be evaluated.",
"Build all children.\n\n@return the child descriptions",
"Gets the top of thread-local shell stack, or null if it is empty.\n\n@return the top of the shell stack",
"Put everything smaller than days at 0\n@param cal calendar to be cleaned",
"Request a database sends a list of UUIDs.\n\n@param count The count of UUIDs.",
"Request metadata for a specific track ID, given a dbserver connection to a player that has already been set up.\nSeparated into its own method so it could be used multiple times with the same connection when gathering\nall track metadata.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved metadata, or {@code null} if there is no such track\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations",
"Open a database and build a set of table names.\n\n@param url database URL\n@return set containing table names"
]
|
public static String flatten(String left, String right) {
return left == null || left.isEmpty() ? right : left + "." + right;
} | [
"Links the two field names into a single left.right field name.\nIf the left field is empty, right is returned\n\n@param left one field name\n@param right the other field name\n\n@return left.right or right if left is an empty string"
]
| [
"Derives the OJB platform to use for a database that is connected via a url using the specified\nsubprotocol, and where the specified jdbc driver is used.\n\n@param jdbcSubProtocol The JDBC subprotocol used to connect to the database\n@param jdbcDriver The JDBC driver used to connect to the database\n@return The platform identifier or <code>null</code> if no platform could be found",
"Set up the services to create a channel listener and operation handler service.\n@param serviceTarget the service target to install the services into\n@param endpointName the endpoint name to install the services into\n@param channelName the name of the channel\n@param executorServiceName service name of the executor service to use in the operation handler service\n@param scheduledExecutorServiceName service name of the scheduled executor service to use in the operation handler service",
"Set the html as value inside the tooltip.",
"This will check to see if certain configuration values exist from the ConfigurationService\nIf not then it redirects to the configuration screen",
"Return the AnnotationNode for the named annotation, or else null.\nSupports Groovy 1.5 and Groovy 1.6.\n@param node - the AnnotatedNode\n@param name - the name of the annotation\n@return the AnnotationNode or else null",
"Moves a calendar to the last named day of the month.\n\n@param calendar current date",
"Enable clipping for the Widget. Widget content including its children will be clipped by a\nrectangular View Port. By default clipping is disabled.",
"Checks if a given number is in the range of a short.\n\n@param number\na number which should be in the range of a short (positive or negative)\n\n@see java.lang.Short#MIN_VALUE\n@see java.lang.Short#MAX_VALUE\n\n@return number as a short (rounding might occur)",
"Use this API to fetch the statistics of all protocolip_stats resources that are configured on netscaler."
]
|
public static void main(String[] args) {
try {
JarRunner runner = new JarRunner(args);
runner.runIfConfigured();
} catch (NumberFormatException e) {
System.err.println("Could not parse number " + e.getMessage());
System.exit(1);
} catch (RuntimeException e) {
System.err.println(e.getMessage());
System.exit(1);
}
} | [
"Main executable method of Crawljax CLI.\n\n@param args\nthe arguments."
]
| [
"Creates a resource key for given enumeration value. By convention,\nresource bundle for enumerations has the name of enumeration class\nand value identifier is the same as enumeration value name.\n@param value the enumeration value\n@return the resource key",
"Gets the end.\n\n@return the end",
"Deletes all outgoing links of specified entity.\n\n@param entity the entity.",
"Create users for the given array of addresses. The passwords will be set to the email addresses.\n\n@param greenMail Greenmail instance to create users for\n@param addresses Addresses",
"Gets the progress.\n\n@return the progress",
"Perform a security check against OpenCms.\n\n@param cms The OpenCms object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user",
"Call when you are done with the client\n\n@throws Exception",
"Prints and stores final result of the processing. This should be called\nafter finishing the processing of a dump. It will print the statistics\ngathered during processing and it will write a CSV file with usage counts\nfor every property.",
"Write a relation list field to the JSON file.\n\n@param fieldName field name\n@param value field value"
]
|
public static void applyHyperLinkToElement(DynamicJasperDesign design, DJHyperLink djlink, JRDesignChart chart, String name) {
JRDesignExpression hlpe = ExpressionUtils.createAndRegisterExpression(design, name, djlink.getExpression());
chart.setHyperlinkReferenceExpression(hlpe);
chart.setHyperlinkType( HyperlinkTypeEnum.REFERENCE ); //FIXME Should this be a parameter in the future?
if (djlink.getTooltip() != null){
JRDesignExpression tooltipExp = ExpressionUtils.createAndRegisterExpression(design, "tooltip_" + name, djlink.getTooltip());
chart.setHyperlinkTooltipExpression(tooltipExp);
}
} | [
"Creates necessary objects to make a chart an hyperlink\n\n@param design\n@param djlink\n@param chart\n@param name"
]
| [
"Search one prototype using the prototype index which is equals to the view type. This method\nhas to be implemented because prototypes member is declared with Collection and that interface\ndoesn't allow the client code to get one element by index.\n\n@param prototypeIndex used to search.\n@return prototype renderer.",
"Logs an error message for unhandled exception thrown from the target method.\n\n@param joinPoint - the joint point cut that contains information about the target\n@param throwable - the cause of the exception from the target method invocation",
"Formats an IPTC string for this reference using information obtained from\nSubject Reference System.\n\n@param srs\nreference subject reference system\n@return IPTC formatted reference",
"Convert a Identification to a By used in WebDriver Drivers.\n\n@return the correct By specification of the current Identification.",
"append normal text\n\n@param text normal text\n@return SimplifySpanBuild",
"If any of the given list of properties are not found, returns the\nname of that property. Otherwise, returns null.",
"Returns the next power of 2 after the input value x.\n\n@param x Input value x.\n@return Returns the next power of 2 after the input value x.",
"Creates a bridge accessory, capable of holding multiple child accessories. This has the\nadvantage over multiple standalone accessories of only requiring a single pairing from iOS for\nthe bridge.\n\n@param authInfo authentication information for this accessory. These values should be persisted\nand re-supplied on re-start of your application.\n@param label label for the bridge. This will show in iOS during pairing.\n@param manufacturer manufacturer of the bridge. This information is exposed to iOS for unknown\npurposes.\n@param model model of the bridge. This is also exposed to iOS for unknown purposes.\n@param serialNumber serial number of the bridge. Also exposed. Purposes also unknown.\n@return the bridge, from which you can {@link HomekitRoot#addAccessory add accessories} and\nthen {@link HomekitRoot#start start} handling requests.\n@throws IOException when mDNS cannot connect to the network",
"Reset the Where object so it can be re-used."
]
|
public static audit_stats get(nitro_service service, options option) throws Exception{
audit_stats obj = new audit_stats();
audit_stats[] response = (audit_stats[])obj.stat_resources(service,option);
return response[0];
} | [
"Use this API to fetch the statistics of all audit_stats resources that are configured on netscaler."
]
| [
"Calculates a md5 hash for an url\n\nIf a passed in url is absent then this method will return absent as well\n\n@param url - an url to a soy template file\n@return - md5 checksum of a template file\n@throws IOException - in a case there is an IO error calculating md5 checksum",
"Check that the range resulting from the mask is contiguous, otherwise we cannot represent it.\n\nFor instance, for the range 0 to 3 (bits are 00 to 11), if we mask all 4 numbers from 0 to 3 with 2 (ie bits are 10),\nthen we are left with 1 and 3. 2 is not included. So we cannot represent 1 and 3 as a contiguous range.\n\nThe underlying rule is that mask bits that are 0 must be above the resulting range in each segment.\n\nAny bit in the mask that is 0 must not fall below any bit in the masked segment range that is different between low and high.\n\nAny network mask must eliminate the entire segment range. Any host mask is fine.\n\n@param maskValue\n@param segmentPrefixLength\n@return\n@throws PrefixLenException",
"Calculate a shift value that can be used to create a power-of-two value between\nthe specified maximum and minimum values.\n@param minimumValue the minimum value\n@param maximumValue the maximum value\n@return the calculated shift (use {@code 1 << shift} to obtain a value)",
"Write an int to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The int to write\n@param offset The offset to begin writing at",
"Generate a schedule descriptor for the given start and end date.\n\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule descriptor",
"Writes triples which conect properties with there corresponding rdf\nproperties for statements, simple statements, qualifiers, reference\nattributes and values.\n\n@param document\n@throws RDFHandlerException",
"Use this API to Import sslfipskey.",
"Computes the product of the diagonal elements. For a diagonal or triangular\nmatrix this is the determinant.\n\n@param T A matrix.\n@return product of the diagonal elements.",
"Gets the URL of the route with given name.\n@param routeName to return its URL\n@return URL backed by the route with given name."
]
|
public void bindMappers()
{
JacksonXmlModule xmlModule = new JacksonXmlModule();
xmlModule.setDefaultUseWrapper(false);
XmlMapper xmlMapper = new XmlMapper(xmlModule);
xmlMapper.enable(ToXmlGenerator.Feature.WRITE_XML_DECLARATION);
this.bind(XmlMapper.class).toInstance(xmlMapper);
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objectMapper.configure(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, true);
objectMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true);
objectMapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, true);
objectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
objectMapper.configure(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS, true);
objectMapper.registerModule(new AfterburnerModule());
objectMapper.registerModule(new Jdk8Module());
this.bind(ObjectMapper.class).toInstance(objectMapper);
this.requestStaticInjection(Extractors.class);
this.requestStaticInjection(ServerResponse.class);
} | [
"Override for customizing XmlMapper and ObjectMapper"
]
| [
"Use this API to delete systemuser of given name.",
"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",
"Walk project references recursively, adding thrift files to the provided list.",
"Creates the actual path to the xml file of the module.",
"Decode the String from Base64 into a byte array.\n\n@param value the string to be decoded\n@return the decoded bytes as an array\n@since 1.0",
"We have received notification that a device is no longer on the network, so clear out its artwork.\n\n@param announcement the packet which reported the device’s disappearance",
"Adds the worker thread pool attributes to the subysystem add method",
"Finds an ancestor of a specific type, if possible.\n\n<p>Example: (New York city target, {@link Type#COUNTRY}) returns (US country target)",
"A document that is paused no longer has remote updates applied to it.\nAny local updates to this document cause it to be thawed. An example of pausing a document\nis when a conflict is being resolved for that document and the handler throws an exception.\n\n@param isPaused whether or not this config is frozen"
]
|
public Where<T, ID> not(Where<T, ID> comparison) {
addClause(new Not(pop("NOT")));
return this;
} | [
"Used to NOT the argument clause specified."
]
| [
"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",
"Performs a remote service method invocation. This method is called by\ngenerated proxy classes.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a {@link Request} object that can be used to track the request",
"Use this API to add dospolicy.",
"Filters a dot at the end of the passed package name if present.\n\n@param pkgName\na package name\n@return a filtered package name",
"Convert an Object to a Timestamp, without an Exception",
"Add a single header key-value pair. If one with the name already exists,\nboth stay in the header map.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself.",
"Returns the query string currently in the text field.\n\n@return the query string",
"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.",
"Use this API to enable Interface resources of given names."
]
|
static String replaceCheckDigit(final String iban, final String checkDigit) {
return getCountryCode(iban) + checkDigit + getBban(iban);
} | [
"Returns an iban with replaced check digit.\n\n@param iban The iban\n@return The iban without the check digit"
]
| [
"Read flow id from message.\n\n@param message the message\n@return the FlowId as string",
"Finish the work of building and sending a protocol packet.\n\n@param kind the type of packet to create and send\n@param payload the content which will follow our device name in the packet\n@param destination where the packet should be sent\n@param port the port to which the packet should be sent\n\n@throws IOException if there is a problem sending the packet",
"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.",
"Parse a comma-delimited list of method names into a List of strings.\nWhitespace is ignored.\n\n@param methods the comma delimited list of methods from the spring configuration\n\n@return List<String>",
"Determines the number bytes required to store a variable length\n\n@param i length of Bytes\n@return number of bytes needed",
"Session connect generate channel.\n\n@param session\nthe session\n@return the channel\n@throws JSchException\nthe j sch exception",
"Generate the next available field for a user defined field.\n\n@param <E> field type class\n@param clazz class of the desired field enum\n@param type user defined field type.\n@return field of specified type",
"Checks if a document exist in the database.\n\n@param id The document _id field.\n@return true If the document is found, false otherwise.",
"Adds an item to the list box, specifying its direction and an initial\nvalue for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param dir the item's direction\n@param text the text of the item to be added"
]
|
private Integer getNumId(String idString, boolean isUri) {
String numString;
if (isUri) {
if (!idString.startsWith("http://www.wikidata.org/entity/")) {
return 0;
}
numString = idString.substring("http://www.wikidata.org/entity/Q"
.length());
} else {
numString = idString.substring(1);
}
return Integer.parseInt(numString);
} | [
"Extracts a numeric id from a string, which can be either a Wikidata\nentity URI or a short entity or property id.\n\n@param idString\n@param isUri\n@return numeric id, or 0 if there was an error"
]
| [
"Removes all items from the list box.",
"Use this API to fetch nslimitselector resource of given name .",
"map a property id. Property id can only be an Integer or String",
"Run a task periodically and indefinitely.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@return An interface that lets you query the status; cancel; or\nreschedule the event.",
"Explode the deployment contents and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException",
"Constructs a string representing this address according to the given parameters\n\n@param keepMixed if this address was constructed from a string with mixed representation (a:b:c:d:e:f:1.2.3.4), whether to keep it that way (ignored if makeMixed is true in the params argument)\n@param params the parameters for the address string",
"This method is provided to allow an absolute period of time\nrepresented by start and end dates into a duration in working\ndays based on this calendar instance. This method takes account\nof any exceptions defined for this calendar.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object",
"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",
"Finds the first Field with given field name in the Class and in its super classes.\n\n@param type The Class type\n@param fieldName The field name to get\n@return an {@code Optional}. Use isPresent() to find out if the field name was found."
]
|
public static HashMap<Integer, List<Integer>>
getBalancedNumberOfPrimaryPartitionsPerNode(final Cluster nextCandidateCluster,
Map<Integer, Integer> targetPartitionsPerZone) {
HashMap<Integer, List<Integer>> numPartitionsPerNode = Maps.newHashMap();
for(Integer zoneId: nextCandidateCluster.getZoneIds()) {
List<Integer> partitionsOnNode = Utils.distributeEvenlyIntoList(nextCandidateCluster.getNumberOfNodesInZone(zoneId),
targetPartitionsPerZone.get(zoneId));
numPartitionsPerNode.put(zoneId, partitionsOnNode);
}
return numPartitionsPerNode;
} | [
"Determines how many primary partitions each node within each zone should\nhave. The list of integers returned per zone is the same length as the\nnumber of nodes in that zone.\n\n@param nextCandidateCluster\n@param targetPartitionsPerZone\n@return A map of zoneId to list of target number of partitions per node\nwithin zone."
]
| [
"Constraint that ensures that the field has precision and scale settings if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"This method extracts the XML header comment if available.\n\n@param xmlFile is the XML {@link File} to parse.\n@return the XML comment between the XML header declaration and the root tag or <code>null</code> if NOT\navailable.\n@throws MojoExecutionException if anything goes wrong.",
"Last caller of this method will unregister the Mbean. All callers\ndecrement the counter.",
"Log a message line to the output.",
"Read JaCoCo report determining the format to be used.\n@param executionDataVisitor visitor to store execution data.\n@param sessionInfoStore visitor to store info session.\n@return true if binary format is the latest one.\n@throws IOException in case of error or binary format not supported.",
"Sets the specified starting partition key.\n\n@param paging a paging state",
"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",
"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\"",
"Set the Log4j appender.\n\n@param appender the log4j appender"
]
|
public static <T> T withStreams(Socket socket, @ClosureParams(value=SimpleType.class, options={"java.io.InputStream","java.io.OutputStream"}) Closure<T> closure) throws IOException {
InputStream input = socket.getInputStream();
OutputStream output = socket.getOutputStream();
try {
T result = closure.call(new Object[]{input, output});
InputStream temp1 = input;
input = null;
temp1.close();
OutputStream temp2 = output;
output = null;
temp2.close();
return result;
} finally {
closeWithWarning(input);
closeWithWarning(output);
}
} | [
"Passes the Socket's InputStream and OutputStream to the closure. The\nstreams will be closed after the closure returns, even if an exception\nis thrown.\n\n@param socket a Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.2"
]
| [
"Get the inactive overlay directories.\n\n@return the inactive overlay directories",
"Apply a filter to the list of all tasks, and show the results.\n\n@param project project file\n@param filter filter",
"Return the Payload attached to the current active bucket for |test|.\nAlways returns a payload so the client doesn't crash on a malformed\ntest definition.\n\n@param testName test name\n@return pay load attached to the current active bucket\n@deprecated Use {@link #getPayload(String, Bucket)} instead",
"Retrieves the formatted parent WBS value.\n\n@return formatted parent WBS value",
"Creates a Bytes object by copying the value of the given String",
"Gets a collection.\n\n@param collectionName the name of the collection to return\n@return the collection",
"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",
"Add an exception to a calendar.\n\n@param parentNode parent node\n@param exception calendar exceptions",
"Use this API to fetch appflowpolicy_appflowglobal_binding resources of given name ."
]
|
public static Collection<Component> getComponentsList() {
TransactionLogger instance = getInstance();
if (instance == null) {
return null;
}
return instance.components.values();
} | [
"Get components list for current instance\n@return components"
]
| [
"Reverse how the transition is applied, such that the transition previously performed when progress=start of range is only performed when progress=end of range\n\n@return",
"Only match if the TypeReference is at the specified location within the file.",
"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",
"Create a Map composed of the entries of the first map minus the\nentries of the given map.\n\n@param self a map object\n@param removeMe the entries to remove from the map\n@return the resulting map\n@since 1.7.4",
"Goes through the first buckets, picking out candidate records and\ntallying up their scores.\n@return the index of the first bucket we did not process",
"Returns true if this Bytes object equals another. This method checks it's arguments.\n\n@since 1.2.0",
"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.",
"Start offering shared dbserver sessions.\n\n@throws SocketException if there is a problem opening connections",
"try to find a field in class c, recurse through class hierarchy if necessary\n\n@throws NoSuchFieldException if no Field was found into the class hierarchy"
]
|
public PartialCollection<BoxItem.Info> searchRange(long offset, long limit, final BoxSearchParameters bsp) {
QueryStringBuilder builder = bsp.getQueryParameters()
.appendParam("limit", limit)
.appendParam("offset", offset);
URL url = SEARCH_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), builder.toString());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
String totalCountString = responseJSON.get("total_count").toString();
long fullSize = Double.valueOf(totalCountString).longValue();
PartialCollection<BoxItem.Info> results = new PartialCollection<BoxItem.Info>(offset, limit, fullSize);
JsonArray jsonArray = responseJSON.get("entries").asArray();
for (JsonValue value : jsonArray) {
JsonObject jsonObject = value.asObject();
BoxItem.Info parsedItemInfo = (BoxItem.Info) BoxResource.parseInfo(this.getAPI(), jsonObject);
if (parsedItemInfo != null) {
results.add(parsedItemInfo);
}
}
return results;
} | [
"Searches all descendant folders using a given query and query parameters.\n@param offset is the starting position.\n@param limit the maximum number of items to return. The default is 30 and the maximum is 200.\n@param bsp containing query and advanced search capabilities.\n@return a PartialCollection containing the search results."
]
| [
"Methods returns InetAddress for localhost\n\n@return InetAddress of the localhost\n@throws UnknownHostException if localhost could not be resolved",
"Retrieves the working hours on the given date.\n\n@param date required date\n@param cal optional calendar instance\n@param day optional day instance\n@return working hours",
"Use this API to update gslbservice resources.",
"Use this API to fetch authenticationnegotiatepolicy_binding resource of given name .",
"Extract the field types from the fieldConfigs if they have not already been configured.",
"Sets the replace var map to single target single var.\n\n@param variable\nthe variable\n@param replaceList\n: the list of strings that will replace the variable\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"Return true only if the node has any of the named annotations\n@param node - the AST Node to check\n@param names - the names of the annotations\n@return true only if the node has any of the named annotations",
"Moves a particular enum option to be either before or after another specified enum option in the custom field.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"Use this API to add nspbr6."
]
|
private ClassReference processType(Type type, TypeReferenceLocation typeReferenceLocation, int lineNumber, int columnNumber, int length,
String line)
{
if (type == null)
return null;
ITypeBinding resolveBinding = type.resolveBinding();
if (resolveBinding == null)
{
ResolveClassnameResult resolvedResult = resolveClassname(type.toString());
ResolutionStatus status = resolvedResult.found ? ResolutionStatus.RECOVERED : ResolutionStatus.UNRESOLVED;
PackageAndClassName packageAndClassName = PackageAndClassName.parseFromQualifiedName(resolvedResult.result);
return processTypeAsString(resolvedResult.result, packageAndClassName.packageName, packageAndClassName.className, status,
typeReferenceLocation, lineNumber,
columnNumber, length, line);
}
else
{
return processTypeBinding(type.resolveBinding(), ResolutionStatus.RESOLVED, typeReferenceLocation, lineNumber,
columnNumber, length, line);
}
} | [
"The method determines if the type can be resolved and if not, will try to guess the qualified name using the information from the imports."
]
| [
"Send JSON representation of given data object to all connections tagged with\ngiven label\n@param data the data object\n@param label the tag label",
"Retrieve the finish slack.\n\n@return finish slack",
"Package-protected method used to initiate operation execution.\n@return the result action",
"Get the time zone for a specific stock or index.\nFor stocks, the exchange suffix is extracted from the stock symbol to retrieve the time zone.\n\n@param symbol stock symbol in YahooFinance\n@return time zone of the exchange on which this stock is traded",
"Create a new custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object",
"Calculates the tiles width and height.\n\n@param code\nThe unique tile code. Determines what tile we're talking about.\n@param maxExtent\nThe maximum extent of the grid to which this tile belongs.\n@param scale\nThe current client side scale.\n@return Returns an array of double values where the first value is the tile width and the second value is the\ntile height.",
"Creates a string representation of the given node. Useful for debugging.\n\n@return a debug string for the given node.",
"Use this API to fetch all the sslcipher resources that are configured on netscaler.",
"Get the named method from the class\n\n@param c The class to get the method from\n@param name The method name\n@param argTypes The argument types\n@return The method"
]
|
protected void readUUID(StreamReader stream, Map<String, Object> map) throws IOException
{
int unknown0Size = stream.getMajorVersion() > 5 ? 8 : 16;
map.put("UNKNOWN0", stream.readBytes(unknown0Size));
map.put("UUID", stream.readUUID());
} | [
"Read the optional row header and UUID.\n\n@param stream input stream\n@param map row map"
]
| [
"Performs a Versioned put operation with the specified composite request\nobject\n\n@param requestWrapper Composite request object containing the key and the\nversioned object\n@return Version of the value for the successful put\n@throws ObsoleteVersionException",
"Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments",
"Rename a key for all languages.\n@param oldKey the key to rename\n@param newKey the new key name\n@return <code>true</code> if renaming was successful, <code>false</code> otherwise.",
"Check if we still need more nodes from the given zone and reduce the\nzoneReplicationFactor count accordingly.\n\n@param requiredRepFactor\n@param zoneId\n@return",
"This method is used to automatically generate a value\nfor the WBS field of this task.\n\n@param parent Parent Task",
"Returns the total number of weights associated with this classifier.\n\n@return number of weights",
"Use this API to Force hafailover.",
"Build list of style filters from style definitions.\n\n@param styleDefinitions\nlist of style definitions\n@return list of style filters\n@throws GeomajasException",
"Returns a compact representation of all of the stories on the task.\n\n@param task The task containing the stories to get.\n@return Request object"
]
|
public <V> V attach(final AttachmentKey<V> key, final V value) {
assert key != null;
return key.cast(contextAttachments.put(key, value));
} | [
"Attaches an arbitrary object to this context.\n\n@param key they attachment key used to ensure uniqueness and used for retrieval of the value.\n@param value the value to store.\n@param <V> the value type of the attachment.\n\n@return the previous value associated with the key or {@code null} if there was no previous value."
]
| [
"Assign to the data object the val corresponding to the fieldType.",
"Adds the class descriptor to this model.\n\n@param classDef The class descriptor\n@return The class descriptor or <code>null</code> if there is no such class in this model",
"See if a simple sequence can be used to extract the array. A simple extent is a continuous block from\na min to max index\n\n@return true if it is a simple range or false if not",
"Orders first by word, then by tag.\n\n@param wordTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)",
"Cancel all currently active operations.\n\n@return a list of cancelled operations",
"Deletes any empty directories under the output directory. These\ndirectories are created by TestNG for its own reports regardless\nof whether those reports are generated. If you are using the\ndefault TestNG reports as well as ReportNG, these directories will\nnot be empty and will be retained. Otherwise they will be removed.\n@param outputDirectory The directory to search for empty directories.",
"Determines if this value is the default value for the given field type.\n\n@param type field type\n@param value value\n@return true if the value is not default",
"Sets the last operation response.\n\n@param response the last operation response.",
"Checks if two claims are equivalent in the sense that they have the same\nmain snak and the same qualifiers, but possibly in a different order.\n\n@param claim1\n@param claim2\n@return true if claims are equivalent"
]
|
@Override
public String upload(byte[] data, UploadMetaData metaData) throws FlickrException {
Payload payload = new Payload(data);
return sendUploadRequest(metaData, payload);
} | [
"Upload a photo from a byte-array.\n\n@param data\nThe photo data as a byte array\n@param metaData\nThe meta data\n@return photoId or ticketId\n@throws FlickrException"
]
| [
"Click handler for bottom drawer items.",
"Safe write error response.\n\n@param channel the channel\n@param header the request header\n@param error the exception",
"Returns a color for a given absolute number that is to be shown on the\nmap.\n\n@param value\n@return",
"Returns iterable containing assignments for this single legal hold policy.\nParameters can be used to filter retrieved assignments.\n@param type filter assignments of this type only.\nCan be \"file_version\", \"file\", \"folder\", \"user\" or null if no type filter is necessary.\n@param id filter assignments to this ID only. Can be null if no id filter is necessary.\n@param limit the limit of entries per page. Default limit is 100.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy.",
"Returns an array of all the singular values in A sorted in ascending order\n\n@param A Matrix. Not modified.\n@return singular values",
"Given a list of store definitions, filters the list depending on the\nboolean\n\n@param storeDefs Complete list of store definitions\n@param isReadOnly Boolean indicating whether filter on read-only or not?\n@return List of filtered store definition",
"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.",
"Merges the immutable container types of this Configuration with the given\nConfiguration.\n\nThe resultant immutable container types results will be the union of the two sets of\nimmutable container types. Where the type is found in both\nConfigurations, the result from otherConfiguration will replace the\nexisting result in this Configuration. This replacement behaviour will\noccur for subsequent calls to\n{@link #mergeImmutableContainerTypesFrom(Configuration)} .\n\n@param otherConfiguration - Configuration to merge immutable container types with.",
"Returns new boolean matrix with true or false values selected with equal probability.\n\n@param numRow Number of rows in the new matrix.\n@param numCol Number of columns in the new matrix.\n@param rand Random number generator used to fill the matrix.\n@return The randomly generated matrix."
]
|
public synchronized HttpServer<Buffer, Buffer> start() throws Exception {
if (server == null) {
server = createProtocolListener();
}
return server;
} | [
"Start a server.\n\n@return the http server\n@throws Exception the exception"
]
| [
"Create a temporary directory under a given workspace",
"Append the bounding volume particle positions, times and velocities to the existing mesh\nbefore creating a new scene object with this mesh attached to it.\nAlso, append every created scene object and its creation time to corresponding array lists.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps",
"Utility method used to round a double to the given precision.\n\n@param value value to truncate\n@param precision Number of decimals to round to.\n@return double value",
"Use this API to reset Interface resources.",
"Add a content modification.\n\n@param modification the content modification",
"Transforms the category path of a category to the category.\n@return a map from root or site path to category.",
"Returns a compact representation of all of the projects the task is in.\n\n@param task The task to get projects on.\n@return Request object",
"Store a comment based on comment text, gavc and user information\n\n@param gavc - entity id\n@param commentText - comment text\n@param credential - user credentials\n@param entityType - type of the entity",
"Trim and append a file separator to the string"
]
|
void onSurfaceChanged(int width, int height) {
Log.v(TAG, "onSurfaceChanged");
final VrAppSettings.EyeBufferParams.DepthFormat depthFormat = mApplication.getAppSettings().getEyeBufferParams().getDepthFormat();
mApplication.getConfigurationManager().configureRendering(VrAppSettings.EyeBufferParams.DepthFormat.DEPTH_24_STENCIL_8 == depthFormat);
} | [
"Called when the surface is created or recreated. Avoided because this can\nbe called twice at the beginning."
]
| [
"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",
"Returns the index of the eigenvalue which has the largest magnitude.\n\n@return index of the largest magnitude eigen value.",
"Join N sets.",
"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",
"This method searches in the Component Management Service, so given an\nagent name returns its IExternalAccess\n\n@param agent_name\nThe name of the agent in the platform\n@return The IComponentIdentifier of the agent in the platform",
"Returns the names of the bundles configured as workplace bundles in any module configuration.\n@return the names of the bundles configured as workplace bundles in any module configuration.",
"Creates metadata on this folder using a specified scope and template.\n\n@param templateName the name of the metadata template.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").\n@param metadata the new metadata values.\n@return the metadata returned from the server.",
"Print a booking type.\n\n@param value BookingType instance\n@return booking type value",
"Use this API to update responderparam."
]
|
public List<NodeInfo> getNodes() {
final URI uri = uriWithPath("./nodes/");
return Arrays.asList(this.rt.getForObject(uri, NodeInfo[].class));
} | [
"Retrieves state and metrics information for all nodes in the cluster.\n\n@return list of nodes in the cluster"
]
| [
"Use this API to update gslbsite resources.",
"Returns a flag, indicating if search should be performed using a wildcard if the empty query is given.\n@return A flag, indicating if search should be performed using a wildcard if the empty query is given.",
"Log a message at the provided level.",
"Add a task to the project.\n\n@return new task instance",
"Process this deployment for annotations. This will use an annotation indexer to create an index of all annotations\nfound in this deployment and attach it to the deployment unit context.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"Use this API to fetch nsacl6 resources of given names .",
"Returns a licenses regarding its Id and a fake on if no license exist with such an Id\n\n@param licenseId String\n@return License",
"Parse a parameterized object from an InputStream.\n\n@param is The InputStream, most likely from your networking library.\n@param jsonObjectType The ParameterizedType describing the object. Ex: LoganSquare.parse(is, new ParameterizedType<MyModel<OtherModel>>() { });",
"Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)"
]
|
private void deliverFaderStartCommand(Set<Integer> playersToStart, Set<Integer> playersToStop) {
for (final FaderStartListener listener : getFaderStartListeners()) {
try {
listener.fadersChanged(playersToStart, playersToStop);
} catch (Throwable t) {
logger.warn("Problem delivering fader start command to listener", t);
}
}
} | [
"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"
]
| [
"Cosine interpolation.\n\n@param x1 X1 Value.\n@param x2 X2 Value.\n@param a Value.\n@return Value.",
"Replaces the model used to depict the controller in the scene.\n\n@param controllerModel root of hierarchy to use for controller model\n@see #getControllerModel()\n@see #showControllerModel(boolean)",
"Computes the p=2 norm. If A is a matrix then the induced norm is computed. This\nimplementation is faster, but more prone to buffer overflow or underflow problems.\n\n@param A Matrix or vector.\n@return The norm.",
"Utility function to get the current text.",
"Function to perform backward pooling",
"Checks the given field descriptor.\n\n@param fieldDef The field descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Writes the torque schemata to files in the given directory and returns\na comma-separated list of the filenames.\n\n@param dir The directory to write the files to\n@return The list of filenames\n@throws IOException If an error occurred",
"Method used to extract data from the block of properties and\ninsert the key value pair into a map.\n\n@param data block of property data\n@param previousItemOffset previous offset\n@param previousItemKey item key\n@param itemOffset current item offset",
"Creates the save and exit button UI Component.\n@return the save and exit button."
]
|
private void parseMacro( TokenList tokens , Sequence sequence ) {
Macro macro = new Macro();
TokenList.Token t = tokens.getFirst().next;
if( t.word == null ) {
throw new ParseError("Expected the macro's name after "+tokens.getFirst().word);
}
List<TokenList.Token> variableTokens = new ArrayList<TokenList.Token>();
macro.name = t.word;
t = t.next;
t = parseMacroInput(variableTokens, t);
for( TokenList.Token a : variableTokens ) {
if( a.word == null) throw new ParseError("expected word in macro header");
macro.inputs.add(a.word);
}
t = t.next;
if( t == null || t.getSymbol() != Symbol.ASSIGN)
throw new ParseError("Expected assignment");
t = t.next;
macro.tokens = new TokenList(t,tokens.last);
sequence.addOperation(macro.createOperation(macros));
} | [
"Parse a macro defintion.\n\n\"macro NAME( var0 , var1 ) = 5+var0+var1'"
]
| [
"Format the message using the pattern and the arguments.\n\n@param pattern the pattern in the format of \"{1} this is a {2}\"\n@param arguments the arguments.\n@return the formatted result.",
"Edit the text of a comment as the currently authenticated user.\n\nThis method requires authentication with 'write' permission.\n\n@param commentId\nThe id of the comment to edit.\n@param commentText\nUpdate the comment to this text.\n@throws FlickrException",
"Format the label text.\n\n@param scaleUnit The unit used for the scalebar.\n@param value The scale value.\n@param intervalUnit The scaled unit for the intervals.",
"Serializes Number value and writes it into specified buffer.",
"Execute blocking for a prepared result.\n\n@param operation the operation to execute\n@param client the protocol client\n@return the prepared operation\n@throws IOException\n@throws InterruptedException",
"If the user has not specified a project ID, this method\nretrieves the ID of the first project in the file.",
"Save a SVG graphic to the given path.\n\n@param graphics2d The SVG graphic to save.\n@param path The file.",
"Returns the default shared instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object",
"Initialize the metadata cache with system store list"
]
|
public static base_responses add(nitro_service client, route6 resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
route6 addresources[] = new route6[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new route6();
addresources[i].network = resources[i].network;
addresources[i].gateway = resources[i].gateway;
addresources[i].vlan = resources[i].vlan;
addresources[i].weight = resources[i].weight;
addresources[i].distance = resources[i].distance;
addresources[i].cost = resources[i].cost;
addresources[i].advertise = resources[i].advertise;
addresources[i].msr = resources[i].msr;
addresources[i].monitor = resources[i].monitor;
addresources[i].td = resources[i].td;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"Use this API to add route6 resources."
]
| [
"Returns a list of objects for each line in the spreadsheet, of the specified type.\n\n<p>\nIf the class is a view model then the objects will be properly instantiated (that is, using\n{@link DomainObjectContainer#newViewModelInstance(Class, String)}, with the correct\nview model memento); otherwise the objects will be simple transient objects (that is, using\n{@link DomainObjectContainer#newTransientInstance(Class)}).\n</p>",
"Get the property name from the expression.\n\n@param expression expression\n@return property name",
"Delete rows that match the prepared statement.",
"Use this API to add gslbservice.",
"Add a list of enums to the options map\n@param key The key for the options map (ex: \"include[]\")\n@param list A list of enums",
"Retrieves list of inbox messages based on given userId\n@param userId String userid\n@return ArrayList of {@link CTMessageDAO}",
"Get the element at the index as an integer.\n\n@param i the index of the element to access",
"Retrieve a timestamp field.\n\n@param dateName field containing the date component\n@param timeName field containing the time component\n@return Date instance",
"Facade method for operating the Shell.\n\nRun the obtained Shell with commandLoop().\n\n@see org.gearvrf.debug.cli.Shell#Shell(org.gearvrf.debug.cli.Shell.Settings, org.gearvrf.debug.cli.CommandTable, java.util.List)\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Command handler\n@return Shell that can be either further customized or run directly by calling commandLoop()."
]
|
public Search counts(String[] countsfields) {
assert (countsfields.length > 0);
JsonArray countsJsonArray = new JsonArray();
for(String countsfield : countsfields) {
JsonPrimitive element = new JsonPrimitive(countsfield);
countsJsonArray.add(element);
}
databaseHelper.query("counts", countsJsonArray);
return this;
} | [
"Array of fieldNames for which counts should be produced\n\n@param countsfields array of the field names\n@return this for additional parameter setting or to query"
]
| [
"Get a list of referrers from a given domain to a photoset.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param photosetId\n(Optional) The id of the photoset to get stats for. If not provided, stats for all sets will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotosetReferrers.html\"",
"Returns the property value read from the given JavaBean.\n\n@param bean the JavaBean to read the property from\n@param property the property to read\n\n@return the property value read from the given JavaBean",
"Return an instance of this class.\n\n@param container Solr CoreContainer container object in order to create a server object.\n\n@return instance of CmsSolrSpellchecker",
"Removes double-quotes from around a string\n@param str\n@return",
"Creates a searchable item that represents a metadata field found for a track.\n\n@param menuItem the rendered menu item containing the searchable metadata field\n@return the searchable metadata field",
"Use this API to add clusternodegroup resources.",
"A safe wrapper to destroy the given resource request.",
"Get the aggregated result human readable string for easy display.\n\n\n@param aggregateResultMap the aggregate result map\n@return the aggregated result human",
"Log a warning for the resource at the provided address and the given attributes, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param message custom error message to append\n@param attributes attributes we that have problems about"
]
|
static boolean killProcess(final String processName, int id) {
int pid;
try {
pid = processUtils.resolveProcessId(processName, id);
if(pid > 0) {
try {
Runtime.getRuntime().exec(processUtils.getKillCommand(pid));
return true;
} catch (Throwable t) {
ProcessLogger.ROOT_LOGGER.debugf(t, "failed to kill process '%s' with pid '%s'", processName, pid);
}
}
} catch (Throwable t) {
ProcessLogger.ROOT_LOGGER.debugf(t, "failed to resolve pid of process '%s'", processName);
}
return false;
} | [
"Try to kill a given process.\n\n@param processName the process name\n@param id the process integer id, or {@code -1} if this is not relevant\n@return {@code true} if the command succeeded, {@code false} otherwise"
]
| [
"Sets the value associated with the given key; if the the key is one\nof the hashable keys, throws an exception.\n\n@throws HashableCoreMapException Attempting to set the value for an\nimmutable, hashable key.",
"Return the number of ignored or assumption-ignored tests.",
"Log a fatal message with a throwable.",
"Returns all the deployment runtime names associated with an overlay accross all server groups.\n\n@param context the current OperationContext.\n@param overlay the name of the overlay.\n@return all the deployment runtime names associated with an overlay accross all server groups.",
"Returns a long between interval\n@param min Minimum value\n@param max Maximum value\n@return long number",
"Increases the internal array's length by the specified amount. Previous values are preserved.\nThe length value is not modified since this does not change the 'meaning' of the array, just\nincreases the amount of data which can be stored in it.\n\nthis.data = new data_type[ data.length + amount ]\n\n\n@param amount Number of elements added to the internal array's length",
"Use this API to count nstrafficdomain_bridgegroup_binding resources configued on NetScaler.",
"Computes the QR decomposition of A and store the results in A.\n\n@param A The A matrix in the linear equation. Modified. Reference saved.\n@return true if the decomposition was successful.",
"Suite prologue."
]
|
public void fireEvent(Type eventType, Object event, Annotation... qualifiers) {
final EventMetadata metadata = new EventMetadataImpl(eventType, null, qualifiers);
notifier.fireEvent(eventType, event, metadata, qualifiers);
} | [
"Fire an event and notify observers that belong to this module.\n@param eventType\n@param event\n@param qualifiers"
]
| [
"Use this API to fetch auditsyslogpolicy_vpnglobal_binding resources of given name .",
"Method used to read the sub project details from a byte array.\n\n@param data byte array\n@param uniqueIDOffset offset of unique ID\n@param filePathOffset offset of file path\n@param fileNameOffset offset of file name\n@param subprojectIndex index of the subproject, used to calculate unique id offset\n@return new SubProject instance",
"Only converts the B matrix and passes that onto solve. Te result is then copied into\nthe input 'X' matrix.\n\n@param B A matrix ℜ <sup>m × p</sup>. Not modified.\n@param X A matrix ℜ <sup>n × p</sup>, where the solution is written to. Modified.",
"Returns a new color that has the hue adjusted by the specified\namount.",
"Appends the GROUP BY clause for the Query\n@param groupByFields\n@param buf",
"Finds the parent address, everything before the last address part.\n\n@param address the address to get the parent\n\n@return the parent address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty",
"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",
"Counts the number of elements in A which are true\n@param A input matrix\n@return number of true elements",
"Returns the perma link for the given resource and optional detail content.<p<\n\n@param cms the CMS context to use\n@param resourceName the page to generate the perma link for\n@param detailContentId the structure id of the detail content (may be null)\n\n@return the perma link"
]
|
public void cleanup() {
List<String> keys = new ArrayList<>(created.keySet());
keys.sort(String::compareTo);
for (String key : keys) {
created.remove(key)
.stream()
.sorted(Comparator.comparing(HasMetadata::getKind))
.forEach(metadata -> {
log.info(String.format("Deleting %s : %s", key, metadata.getKind()));
deleteWithRetries(metadata);
});
}
} | [
"Removes all resources deployed using this class."
]
| [
"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",
"Returns a single template.\n\n@param id id of the template to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Manage the artifact add to the Module AbstractGraph\n\n@param graph\n@param depth",
"Resolve the given string using any plugin and the DMR resolve method",
"Returns all the version directories present in the root directory\nspecified\n\n@param rootDir The parent directory\n@param maxId The\n@return An array of version directories",
"Adds each required length, ensuring it isn't negative.\n\n@param requiredLengths\none or more required lengths\n@throws IllegalArgumentException\nif a supplied length is negative",
"Use this API to fetch a systemglobal_authenticationldappolicy_binding resources.",
"Replace full request content.\n\n@param requestContentTemplate\nthe request content template\n@param replacementString\nthe replacement string\n@return the string",
"Requests Change notifications of feed type normal.\n\n@return {@link ChangesResult} encapsulating the normal feed changes"
]
|
public void deleteInactiveContent() throws PatchingException {
List<File> dirs = getInactiveHistory();
if (!dirs.isEmpty()) {
for (File dir : dirs) {
deleteDir(dir, ALL);
}
}
dirs = getInactiveOverlays();
if (!dirs.isEmpty()) {
for (File dir : dirs) {
deleteDir(dir, ALL);
}
}
} | [
"Delete inactive contents."
]
| [
"Calls the provided closure for a \"page\" of rows from the table represented by this DataSet.\nA page is defined as starting at a 1-based offset, and containing a maximum number of rows.\n\n@param offset the 1-based offset for the first row to be processed\n@param maxRows the maximum number of rows to be processed\n@param closure called for each row with a GroovyResultSet\n@throws SQLException if a database access error occurs\n@see groovy.sql.Sql#eachRow(String, java.util.List, int, int, groovy.lang.Closure)",
"Gets the declared bean type\n\n@return The bean type",
"Process a text-based PP file.\n\n@param inputStream file input stream\n@return ProjectFile instance",
"From v3_epoly.js, calculates the distance between this LatLong point and\nanother.\n\n@param end The end point to calculate the distance to.\n@return The distance, in metres, to the end point.",
"Returns a new color with a new value of the specified HSL\ncomponent.",
"Creates a Bytes object by copying the data of a subsequence of the given byte array\n\n@param data Byte data\n@param offset Starting offset in byte array (inclusive)\n@param length Number of bytes to include",
"Use this API to delete gslbservice of given name.",
"Converts the node to JSON\n@return JSON object",
"Send parallel task to execution manager.\n\n@param task\nthe parallel task\n@return the batch response from manager"
]
|
public void addGroupBy(String[] fieldNames)
{
for (int i = 0; i < fieldNames.length; i++)
{
addGroupBy(fieldNames[i]);
}
} | [
"Adds an array of groupby fieldNames for ReportQueries.\n@param fieldNames The groupby to set\n@deprecated use QueryByCriteria#addGroupBy"
]
| [
"Get the error message with the dependencies appended\n\n@param dependencies - the list with dependencies to be attached to the message\n@param message - the custom error message to be displayed to the user\n@return String",
"Post-configure retreival of server engine.",
"A specific, existing project can be deleted by making a DELETE request\non the URL for that project.\n\nReturns an empty data record.\n\n@param project The project to delete.\n@return Request object",
"Upcasts a Builder instance to the generated superclass, to allow access to private fields.\n\n<p>Reuses an existing upcast instance if one was already declared in this scope.\n\n@param code the {@link SourceBuilder} to add the declaration to\n@param datatype metadata about the user type the builder is being generated for\n@param builder the Builder instance to upcast\n@returns a variable holding the upcasted instance",
"Remove all existing subscriptions",
"Appends to the statement table and all tables joined to it.\n@param alias the table alias\n@param where append conditions for WHERE clause here",
"Merge the given maps.\n\n<p>\nThe replied map is a view on the given two maps.\nIf a key exists in the two maps, the replied value is the value of the right operand.\n</p>\n\n<p>\nEven if the key of the right operand exists in the left operand, the value in the right operand is preferred.\n</p>\n\n<p>\nThe replied map is unmodifiable.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@since 2.15",
"Creates a new pagination configuration if at least one of the provided parameters is not null.\nOtherwise returns null.\n@param pageParam The request parameter used to send the current page number.\n@param pageSizes The page sizes for the first pages. The last provided size is the size of all following pages.\n@param pageNavLength The length of the \"Google\"-like page navigation. Should be an odd number.\n@return the pagination configuration, or <code>null</code> if none of the provided parameters is not null.",
"Stops the playback of a sound and destroys the corresponding Sound Object or Soundfield."
]
|
public static cacheobject[] get(nitro_service service, cacheobject_args args) throws Exception{
cacheobject obj = new cacheobject();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
cacheobject[] response = (cacheobject[])obj.get_resources(service, option);
return response;
} | [
"Use this API to fetch all the cacheobject resources that are configured on netscaler.\nThis uses cacheobject_args which is a way to provide additional arguments while fetching the resources."
]
| [
"Iterates through the given InputStream line by line using the specified\nencoding, splitting each line using the given separator. The list of tokens\nfor each line is then passed to the given closure. Finally, the stream\nis closed.\n\n@param stream an InputStream\n@param regex the delimiting regular expression\n@param charset opens the stream with a specified charset\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see #splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5",
"Adds a measure to the crosstab. A crosstab can have many measures. DJ will lay out one measure above\nthe other.\n\nA measure is what is shown on each intersection of a column and a row. A calculation is performed to\nall occurrences in the datasource where the column and row values matches (between elements)\n\nThe only difference between the prior methods is that this method sets \"visible\" to false\n\n@param property\n@param className\n@param title\n@return",
"Use this API to update nsdiameter.",
"Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nunless we have a metadata cache available for the specified media slot, in which case that will be used instead.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n\n@return the metadata, if any",
"Returns a compact representation of all of the tags the task has.\n\n@param task The task to get tags on.\n@return Request object",
"Use this API to fetch all the snmpuser resources that are configured on netscaler.",
"Set the values using the specified Properties object.\n\n@param properties Properties object containing specific property values\nfor the RESTClient config\n\nNote: We're using the same property names as that in ClientConfig\nfor backwards compatibility.",
"Obtain override ID\n\n@param overrideIdentifier can be the override ID or class name\n@return\n@throws Exception",
"Use this API to fetch all the nslimitselector resources that are configured on netscaler."
]
|
public void explore() {
if (isLeaf) return;
if (isGeneric) return;
removeAllChildren();
try {
String addressPath = addressPath();
ModelNode resourceDesc = executor.doCommand(addressPath + ":read-resource-description");
resourceDesc = resourceDesc.get("result");
ModelNode response = executor.doCommand(addressPath + ":read-resource(include-runtime=true,include-defaults=true)");
ModelNode result = response.get("result");
if (!result.isDefined()) return;
List<String> childrenTypes = getChildrenTypes(addressPath);
for (ModelNode node : result.asList()) {
Property prop = node.asProperty();
if (childrenTypes.contains(prop.getName())) { // resource node
if (hasGenericOperations(addressPath, prop.getName())) {
add(new ManagementModelNode(cliGuiCtx, new UserObject(node, prop.getName())));
}
if (prop.getValue().isDefined()) {
for (ModelNode innerNode : prop.getValue().asList()) {
UserObject usrObj = new UserObject(innerNode, prop.getName(), innerNode.asProperty().getName());
add(new ManagementModelNode(cliGuiCtx, usrObj));
}
}
} else { // attribute node
UserObject usrObj = new UserObject(node, resourceDesc, prop.getName(), prop.getValue().asString());
add(new ManagementModelNode(cliGuiCtx, usrObj));
}
}
} catch (Exception e) {
e.printStackTrace();
}
} | [
"Refresh children using read-resource operation."
]
| [
"Sets the text alignment for all cells in the table.\n@param textAlignment new text alignment\n@throws NullPointerException if the argument was null\n@return this to allow chaining\n@throws {@link NullPointerException} if the argument was null",
"This method removes line breaks from a piece of text, and replaces\nthem with the supplied text.\n\n@param text source text\n@param replacement line break replacement text\n@return text with line breaks removed.",
"Returns the primarykey fields.\n\n@return The field descriptors of the primarykey fields",
"Use this API to unset the properties of nsrpcnode resources.\nProperties that need to be unset are specified in args array.",
"Resizes the array that represents this bit vector.\n\n@param newArraySize\nnew array size",
"Creates a new Logger instance for the specified name.",
"Throws an IllegalStateException when the given value is not null.\n@return the value",
"Use this API to fetch all the rsskeytype resources that are configured on netscaler.",
"Find the path to use .\nUses java annotations first and if not found, uses kubernetes annotations on the service object.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved path of '/' as a fallback."
]
|
SimpleJsonEncoder appendToJSONUnquoted(final String key, final Object value) {
if (closed) {
throw new IllegalStateException("Encoder already closed");
}
if (value != null) {
appendKey(key);
sb.append(value);
}
return this;
} | [
"Append field with quotes and escape characters added in the key, if required.\nThe value is added without quotes and any escape characters.\n\n@return this"
]
| [
"Resize and return the image passing the new height and width\n\n@param height\n@param width\n@return",
"Remove a part of a CharSequence. This replaces the first occurrence\nof the pattern within self with '' and returns the result.\n\n@param self a String\n@param pattern a Pattern representing the part to remove\n@return a String minus the part to be removed\n@since 2.2.0",
"Register child resources associated with this resource.\n\n@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition",
"The user making this call must be an admin in the workspace.\nReturns an empty data record.\n\n@param workspace The workspace or organization to invite the user to.\n@return Request object",
"If status is in failed state then throw CloudException.",
"Adds an option to the JVM arguments to enable JMX connection\n\n@param jvmArgs the JVM args\n@return a new list of JVM args",
"Reads a nested table. Uses the supplied reader class instance.\n\n@param readerClass reader class instance\n@return table rows",
"Create a handful of default currencies to keep Primavera happy.",
"Finish configuration."
]
|
public void spawnThread(DukeController controller, int check_interval) {
this.controller = controller;
timer = mgr.schedule(this, 0, check_interval * 1000); // convert to ms
} | [
"Starts a background thread which calls the controller every\ncheck_interval milliseconds. Returns immediately, leaving the\nbackground thread running."
]
| [
"Adds the specified list of users as members of the project. Returns the updated project record.\n\n@param project The project to add members to.\n@return Request object",
"not start with another option name",
"Parses an item id\n\n@param id\nthe identifier of the entity, such as \"Q42\"\n@param siteIri\nthe siteIRI that this value refers to\n@throws IllegalArgumentException\nif the id is invalid",
"Creates a statement with parameters that should work with most RDBMS.",
"Whether or not points are within some threshold.\n@param point1 Point 1\n@param point2 Point 2\n@return True or false",
"Based on a provided locale return a SoyMsgBundle file.\n\nIf a passed in locale object is \"Optional.absent()\",\nthe implementation will return Optional.absent() as well\n@param locale - maybe locale\n@return maybe soy msg bundle",
"Retrieves the text value for the baseline duration.\n\n@return baseline duration text",
"If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X.",
"Creates an element that represents a single positioned box containing the specified text string.\n@param data the text string to be contained in the created box.\n@return the resulting DOM element"
]
|
public static URL codeLocationFromURL(String url) {
try {
return new URL(url);
} catch (Exception e) {
throw new InvalidCodeLocation(url);
}
} | [
"Creates a code location URL from a URL\n\n@param url the URL external form\n@return A URL created from URL\n@throws InvalidCodeLocation if URL creation fails"
]
| [
"Execute a request through Odo processing\n\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@param history",
"Get all sub-lists of the given list of the given sizes.\n\nFor example:\n\n<pre>\nList<String> items = Arrays.asList("a", "b", "c", "d");\nSystem.out.println(CollectionUtils.getNGrams(items, 1, 2));\n</pre>\n\nwould print out:\n\n<pre>\n[[a], [a, b], [b], [b, c], [c], [c, d], [d]]\n</pre>\n\n@param <T>\nThe type of items contained in the list.\n@param items\nThe list of items.\n@param minSize\nThe minimum size of an ngram.\n@param maxSize\nThe maximum size of an ngram.\n@return All sub-lists of the given sizes.",
"Writes task baseline data.\n\n@param xmlTask MSPDI task\n@param mpxjTask MPXJ task",
"Finds to a given point p the point on the spline with minimum distance.\n@param p Point where the nearest distance is searched for\n@param nPointsPerSegment Number of interpolation points between two support points\n@return Point spline which has the minimum distance to p",
"Use this API to fetch the statistics of all protocoludp_stats resources that are configured on netscaler.",
"The main entry point for processing graphical indicator definitions.\n\n@param indicators graphical indicators container\n@param properties project properties\n@param props properties data",
"Cosine interpolation.\n\n@param x1 X1 Value.\n@param x2 X2 Value.\n@param a Value.\n@return Value.",
"Register operations associated with this resource.\n\n@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition",
"Sets the site root.\n\n@param siteRoot the site root"
]
|
public static Deployment of(final URL url) {
final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("url", url));
return new Deployment(deploymentContent, null);
} | [
"Creates a new deployment for the URL. The target server will require access to the URL.\n\n@param url the URL representing the content\n\n@return the deployment"
]
| [
"Initialize current thread's JobContext using specified copy\n@param origin the original job context",
"Attaches the menu drawer to the content view.",
"Adds the task to the specified project, in the optional location\nspecified. If no location arguments are given, the task will be added to\nthe end of the project.\n\n`addProject` can also be used to reorder a task within a project or section that\nalready contains it.\n\nAt most one of `insert_before`, `insert_after`, or `section` should be\nspecified. Inserting into a section in an non-order-dependent way can be\ndone by specifying `section`, otherwise, to insert within a section in a\nparticular place, specify `insert_before` or `insert_after` and a task\nwithin the section to anchor the position of this task.\n\nReturns an empty data block.\n\n@param task The task to add to a project.\n@return Request object",
"Use this API to add sslcipher.",
"Internal method used to test for the existence of a relationship\nwith a task.\n\n@param task target task\n@param list list of relationships\n@return boolean flag",
"Creates the database.\n\n@throws PlatformException If some error occurred",
"Returns the log message id used by this checker. This is used to group it so that all attributes failing a type of rejction\nend up in the same error message. This default implementation uses the formatted log message with an empty attribute map as the id.\n\n@return the log message id",
"Replies the elements of the given map except the pair with the given key.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param key the key to remove.\n@return the map with the content of the map except the key.\n@since 2.15",
"Lookup the group for the specified URL.\n\n@param url\nThe url\n@return The group\n@throws FlickrException"
]
|
public static void dumpNodeAnim(AiNodeAnim nodeAnim) {
for (int i = 0; i < nodeAnim.getNumPosKeys(); i++) {
System.out.println(i + ": " + nodeAnim.getPosKeyTime(i) +
" ticks, " + nodeAnim.getPosKeyVector(i, Jassimp.BUILTIN));
}
} | [
"Dumps an animation channel to stdout.\n\n@param nodeAnim the channel"
]
| [
"Create a set containing all the processor at the current node and the entire subgraph.",
"Sets the character translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator",
"Iterates over the elements of an iterable collection of items, starting from\na specified startIndex, and returns the index values of the items that match\nthe condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from this index\n@param closure the filter to perform a match on the collection\n@return a list of numbers corresponding to the index values of all matched objects\n@since 1.5.2",
"Process the deployment root for the manifest.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"Returns true if the string is a valid Java full qualified class name.\n\n@param str the string to be examined\n@return true if str is a valid Java Fqcn",
"Write a duration field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Creates and returns a temporary directory for a printing task.",
"Calculates a md5 hash for an url\n\nIf a passed in url is absent then this method will return absent as well\n\n@param url - an url to a soy template file\n@return - md5 checksum of a template file\n@throws IOException - in a case there is an IO error calculating md5 checksum",
"Sets up Log4J to write log messages to the console. Low-priority messages\nare logged to stdout while high-priority messages go to stderr."
]
|
public void addAppenderEvent(final Category cat, final Appender appender) {
updateDefaultLayout(appender);
if (appender instanceof FoundationFileRollingAppender) {
final FoundationFileRollingAppender timeSizeRollingAppender = (FoundationFileRollingAppender) appender;
// update the appender with default vales such as logging pattern, file size etc.
//updateDefaultTimeAndSizeRollingAppender(timeSizeRollingAppender);
// read teh proeprties and determine if archiving should be enabled.
updateArchivingSupport(timeSizeRollingAppender);
// by default add the rolling file listener to enable application
// state.
timeSizeRollingAppender.setFileRollEventListener(FoundationRollEventListener.class.getName());
boolean rollOnStartup = true;
if (FoundationLogger.log4jConfigProps != null && FoundationLogger.log4jConfigProps.containsKey(FoundationLoggerConstants.Foundation_ROLL_ON_STARTUP.toString())) {
rollOnStartup = Boolean.valueOf(FoundationLogger.log4jConfigProps.getProperty(FoundationLoggerConstants.Foundation_ROLL_ON_STARTUP.toString()));
}
timeSizeRollingAppender.setRollOnStartup(rollOnStartup);
// refresh the appender
timeSizeRollingAppender.activateOptions();
// timeSizeRollingAppender.setOriginalLayout(); //So application state will not make any problems
}else if(!(appender instanceof FoundationFileRollingAppender) && (appender instanceof TimeAndSizeRollingAppender)){ //TimeAndSizeRollingAppender
final TimeAndSizeRollingAppender timeSizeRollingAppender = (TimeAndSizeRollingAppender) appender;
// update the appender with default vales such as logging pattern, file size etc.
updateDefaultTimeAndSizeRollingAppender(timeSizeRollingAppender);
// read teh proeprties and determine if archiving should be enabled.
updateArchivingSupport(timeSizeRollingAppender);
// by default add the rolling file listener to enable application
// state.
timeSizeRollingAppender.setFileRollEventListener(FoundationRollEventListener.class.getName());
boolean rollOnStartup = true;
if (FoundationLogger.log4jConfigProps != null && FoundationLogger.log4jConfigProps.containsKey(FoundationLoggerConstants.Foundation_ROLL_ON_STARTUP.toString())) {
rollOnStartup = Boolean.valueOf(FoundationLogger.log4jConfigProps.getProperty(FoundationLoggerConstants.Foundation_ROLL_ON_STARTUP.toString()));
}
timeSizeRollingAppender.setRollOnStartup(rollOnStartup);
// refresh the appender
timeSizeRollingAppender.activateOptions();
// timeSizeRollingAppender.setOriginalLayout();
}
if ( ! (appender instanceof org.apache.log4j.AsyncAppender))
initiateAsyncSupport(appender);
} | [
"In this method perform the actual override in runtime.\n\n@see org.apache.log4j.spi.HierarchyEventListener#addAppenderEvent(org.apache.log4j.Category, org.apache.log4j.Appender)"
]
| [
"Checks if the duration option is valid.\n\nNOTE: This does NOT check, if too many events are specified.\n\n@return a flag, indicating if the duration option is valid.",
"Adds a child to this node and sets this node as its parent node.\n\n@param node The node to add.",
"Get a View that displays the data at the specified\nposition in the data set.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View",
"Adds the specified list of users as members of the project. Returns the updated project record.\n\n@param project The project to add members to.\n@return Request object",
"In the 3.0 xsd the vault configuration and its options are part of the vault xsd.\n\n@param reader the reader at the vault element\n@param expectedNs the namespace\n@return the vault configuration",
"Use this API to update filterhtmlinjectionparameter.",
"Chooses the ECI mode most suitable for the content of this symbol.",
"Get random geographical location\n@return 2-Tuple of ints (latitude, longitude)",
"Recurses the given folder and creates the FileModels vertices for the child files to the graph."
]
|
public static void acceptsNodeSingle(OptionParser parser) {
parser.acceptsAll(Arrays.asList(OPT_N, OPT_NODE), "node id")
.withRequiredArg()
.describedAs("node-id")
.ofType(Integer.class);
} | [
"Adds OPT_N | OPT_NODE option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional"
]
| [
"Use this API to fetch all the ci resources that are configured on netscaler.",
"Generate a uniform random number in the range [lo, hi)\n\n@param lo lower limit of range\n@param hi upper limit of range\n@return a uniform random real in the range [lo, hi)",
"Prints a debug log message that details the time taken for the Http\nrequest to be parsed by the coordinator\n\n@param operationType\n@param receivedTimeInMs",
"Sets the path of the edited file in the corresponding display.\n@param editedFilePath path of the edited file to set.",
"Converts this update description to its document representation as it would appear in a\nMongoDB Change Event.\n\n@return the update description document as it would appear in a change event",
"changes the color of the image - more red and less blue\n\n@return new pixel array",
"FOR internal use. This method was called before the external transaction was completed.\n\nThis method was called by the JTA-TxManager before the JTA-tx prepare call. Within this method\nwe prepare odmg for commit and pass all modified persistent objects to DB and release/close the used\nconnection. We have to close the connection in this method, because the TxManager does prepare for commit\nafter this method and all used DataSource-connections have to be closed before.\n\n@see javax.transaction.Synchronization",
"Refresh the layout element.",
"Read project calendars."
]
|
private static boolean isVariableInteger(TokenList.Token t) {
if( t == null )
return false;
return t.getScalarType() == VariableScalar.Type.INTEGER;
} | [
"Checks to see if the token is an integer scalar\n\n@return true if integer or false if not"
]
| [
"Retrieve a flag value.\n\n@param index flag index (1-20)\n@return flag value",
"This method returns the installed identity with the requested name and version.\nIf the product name is null, the default identity will be returned.\n\nIf the product name was recognized and the requested version was not null,\nthe version comparison will take place. If the version of the currently installed product\ndoesn't match the requested one, the exception will be thrown.\nIf the requested version is null, the currently installed identity with the requested name\nwill be returned.\n\nIf the product name was not recognized among the registered ones, a new installed identity\nwith the requested name will be created and returned. (This is because the patching system\nis not aware of how many and what the patching streams there are expected).\n\n@param productName\n@param productVersion\n@return\n@throws PatchingException",
"Converts an integer into a time format.\n\n@param format integer format value\n@return TimeUnit instance",
"Convenience extension, to generate traced code.",
"Build the operation transformers.\n\n@param registry the shared resource registry\n@return the operation transformers",
"This method writes a single predecessor link to the MSPDI file.\n\n@param taskID The task UID\n@param type The predecessor type\n@param lag The lag duration\n@return A new link to be added to the MSPDI file",
"Starts the Okapi Barcode UI.\n\n@param args the command line arguments",
"Converts a string from ISO-8559-1 encoding to UTF-8.\n@param value ISO-8559-1 value\n@return UTF-8 value",
"Returns the finish date for this resource assignment.\n\n@return finish date"
]
|
public void setBackgroundColor(int color) {
colorUnpressed = color;
if(!isSelected()) {
if (rippleAnimationSupport()) {
ripple.setRippleBackground(colorUnpressed);
}
else {
view.setBackgroundColor(colorUnpressed);
}
}
} | [
"alias of setColorUnpressed"
]
| [
"Get the first controller of a specified type\n@param type controller type to search for\n@return controller found or null if no controllers of the given type",
"This method writes project extended attribute data into an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Set the host.\n\n@param host the host",
"Returns the names of parser rules that should be called in order to obtain the follow elements for the parser\ncall stack described by the given param.",
"Handle http worker response.\n\n@param respOnSingleReq\nthe my response\n@throws Exception\nthe exception",
"Use this API to fetch clusterinstance resource of given name .",
"Builds a batch-fetch capable loader based on the given persister, lock-mode, etc.\n\n@param persister The entity persister\n@param batchSize The maximum number of ids to batch-fetch at once\n@param lockMode The lock mode\n@param factory The SessionFactory\n@param influencers Any influencers that should affect the built query\n@param innerEntityLoaderBuilder Builder of the entity loader receiving the subset of batches\n\n@return The loader.",
"Handles a complete record at a time, stores it in a form ready for\nfurther processing.\n\n@param record record to be processed\n@return flag indicating if this is the last record in the file to be processed\n@throws MPXJException",
"returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException"
]
|
public static long count(nitro_service service, String zonename) throws Exception{
dnszone_domain_binding obj = new dnszone_domain_binding();
obj.set_zonename(zonename);
options option = new options();
option.set_count(true);
dnszone_domain_binding response[] = (dnszone_domain_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | [
"Use this API to count dnszone_domain_binding resources configued on NetScaler."
]
| [
"get the type erasure signature",
"Removes any metadata cache file that might have been assigned to a particular player media slot, so metadata\nwill be looked up from the player itself.\n\n@param slot the media slot to which a meta data cache is to be attached",
"Closes a Closeable and swallows any exceptions that might occur in the\nprocess.\n\n@param closeable",
"Add a new PropertyChangeListener to this node for a specific property.\nThis functionality has\nbeen borrowed from the java.beans package, though this class has\nnothing to do with a bean",
"Get the JSON string representation of the selector configured for this index.\n\n@return selector JSON as string",
"Use this API to fetch a sslglobal_sslpolicy_binding resources.",
"Use this API to fetch all the lbsipparameters resources that are configured on netscaler.",
"Search for photos which match the given search parameters.\n\n@param params\nThe search parameters\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return A PhotoList\n@throws FlickrException",
"Log a fatal message with a throwable."
]
|
public void loadClass(String className) throws Exception {
ClassInformation classInfo = classInformation.get(className);
logger.info("Loading plugin.: {}, {}", className, classInfo.pluginPath);
// get URL for proxylib
// need to load this also otherwise the annotations cannot be found later on
File libFile = new File(proxyLibPath);
URL libUrl = libFile.toURI().toURL();
// store the last modified time of the plugin
File pluginDirectoryFile = new File(classInfo.pluginPath);
classInfo.lastModified = pluginDirectoryFile.lastModified();
// load the plugin directory
URL classURL = new File(classInfo.pluginPath).toURI().toURL();
URL[] urls = new URL[] {classURL};
URLClassLoader child = new URLClassLoader(urls, this.getClass().getClassLoader());
// load the class
Class<?> cls = child.loadClass(className);
// put loaded class into classInfo
classInfo.loadedClass = cls;
classInfo.loaded = true;
classInformation.put(className, classInfo);
logger.info("Loaded plugin: {}, {} method(s)", cls.toString(), cls.getDeclaredMethods().length);
} | [
"Loads the specified class name and stores it in the hash\n\n@param className class name\n@throws Exception exception"
]
| [
"Get the bytes which represent the payload of this field, without the leading type tag and length header, as\na newly-allocated byte array.\n\n@return a new byte array containing a copy of the bytes this field contains",
"Returns the index of a key in the set.\n\n@param key The key to search for.\n@return Returns the index of the key if it exists, else a negative integer.",
"Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a few nodes to be identified\n(random # btw 2-5?) and then \"swapped\" (shuffled? rotated?).\n\n@return modified cluster metadata.",
"Add a management request handler factory to this context.\n\n@param factory the request handler to add",
"The service name to be removed. Can be overridden for unusual service naming patterns\n@param name The name of the resource being removed\n@return The service name to remove. May return {@code null} if only removal based on {@code unavailableCapabilities}\npassed to the constructor are to be performed",
"Returns a map of all variables in scope.\n@return map of all variables in scope.",
"Implements get by delegating to getAll.",
"Loads the schemas associated to this catalog.",
"Get the auth URL, this is step two of authorization.\n\n@param oAuthRequestToken\nthe token from a {@link AuthInterface#getRequestToken} call."
]
|
public static void Shuffle(double[] array, long seed) {
Random random = new Random();
if (seed != 0) random.setSeed(seed);
for (int i = array.length - 1; i > 0; i--) {
int index = random.nextInt(i + 1);
double temp = array[index];
array[index] = array[i];
array[i] = temp;
}
} | [
"Shuffle an array.\n\n@param array Array.\n@param seed Random seed."
]
| [
"Update the descriptor content with values from the editor.\n@throws CmsXmlException thrown if update fails due to a wrong XML structure (should never happen)",
"Saves the messages for all languages that were opened in the editor.\n\n@throws CmsException thrown if saving fails.",
"Create a table model from an object's properties.\n\n@param object target object\n@param excludedMethods method names to exclude\n@return table model",
"Returns a single parent of the given tag. If there are multiple parents, throws a WindupException.",
"Returns the user defined field without its prefix.\n\n@param field the name of the user defined field\n@return the user defined field without the prefix, or null if the fields\ndoesn't apply to this control file.\n@since 1.1",
"Painter the tile, by building a URL where the image can be found.\n\n@param tile\nMust be an instance of {@link InternalTile}, and must have a non-null {@link RasterUrlBuilder}.\n@return Returns a {@link InternalTile}.",
"Request to join a group.\n\nNote: if a group has rules, the client must display the rules to the user and the user must accept them (which is indicated by passing a true value to\nacceptRules) prior to making the join request.\n\n@param groupId\n- groupId parameter\n@param message\n- (required) message to group administrator\n@param acceptRules\n- (required) parameter indicating user has accepted groups rules",
"Harvest any values that may have been returned during the execution\nof a procedure.\n\n@param proc the procedure descriptor that provides info about the procedure\nthat was invoked.\n@param obj the object that was persisted\n@param stmt the statement that was used to persist the object.\n\n@throws PersistenceBrokerSQLException if a problem occurs.",
"Copy one Gradient into another.\n@param g the Gradient to copy into"
]
|
public T addModule(final String moduleName, final String slot, final byte[] newHash) {
final ContentItem item = createModuleItem(moduleName, slot, newHash);
addContentModification(createContentModification(item, ModificationType.ADD, NO_CONTENT));
return returnThis();
} | [
"Add a module.\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"
]
| [
"Sends a text message using given server setup for SMTP.\n\n@param to the to address.\n@param from the from address.\n@param subject the subject.\n@param msg the test message.\n@param setup the SMTP setup.",
"Creates a simple deployment description.\n\n@param name the name for the deployment\n@param serverGroups the server groups\n\n@return the deployment description",
"Invalidating just the GVRView associated with the GVRViewSceneObject\nincorrectly set the clip rectangle to just that view. To fix this,\nwe have to create a full screen android View and invalidate this\nto restore the clip rectangle.\n@return full screen View object",
"Construct new path by replacing file directory part. No\nfiles are actually modified.\n@param file path to move\n@param target new path directory",
"Use this API to fetch all the cachepolicylabel resources that are configured on netscaler.",
"Use this API to update route6 resources.",
"Set the individual dates.\n@param dates the dates to set.",
"This method lists task predecessor and successor relationships.\n\n@param file project file",
"Assemble and send a packet that performs sync control, turning a device's sync mode on or off, or telling it\nto become the tempo master.\n\n@param target an update from the device whose sync state is to be set\n@param command the byte identifying the specific sync command to be sent\n\n@throws IOException if there is a problem sending the command to the device"
]
|
public static <T> String listToString(List<T> list, final boolean justValue) {
return listToString(list, justValue, null);
} | [
"Returns the sentence as a string with a space between words.\nDesigned to work robustly, even if the elements stored in the\n'Sentence' are not of type Label.\n\nThis one uses the default separators for any word type that uses\nseparators, such as TaggedWord.\n\n@param justValue If <code>true</code> and the elements are of type\n<code>Label</code>, return just the\n<code>value()</code> of the <code>Label</code> of each word;\notherwise,\ncall the <code>toString()</code> method on each item.\n@return The sentence in String form"
]
| [
"Creates the container for a bundle descriptor.\n@return the container for a bundle descriptor.",
"Returns a list of all the eigenvalues",
"Get info about the shard a document belongs to.\n\n@param docId document ID\n@return Shard info\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-database-_shards-\"\ntarget=\"_blank\">_shards</a>",
"Helper xml start tag writer\n\n@param value the output stream to use in writing",
"Creates a new row representing a rule.\n@param type the type for the rule row, must not be null nor {@link TableRowType#CONTENT} nor {@link TableRowType#UNKNOWN}\n@param style the style for the rule row, must not be null nor {@link TableRowStyle#UNKNOWN}\n@return a new row representing a rule\n@throws {@link NullPointerException} if type or style where null\n@throws {@link IllegalStateException} if type or style where unknown or if type was {@link TableRowType#CONTENT}",
"Returns the path to java executable.",
"returns whether masking with the given mask results in a valid contiguous range for this segment,\nand if it does, if it matches the range obtained when masking the given values with the same mask.\n\n@param lowerValue\n@param upperValue\n@param mask\n@return",
"Create the navigation frame.\n@param outputDirectory The target directory for the generated file(s).",
"Is portlet env supported.\n\n@return true if portlet env is supported, false otherwise"
]
|
static <T> boolean syncInstantiation(T objectType) {
List<Template> templates = new ArrayList<>();
Templates tr = TEMP_FINDER.findAnnotations(templates, objectType);
if (tr == null) {
/* Default to synchronous instantiation */
return true;
} else {
return tr.syncInstantiation();
}
} | [
"Returns true if templates are to be instantiated synchronously and false if\nasynchronously."
]
| [
"Use this API to fetch appfwhtmlerrorpage resource of given name .",
"Given a list of store definitions, find out and return a map of similar\nstore definitions + count of them\n\n@param storeDefs All store definitions\n@return Map of a unique store definition + counts",
"Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.",
"trim \"act.\" from conf keys",
"Create a temporary directory with the same attributes as its parent directory.\n@param dir\nthe path to directory in which to create the directory\n@param prefix\nthe prefix string to be used in generating the directory's name;\nmay be {@code null}\n@return the path to the newly created directory that did not exist before\nthis method was invoked\n@throws IOException",
"Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error",
"Increment the version info associated with the given node\n\n@param node The node",
"Parse a filter expression.\n\n@param filter the filter expression\n@return compiled nodes",
"The grammar elements that may occur at the given offset."
]
|
private AsyncResourceRequest<V> getNextUnexpiredResourceRequest(Queue<AsyncResourceRequest<V>> requestQueue) {
AsyncResourceRequest<V> resourceRequest = requestQueue.poll();
while(resourceRequest != null) {
if(resourceRequest.getDeadlineNs() < System.nanoTime()) {
resourceRequest.handleTimeout();
resourceRequest = requestQueue.poll();
} else {
break;
}
}
return resourceRequest;
} | [
"Pops resource requests off the queue until queue is empty or an unexpired\nresource request is found. Invokes .handleTimeout on all expired resource\nrequests popped off the queue.\n\n@return null or a valid ResourceRequest"
]
| [
"Method used as dynamical parameter converter",
"Create a Renderer getting a copy from the prototypes collection.\n\n@param content to render.\n@param parent used to inflate the view.\n@return a new renderer.",
"not start with another option name",
"Use this API to unset the properties of cmpparameter resource.\nProperties that need to be unset are specified in args array.",
"Stops the compressor.",
"Retrieve a work field.\n\n@param type field type\n@return Duration instance",
"Decomposes and overwrites the input matrix.\n\n@param A Semi-Positive Definite (SPD) system matrix. Modified. Reference saved.\n@return If the matrix can be decomposed. Will always return false of not SPD.",
"Checks if there's exactly one option that exists among all possible opts.\n\n@param options OptionSet to checked\n@param opt1 Possible required option to check\n@param opt2 Possible required option to check\n@throws VoldemortException",
"Add a variable to the scripting context.\n\n@param varName The variable name.\n@param value The variable value."
]
|
public static java.util.Date getDateTime(Object value) {
try {
return toDateTime(value);
} catch (ParseException pe) {
pe.printStackTrace();
return null;
}
} | [
"Convert an Object to a DateTime, without an Exception"
]
| [
"This method calculates the absolute number of days between two dates.\nNote that where two date objects are provided that fall on the same\nday, this method will return one not zero. Note also that this method\nassumes that the dates are passed in the correct order, i.e.\nstartDate < endDate.\n\n@param startDate Start date\n@param endDate End date\n@return number of days in the date range",
"Changes the volume of an existing sound.\n@param volume volume value. Should range from 0 (mute) to 1 (max)",
"Scans the given file looking for a complete zip file format end of central directory record.\n\n@param file the file\n\n@return true if a complete end of central directory record could be found\n\n@throws IOException",
"Main method, handles all the setup tasks for DataGenerator a user would normally do themselves\n\n@param args command line arguments",
"Generates new individual particle radius based on min and max radius setting.\n\n@return new particle radius",
"Use this API to update autoscaleaction.",
"Use this API to renumber nspbr6.",
"Excludes Vertices that are of the provided type.",
"This method lists all resources defined in the file.\n\n@param file MPX file"
]
|
public String getUuidFromResponse(ResponseOnSingeRequest myResponse) {
String uuid = PcConstants.NA;
String responseBody = myResponse.getResponseBody();
Pattern regex = Pattern.compile(getJobIdRegex());
Matcher matcher = regex.matcher(responseBody);
if (matcher.matches()) {
uuid = matcher.group(1);
}
return uuid;
} | [
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response"
]
| [
"Adds a file with the provided description.",
"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.",
"Use this API to update systemuser resources.",
"This method is used to process an MPP8 file. This is the file format\nused by Project 98.\n\n@param reader parent file reader\n@param file Parent MPX file\n@param root Root of the POI file system.\n@throws MPXJException\n@throws IOException",
"Samples without replacement from a collection.\n\n@param c\nThe collection to be sampled from\n@param n\nThe number of samples to take\n@return a new collection with the sample",
"Read the file header data.\n\n@param is input stream",
"We have received an update that invalidates the waveform detail for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no waveform preview for the associated player",
"Used by TracedParallelBatch where its used to wrap a TraceContext and puts it in the\nregistry for the forked execution. This is marked deprecated as we prefer not to\nexpose details of the RatpackCurrentTraceContext implementation.\n\n@param traceContext a trace context.\n@return a holder for the trace context, which can be put into the registry.",
"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."
]
|
public static Polygon calculateBounds(final MapfishMapContext context) {
double rotation = context.getRootContext().getRotation();
ReferencedEnvelope env = context.getRootContext().toReferencedEnvelope();
Coordinate centre = env.centre();
AffineTransform rotateInstance = AffineTransform.getRotateInstance(rotation, centre.x, centre.y);
double[] dstPts = new double[8];
double[] srcPts = {
env.getMinX(), env.getMinY(), env.getMinX(), env.getMaxY(),
env.getMaxX(), env.getMaxY(), env.getMaxX(), env.getMinY()
};
rotateInstance.transform(srcPts, 0, dstPts, 0, 4);
return new GeometryFactory().createPolygon(new Coordinate[]{
new Coordinate(dstPts[0], dstPts[1]), new Coordinate(dstPts[2], dstPts[3]),
new Coordinate(dstPts[4], dstPts[5]), new Coordinate(dstPts[6], dstPts[7]),
new Coordinate(dstPts[0], dstPts[1])
});
} | [
"Create a polygon that represents in world space the exact area that will be visible on the printed\nmap.\n\n@param context map context"
]
| [
"Use this API to disable clusterinstance of given name.",
"Unpause the server, allowing it to resume normal operations",
"Print a timestamp value.\n\n@param value time value\n@return time value",
"Notifies that an existing header item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.",
"Returns the compact records for all teams to which user is assigned.\n\n@param user An identifier for the user. Can be one of an email address,\nthe globally unique identifier for the user, or the keyword `me`\nto indicate the current user making the request.\n@return Request object",
"Retrieve configuration details for a given custom field.\n\n@param field required custom field\n@return configuration detail",
"Flush the network buffer and write all entries to the serve. then wait\nfor an ack from the server. This is a blocking call. It is invoked on\nevery Commit batch size of entries, It is also called on the close\nsession call\n\n@param storeNamesToCommit List of stores to be flushed and committed",
"Compare the supplied plaintext password to a hashed password.\n\n@param passwd Plaintext password.\n@param hashed scrypt hashed password.\n\n@return true if passwd matches hashed value.",
"Un-serialize a Json into Organization\n@param organization String\n@return Organization\n@throws IOException"
]
|
private static String getEncodedInstance(String encodedResponse) {
if (isReturnValue(encodedResponse) || isThrownException(encodedResponse)) {
return encodedResponse.substring(4);
}
return encodedResponse;
} | [
"Returns a string that encodes the result of a method invocation.\nEffectively, this just removes any headers from the encoded response.\n\n@param encodedResponse\n@return string that encodes the result of a method invocation"
]
| [
"Use this API to update clusternodegroup resources.",
"Gets existing config files.\n\n@return the existing config files",
"Packages of the specified classes 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 packageClasses\n@return self",
"Sets the category of the notification for iOS8 notification\nactions. See 13 minutes into \"What's new in iOS Notifications\"\n\nPassing {@code null} removes the category.\n\n@param category the name of the category supplied to the app\nwhen receiving the notification\n@return this",
"Calculate delta with another vector\n@param v another vector\n@return delta vector",
"Convert to IPv6 EUI-64 section\n\nhttp://standards.ieee.org/develop/regauth/tut/eui64.pdf\n\n@param asMAC if true, this address is considered MAC and the EUI-64 is extended using ff-ff, otherwise this address is considered EUI-48 and extended using ff-fe\nNote that IPv6 treats MAC as EUI-48 and extends MAC to IPv6 addresses using ff-fe\n@return",
"Calculate a cache key.\n@param sql to use\n@param columnIndexes to use\n@return cache key to use.",
"Calculates ATM Bachelier implied volatilities.\n\n@see net.finmath.functions.AnalyticFormulas#bachelierOptionImpliedVolatility(double, double, double, double, double)\n\n@param optionValue RandomVarable representing the value of the option\n@param optionMaturity Time to maturity.\n@param swapAnnuity The swap annuity as seen on valuation time.\n@return The Bachelier implied volatility.",
"Returns the specified element, or null."
]
|
public Metadata createMetadata(String templateName, String scope, Metadata metadata) {
URL url = METADATA_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID(), scope, templateName);
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "POST");
request.addHeader("Content-Type", "application/json");
request.setBody(metadata.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
return new Metadata(JsonObject.readFrom(response.getJSON()));
} | [
"Creates metadata on this folder using a specified scope and template.\n\n@param templateName the name of the metadata template.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").\n@param metadata the new metadata values.\n@return the metadata returned from the server."
]
| [
"Retrieves the index of a cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry index",
"Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object.",
"Use this API to fetch all the sslaction resources that are configured on netscaler.",
"Emit information about a single suite and all of its tests.",
"Process an operand value used in the definition of the graphical\nindicator criteria.\n\n@param index position in operand list\n@param type field type\n@param criteria indicator criteria",
"Use this API to update nsconfig.",
"Add a clause where the ID is equal to the argument.",
"Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data",
"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"
]
|
public static tmtrafficaction get(nitro_service service, String name) throws Exception{
tmtrafficaction obj = new tmtrafficaction();
obj.set_name(name);
tmtrafficaction response = (tmtrafficaction) obj.get_resource(service);
return response;
} | [
"Use this API to fetch tmtrafficaction resource of given name ."
]
| [
"Returns true if the class node represents a the class node for the Class class\nand if the parametrized type is a neither a placeholder or a wildcard. For example,\nthe class node Class<Foo> where Foo is a class would return true, but the class\nnode for Class<?> would return false.\n@param classNode a class node to be tested\n@return true if it is the class node for Class and its generic type is a real class",
"Returns a product regarding its name\n\n@param name String\n@return DbProduct",
"Build list of style filters from style definitions.\n\n@param styleDefinitions\nlist of style definitions\n@return list of style filters\n@throws GeomajasException",
"Extract schema of the key field",
"Write the domain controller's data to an output stream.\n\n@param outstream the output stream\n@throws Exception",
"Log original incoming request\n\n@param requestType\n@param request\n@param history",
"Initialize the service with a context\n@param context the servlet context to initialize the profile.",
"Handle value change event on the individual dates list.\n@param event the change event.",
"Use this API to fetch the statistics of all tunnelip_stats resources that are configured on netscaler."
]
|
protected void updateForNewConfiguration(CmsGitConfiguration gitConfig) {
if (!m_checkinBean.setCurrentConfiguration(gitConfig)) {
Notification.show(
CmsVaadinUtils.getMessageText(Messages.GUI_GIT_CONFIGURATION_SWITCH_FAILED_0),
CmsVaadinUtils.getMessageText(Messages.GUI_GIT_CONFIGURATION_SWITCH_FAILED_DESC_0),
Type.ERROR_MESSAGE);
m_configurationSelector.select(m_checkinBean.getCurrentConfiguration());
return;
}
resetSelectableModules();
for (final String moduleName : gitConfig.getConfiguredModules()) {
addSelectableModule(moduleName);
}
updateNewModuleSelector();
m_pullFirst.setValue(Boolean.valueOf(gitConfig.getDefaultAutoPullBefore()));
m_pullAfterCommit.setValue(Boolean.valueOf(gitConfig.getDefaultAutoPullAfter()));
m_addAndCommit.setValue(Boolean.valueOf(gitConfig.getDefaultAutoCommit()));
m_pushAutomatically.setValue(Boolean.valueOf(gitConfig.getDefaultAutoPush()));
m_commitMessage.setValue(Strings.nullToEmpty(gitConfig.getDefaultCommitMessage()));
m_copyAndUnzip.setValue(Boolean.valueOf(gitConfig.getDefaultCopyAndUnzip()));
m_excludeLib.setValue(Boolean.valueOf(gitConfig.getDefaultExcludeLibs()));
m_ignoreUnclean.setValue(Boolean.valueOf(gitConfig.getDefaultIngoreUnclean()));
m_userField.setValue(Strings.nullToEmpty(gitConfig.getDefaultGitUserName()));
m_emailField.setValue(Strings.nullToEmpty(gitConfig.getDefaultGitUserEmail()));
} | [
"Updates the options panel for a special configuration.\n@param gitConfig the git configuration."
]
| [
"Checks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already checked; {@code false} otherwise.",
"This method tells you if a ClassNode implements or extends a certain class.\n@param node\nthe node\n@param target\nthe class\n@return\ntrue if the class node 'is a' target",
"Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param a Exponent alpha of power law function\n@param D Diffusion coeffcient",
"Random string from string array\n\n@param s Array\n@return String",
"Sets all dates in the list.\n@param dates the dates to set\n@param checked flag, indicating if all should be checked or unchecked.",
"Searches the set of imports to find a matching import by type name.\n\n@param typeName\nname of type (qualified or simple name allowed)\n@return found import or {@code null}",
"Convert a Planner time into a Java date.\n\n0800\n\n@param value Planner time\n@return Java Date instance",
"Write exceptions in the format used by MSPDI files prior to Project 2007.\n\n@param dayList list of calendar days\n@param exceptions list of exceptions",
"This returns all profiles associated with a server name\n\n@param serverName server Name\n@return profile UUID\n@throws Exception exception"
]
|
public static void detectAndApply(Widget widget) {
if (!widget.isAttached()) {
widget.addAttachHandler(event -> {
if (event.isAttached()) {
detectAndApply();
}
});
} else {
detectAndApply();
}
} | [
"Detect and apply waves, now or when the widget is attached.\n\n@param widget target widget to ensure is attached first"
]
| [
"Given a status update from a CDJ, find the metadata for the track that it has loaded, if any. If there is\nan appropriate metadata cache, will use that, otherwise makes a query to the players dbserver.\n\n@param status the CDJ status update that will be used to determine the loaded track and ask the appropriate\nplayer for metadata about it\n\n@return the metadata that was obtained, if any",
"Invokes the observer method immediately passing the event.\n\n@param event The event to notify observer with",
"Converts a gwt Date in the timezone of the current browser to a time in\nUTC.\n\n@return A Long corresponding to the number of milliseconds since January\n1, 1970, 00:00:00 GMT or null if the specified Date is null.",
"Get siblings of the same type as element from parent.\n\n@param parent parent node.\n@param element element.\n@return List of sibling (from element) under parent",
"Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero",
"Use this API to expire cachecontentgroup resources.",
"Returns the constructor of the indirection handler class.\n\n@return The constructor for indirection handlers",
"try to delegate the master to handle the response\n\n@param response\n@return true if the master accepted the response; false if the master\ndidn't accept",
"Adds the headers.\n\n@param builder\nthe builder\n@param headerMap\nthe header map"
]
|
public final void setWeekDays(SortedSet<WeekDay> weekDays) {
m_weekDays.clear();
if (null != weekDays) {
m_weekDays.addAll(weekDays);
}
} | [
"Set the week days the events should occur.\n@param weekDays the week days to set."
]
| [
"Returns iban's country code and check digit.\n\n@param iban String\n@return countryCodeAndCheckDigit String",
"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}",
"Creates an temporary directory. The created directory will be deleted when\ncommand will ended.",
"Generated the report.",
"Use this API to add cachecontentgroup.",
"Gets a color formatted as an integer with ARGB ordering.\n\n@param json {@link JSONObject} to get the color from\n@param elementName Name of the color element\n@return An ARGB formatted integer\n@throws JSONException",
"Load a JSON file from the application's \"asset\" directory.\n\n@param context Valid {@link Context}\n@param asset Name of the JSON file\n@return New instance of {@link JSONObject}",
"Returns the adapter position of the Parent associated with this ParentViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.",
"Checks if the object with the given identity has been deleted\nwithin the transaction.\n@param id The identity\n@return true if the object has been deleted\n@throws PersistenceBrokerException"
]
|
private Query.Builder createScatterQuery(Query query, int numSplits) {
// TODO(pcostello): We can potentially support better splits with equality filters in our query
// if there exists a composite index on property, __scatter__, __key__. Until an API for
// metadata exists, this isn't possible. Note that ancestor and inequality queries fall into
// the same category.
Query.Builder scatterPointQuery = Query.newBuilder();
scatterPointQuery.addAllKind(query.getKindList());
scatterPointQuery.addOrder(DatastoreHelper.makeOrder(
DatastoreHelper.SCATTER_PROPERTY_NAME, Direction.ASCENDING));
// There is a split containing entities before and after each scatter entity:
// ||---*------*------*------*------*------*------*---|| = scatter entity
// If we represent each split as a region before a scatter entity, there is an extra region
// following the last scatter point. Thus, we do not need the scatter entities for the last
// region.
scatterPointQuery.getLimitBuilder().setValue((numSplits - 1) * KEYS_PER_SPLIT);
scatterPointQuery.addProjection(Projection.newBuilder().setProperty(
PropertyReference.newBuilder().setName("__key__")));
return scatterPointQuery;
} | [
"Creates a scatter query from the given user query\n\n@param query the user's query.\n@param numSplits the number of splits to create."
]
| [
"Call batch tasks inside of a connection which may, or may not, have been \"saved\".",
"Creates an temporary directory. The created directory will be deleted when\ncommand will ended.",
"Find all the values of the requested type.\n\n@param valueTypeToFind the type of the value to return.\n@param <T> the type of the value to find.\n@return the key, value pairs found.",
"Process schedule options from SCHEDOPTIONS. This table only seems to exist\nin XER files, not P6 databases.",
"Request a scoped transactional token.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@return a BoxAPIConnection which can be used to perform transactional requests.",
"This method takes a calendar of MPXJ library type, then returns a String of the\ngeneral working days USACE format. For example, the regular 5-day work week is\nNYYYYYN\n\nIf you get Fridays off work, then the String becomes NYYYYNN\n\n@param input ProjectCalendar instance\n@return work days string",
"Invokes a JavaScript function that takes no arguments.\n\n@param <T>\n@param function The function to invoke\n@param returnType The type of object to return\n@return The result of the function.",
"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.",
"Executes the mojo."
]
|
private void parse(String header)
{
ArrayList<String> list = new ArrayList<String>(4);
StringBuilder sb = new StringBuilder();
int index = 1;
while (index < header.length())
{
char c = header.charAt(index++);
if (Character.isDigit(c))
{
sb.append(c);
}
else
{
if (sb.length() != 0)
{
list.add(sb.toString());
sb.setLength(0);
}
}
}
if (sb.length() != 0)
{
list.add(sb.toString());
}
m_id = list.get(0);
m_sequence = Integer.parseInt(list.get(1));
m_type = Integer.valueOf(list.get(2));
if (list.size() > 3)
{
m_subtype = Integer.parseInt(list.get(3));
}
} | [
"Parses values out of the header text.\n\n@param header header text"
]
| [
"Extracts a house holder vector from the rows of A and stores it in u\n@param A Complex matrix with householder vectors stored in the upper right triangle\n@param row Row in A\n@param col0 first row in A (implicitly assumed to be r + i0)\n@param col1 last row +1 in A\n@param u Output array storage\n@param offsetU first index in U",
"Detects Opera Mobile or Opera Mini.\n@return detection of an Opera browser for a mobile device",
"Gets the project name for a favorite entry.\n\n@param cms the CMS context\n@param entry the favorite entry\n@return the project name for the favorite entry\n@throws CmsException if something goes wrong",
"Checks if a newly created action wants to write output to stdout, and\nlogs a warning if other actions are doing the same.\n\n@param newAction\nthe new action to be checked",
"Returns the comma separated list of available scopes\n\n@return String",
"Get the OAuth request token - this is step one of authorization.\n\n@param callbackUrl\noptional callback URL - required for web auth flow, will be set to \"oob\" if not specified.\n@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website.",
"Do some magic to turn request parameters into a context object",
"Use this API to fetch the statistics of all appfwpolicylabel_stats resources that are configured on netscaler.",
"returns array with length 3 and optional entries version, encoding, standalone"
]
|
public UniqueEntityLoader buildLoader(
OuterJoinLoadable persister,
int batchSize,
LockOptions lockOptions,
SessionFactoryImplementor factory,
LoadQueryInfluencers influencers,
BatchableEntityLoaderBuilder innerEntityLoaderBuilder) {
if ( batchSize <= 1 ) {
// no batching
return buildNonBatchingLoader( persister, lockOptions, factory, influencers, innerEntityLoaderBuilder );
}
return buildBatchingLoader( persister, batchSize, lockOptions, factory, influencers, innerEntityLoaderBuilder );
} | [
"Builds a batch-fetch capable loader based on the given persister, lock-options, etc.\n\n@param persister The entity persister\n@param batchSize The maximum number of ids to batch-fetch at once\n@param lockOptions The lock options\n@param factory The SessionFactory\n@param influencers Any influencers that should affect the built query\n@param innerEntityLoaderBuilder Builder of the entity loader receiving the subset of batches\n\n@return The loader."
]
| [
"Calculates the maximum text height which is possible based on the used Paint and its settings.\n\n@param _Paint Paint object which will be used to display a text.\n@param _Text The text which should be measured. If null, a default text is chosen, which\nhas a maximum possible height\n@return Maximum text height in px.",
"Replace a single value at the appropriate location in the existing value array.\n@param index - location in the array list\n@param newValue - the new String",
"Attempts to checkout a resource so that one queued request can be\nserviced.\n\n@param key The key for which to process the requestQueue\n@return true iff an item was processed from the Queue.",
"Returns the value of the element with the minimum value\n@param A (Input) Matrix. Not modified.\n@return scalar",
"Create a local target.\n\n@param jbossHome the jboss home\n@param moduleRoots the module roots\n@param bundlesRoots the bundle roots\n@return the local target\n@throws IOException",
"Sets a new image\n\n@param BufferedImage imagem",
"Generates a HashMap used to store expanded state for items in the list\non configuration change or whenever onResume is called.\n\n@return A HashMap containing the expanded state of all parents",
"all objects in list1 that are not in list2\n\n@param <T>\n@param list1\nFirst collection\n@param list2\nSecond collection\n@return The collection difference list1 - list2",
"Returns the compact records for all users that are members of the team.\n\n@param team Globally unique identifier for the team.\n@return Request object"
]
|
public Collection<Service> getServices() throws FlickrException {
List<Service> list = new ArrayList<Service>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_SERVICES);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element servicesElement = response.getPayload();
NodeList serviceNodes = servicesElement.getElementsByTagName("service");
for (int i = 0; i < serviceNodes.getLength(); i++) {
Element serviceElement = (Element) serviceNodes.item(i);
Service srv = new Service();
srv.setId(serviceElement.getAttribute("id"));
srv.setName(XMLUtilities.getValue(serviceElement));
list.add(srv);
}
return list;
} | [
"Return a list of Flickr supported blogging services.\n\nThis method does not require authentication.\n\n@return List of Services\n@throws FlickrException"
]
| [
"Open a database and build a set of table names.\n\n@param url database URL\n@return set containing table names",
"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",
"Sets the specified integer 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",
"Convert from Hadoop Text to Bytes",
"Sets the promotion state.\n\n<P>INFO: This method updates automatically all the contained artifacts.\n\n@param promoted boolean",
"Logs all the canidate elements so that the plugin knows which elements were the candidate\nelements.",
"Make a composite filter from the given sub-filters using AND to combine filters.",
"Convert any number class to array of integer.\n\n@param <T> Type.\n@param array Array.\n@return Integer array.",
"Use this API to fetch nslimitselector resource of given name ."
]
|
public byte[] toBytes(T object) {
try {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(stream);
out.writeObject(object);
return stream.toByteArray();
} catch(IOException e) {
throw new SerializationException(e);
}
} | [
"Transform the given object into an array of bytes\n\n@param object The object to be serialized\n@return The bytes created from serializing the object"
]
| [
"Returns all ApplicationProjectModels.",
"Use this API to unset the properties of filterhtmlinjectionparameter resource.\nProperties that need to be unset are specified in args array.",
"Destroys dependent instance\n\n@param instance\n@return true if the instance was destroyed, false otherwise",
"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",
"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",
"Obtains a Symmetry454 local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry454 local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Get CorrelationId from message.\n\n@param message the message\n@return correlationId or null if not set",
"Apply the remote read domain model result.\n\n@param result the domain model result\n@return whether it was applied successfully or not",
"Returns information about all clients for a profile\n\n@param model\n@param profileIdentifier\n@return\n@throws Exception"
]
|
public boolean deleteWithCustomTimeout(CompositeVoldemortRequest<K, V> deleteRequestObject) {
List<Versioned<V>> versionedValues;
validateTimeout(deleteRequestObject.getRoutingTimeoutInMs());
boolean hasVersion = deleteRequestObject.getVersion() == null ? false : true;
String keyHexString = "";
if(!hasVersion) {
long startTimeInMs = System.currentTimeMillis();
if(logger.isDebugEnabled()) {
ByteArray key = (ByteArray) deleteRequestObject.getKey();
keyHexString = RestUtils.getKeyHexString(key);
logger.debug("DELETE without version requested for key: " + keyHexString
+ " , for store: " + this.storeName + " at time(in ms): "
+ startTimeInMs + " . Nested GET and DELETE requests to follow ---");
}
// We use the full timeout for doing the Get. In this, we're being
// optimistic that the subsequent delete might be faster all the
// steps might finish within the allotted time
deleteRequestObject.setResolveConflicts(true);
versionedValues = getWithCustomTimeout(deleteRequestObject);
Versioned<V> versioned = getItemOrThrow(deleteRequestObject.getKey(),
null,
versionedValues);
if(versioned == null) {
return false;
}
long timeLeft = deleteRequestObject.getRoutingTimeoutInMs()
- (System.currentTimeMillis() - startTimeInMs);
// This should not happen unless there's a bug in the
// getWithCustomTimeout
if(timeLeft < 0) {
throw new StoreTimeoutException("DELETE request timed out");
}
// Update the version and the new timeout
deleteRequestObject.setVersion(versioned.getVersion());
deleteRequestObject.setRoutingTimeoutInMs(timeLeft);
}
long deleteVersionStartTimeInNs = System.currentTimeMillis();
if(logger.isDebugEnabled()) {
ByteArray key = (ByteArray) deleteRequestObject.getKey();
keyHexString = RestUtils.getKeyHexString(key);
debugLogStart("DELETE",
deleteRequestObject.getRequestOriginTimeInMs(),
deleteVersionStartTimeInNs,
keyHexString);
}
boolean result = store.delete(deleteRequestObject);
if(logger.isDebugEnabled()) {
debugLogEnd("DELETE",
deleteRequestObject.getRequestOriginTimeInMs(),
deleteVersionStartTimeInNs,
System.currentTimeMillis(),
keyHexString,
0);
}
if(!hasVersion && logger.isDebugEnabled()) {
logger.debug("DELETE without version response received for key: " + keyHexString
+ ", for store: " + this.storeName + " at time(in ms): "
+ System.currentTimeMillis());
}
return result;
} | [
"Performs a delete operation with the specified composite request object\n\n@param deleteRequestObject Composite request object containing the key to\ndelete\n@return true if delete was successful. False otherwise"
]
| [
"Loads treebank data from first argument and prints it.\n\n@param args Array of command-line arguments: specifies a filename",
"Do not call directly.\n@deprecated",
"Returns the classpath for executable jar.",
"Computes the likelihood of the random draw\n\n@return The likelihood.",
"If the Artifact does not exist, it will add it to the database. Nothing if it already exit.\n\n@param fromClient DbArtifact",
"Use this API to fetch gslbsite resource of given name .",
"Returns an iterator of all direct and indirect extents of this class.\n\n@return The extents iterator",
"Utility function to get the current text.",
"Check whether the given id is included in the list of includes and not excluded.\n\n@param id id to check\n@param includes list of include regular expressions\n@param excludes list of exclude regular expressions\n@return true when id included and not excluded"
]
|
void updateFromResponseOnDeletePost(Response<ResponseBody> response) throws IOException {
this.withResponse(response);
String responseContent = null;
if (response.body() != null) {
responseContent = response.body().string();
response.body().close();
}
this.withResource(serializerAdapter.<T>deserialize(responseContent, resourceType));
withStatus(AzureAsyncOperation.SUCCESS_STATUS, response.code());
} | [
"Updates the polling state from a DELETE or POST operation.\n\n@param response the response from Retrofit REST call\n@throws IOException thrown by deserialization"
]
| [
"Write an error response.\n\n@param channel the channel\n@param header the request\n@param error the error\n@throws IOException",
"Processes changes on aliases, updating the planned state of the item.\n\n@param addAliases\naliases that should be added to the document\n@param deleteAliases\naliases that should be removed from the document",
"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",
"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 the values using the specified Properties object.\n\n@param properties Properties object containing specific property values\nfor the RESTClient config\n\nNote: We're using the same property names as that in ClientConfig\nfor backwards compatibility.",
"Splits data into blocks, adds error correction and then interleaves the blocks and error correction data.",
"Lookup the username for the specified User URL.\n\n@param url\nThe user profile URL\n@return The username\n@throws FlickrException",
"Layout which gets displayed if table is empty.\n\n@see org.opencms.ui.apps.user.I_CmsFilterableTable#getEmptyLayout()",
"scroll only once"
]
|
private ProjectFile handleXerFile(InputStream stream) throws Exception
{
PrimaveraXERFileReader reader = new PrimaveraXERFileReader();
reader.setCharset(m_charset);
List<ProjectFile> projects = reader.readAll(stream);
ProjectFile project = null;
for (ProjectFile file : projects)
{
if (file.getProjectProperties().getExportFlag())
{
project = file;
break;
}
}
if (project == null && !projects.isEmpty())
{
project = projects.get(0);
}
return project;
} | [
"XER files can contain multiple projects when there are cross-project dependencies.\nAs the UniversalProjectReader is designed just to read a single project, we need\nto select one project from those available in the XER file.\nThe original project selected for export by the user will have its \"export flag\"\nset to true. We'll return the first project we find where the export flag is\nset to true, otherwise we'll just return the first project we find in the file.\n\n@param stream schedule data\n@return ProjectFile instance"
]
| [
"Checks if this service implementation accepts the given resource path.\n@param resourcePath Resource path\n@return true if the implementation matches and the configuration is not invalid.",
"Put everything smaller than days at 0\n@param cal calendar to be cleaned",
"This is a method to stream slops to \"slop\" store when a node is detected\nfaulty in a streaming session\n\n@param key -- original key\n@param value -- original value\n@param storeName -- the store for which we are registering the slop\n@param failedNodeId -- the faulty node ID for which we register a slop\n@throws IOException",
"Adds all items from the iterable to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed",
"Stops all streams.",
"Helper method to add cue list entries from a parsed ANLZ cue tag\n\n@param entries the list of entries being accumulated\n@param tag the tag whose entries are to be added",
"Reset the Where object so it can be re-used.",
"Scans the given file looking for a complete zip file format end of central directory record.\n\n@param file the file\n\n@return true if a complete end of central directory record could be found\n\n@throws IOException",
"Creates the request.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception"
]
|
public static String lookupIfEmpty( final String value,
final Map<String, String> props,
final String key ) {
return value != null ? value : props.get(key);
} | [
"Extracts value from map if given value is null.\n@param value current value\n@param props properties to extract value from\n@param key property name to extract\n@return initial value or value extracted from map"
]
| [
"This method prints plan information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return plans the IPlan[] with all the information, so the tester can\nlook for information",
"Retrieve the \"complete through\" date.\n\n@return complete through date",
"Use this API to fetch all the gslbservice resources that are configured on netscaler.",
"Removes all children",
"Convolve with a 2D kernel.\n@param kernel the kernel\n@param inPixels the input pixels\n@param outPixels the output pixels\n@param width the width\n@param height the height\n@param alpha include alpha channel\n@param edgeAction what to do at the edges",
"From v3_epoly.js, calculates the distance between this LatLong point and\nanother.\n\n@param end The end point to calculate the distance to.\n@return The distance, in metres, to the end point.",
"Sets the global. Does not add the global to the ExecutionResults.\n\n@param identifier\nThe identifier of the global\n@param object\nThe instance to be set as the global.\n@return",
"Get the OAuth request token - this is step one of authorization.\n\n@param callbackUrl\noptional callback URL - required for web auth flow, will be set to \"oob\" if not specified.\n@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website.",
"Indicates if the type is a simple Web Bean\n\n@param clazz The type to inspect\n@return True if simple Web Bean, false otherwise"
]
|
public void BuildInteractiveObjectFromAnchor(Sensor anchorSensor, String anchorDestination) {
InteractiveObject interactiveObject = new InteractiveObject();
interactiveObject.setSensor(anchorSensor, anchorDestination);
interactiveObjects.add(interactiveObject);
} | [
"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"
]
| [
"Use this API to add cachecontentgroup.",
"Attempts to retrieves ResourceReport until maxWaitMs time is reached. Set maxWaitMs to -1 to\nretry forever.",
"Convert from a DTO to an internal Spring bean definition.\n\n@param beanDefinitionDto The DTO object.\n@return Returns a Spring bean definition.",
"Reads a \"date-time\" argument from the request.",
"The service name to be removed. Can be overridden for unusual service naming patterns\n@param name The name of the resource being removed\n@return The service name to remove. May return {@code null} if only removal based on {@code unavailableCapabilities}\npassed to the constructor are to be performed",
"create a new instance of the class represented by the no-argument constructor provided\n@param constructor the zero argument constructor for the class\n@return a new instance of the class\n@throws InstantiationException\n@throws ClassNotPersistenceCapableException if the constructor is null or there is an\nexception while trying to create a new instance",
"This method takes a calendar of MPXJ library type, then returns a String of the\ngeneral working days USACE format. For example, the regular 5-day work week is\nNYYYYYN\n\nIf you get Fridays off work, then the String becomes NYYYYNN\n\n@param input ProjectCalendar instance\n@return work days string",
"Use this API to update protocolhttpband.",
"Set the names of six images in the zip file. The default names of the six\nimages are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\", \"posz.png\",\nand \"negz.png\". If the names of the six images in the zip file are\ndifferent to the default ones, this function must be called before load\nthe zip file.\n\n@param nameArray\nAn array containing six strings which are names of images\ncorresponding to +x, -x, +y, -y, +z, and -z faces of the cube\nmap texture respectively."
]
|
private boolean ignoreMethod(String name)
{
boolean result = false;
for (String ignoredName : IGNORED_METHODS)
{
if (name.matches(ignoredName))
{
result = true;
break;
}
}
return result;
} | [
"Used to determine if the current method should be ignored.\n\n@param name method name\n@return true if the method should be ignored"
]
| [
"Establish a new tempo master, and if it is a change from the existing one, report it to the listeners.\n\n@param newMaster the packet which caused the change of masters, or {@code null} if there is now no master.",
"This method reads a byte array from the input stream.\n\n@param is the input stream\n@param size number of bytes to read\n@return byte array\n@throws IOException on file read error or EOF",
"Specify the class represented by this `ClassNode` is annotated\nby an annotation class specified by the name\n@param name the name of the annotation class\n@return this `ClassNode` instance",
"Extract the parent WBS from a WBS.\n\n@param wbs current WBS\n@return parent WBS",
"Add the deployment scanner service to a batch.\n\n@param context context for the operation that is adding this service\n@param resourceAddress the address of the resource that manages the service\n@param relativeTo the relative to\n@param path the path\n@param scanInterval the scan interval\n@param unit the unit of {@code scanInterval}\n@param autoDeployZip whether zipped content should be auto-deployed\n@param autoDeployExploded whether exploded content should be auto-deployed\n@param autoDeployXml whether xml content should be auto-deployed\n@param scanEnabled scan enabled\n@param deploymentTimeout the deployment timeout\n@param rollbackOnRuntimeFailure rollback on runtime failures\n@param bootTimeService the deployment scanner used in the boot time scan\n@param scheduledExecutorService executor to use for asynchronous tasks\n@return the controller for the deployment scanner service",
"Use this API to fetch lbvserver_servicegroup_binding resources of given name .",
"Process an operand value used in the definition of the graphical\nindicator criteria.\n\n@param index position in operand list\n@param type field type\n@param criteria indicator criteria",
"as it is daemon thread\n\nTODO when release external resources should shutdown the scheduler.",
"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"
]
|
public Jar setJarPrefix(String value) {
verifyNotSealed();
if (jos != null)
throw new IllegalStateException("Really executable cannot be set after entries are added.");
if (value != null && jarPrefixFile != null)
throw new IllegalStateException("A prefix has already been set (" + jarPrefixFile + ")");
this.jarPrefixStr = value;
return this;
} | [
"Sets a string that will be prepended to the JAR file's data.\n\n@param value the prefix, or {@code null} for none.\n@return {@code this}"
]
| [
"Use this API to clear nspbr6.",
"Use this API to fetch all the rsskeytype resources that are configured on netscaler.",
"Create a forward curve from forwards given by a LIBORMonteCarloModel.\n\n@param name 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 forward curve from forwards given by a LIBORMonteCarloModel.\n@throws CalculationException Thrown if the model failed to provide the forward rates.",
"Generates a diagonal matrix with the input vector on its diagonal\n\n@param vector The given matrix A.\n@return diagonalMatrix The matrix with the vectors entries on its diagonal",
"read the prefetchInLimit from Config based on OJB.properties",
"Sets a quota for a users.\n\n@param user the user.\n@param quota the quota.",
"This method returns the value of the product using a Black-Scholes model for the swap rate with the Hunt-Kennedy convexity adjustment.\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve from which the swap rate is calculated. The discount curve, associated with this forward curve is used for discounting this option.\n@param swaprateVolatility The volatility of the log-swaprate.\n@return Value of this product",
"There appear to be two ways of representing task notes in an MPP8 file.\nThis method tries to determine which has been used.\n\n@param task task\n@param data task data\n@param taskExtData extended task data\n@param taskVarData task var data",
"Convert an ObjectName to a PathAddress.\n\nPatterns are supported: there may not be a resource at the returned PathAddress but a resource model <strong>MUST</strong>\nmust be registered."
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.