code
stringlengths
10
174k
nl
stringlengths
3
129k
public void previous(){ loadPrevious(timelineStateHolder.positionForPrevious(),new PreviousCallback(timelineStateHolder)); }
Triggers loading previous items.
public void runTest() throws Throwable { Document doc; NodeList elementList; Element testEmployee; Attr newAttribute; String name; Attr setAttr; doc=(Document)load("staff",true); elementList=doc.getElementsByTagName("address"); testEmployee=(Element)elementList.item(2); newAttribute=doc.createAttrib...
Runs the test case.
public static int constrainedRotation(float rotation){ int r=(int)((rotation % 360) / 90); r=(r < 0) ? (r + 4) : r; return r * 90; }
Constrains rotation to be in [0, 90, 180, 270] rounding down.
public Builder seconds(Integer seconds){ this.seconds=seconds; return this; }
Sets the number of seconds.
public void addSigner(PrivateKey key,X509Certificate cert,String digestOID) throws IllegalArgumentException { addSigner(key,cert,getEncOID(key,digestOID),digestOID); }
add a signer - no attributes other than the default ones will be provided here.
public EnhancedServer remoteConnection(RemoteConnection.Supplier supplier){ RemoteConnection connection=supplier.get(); this.remoteConnections.add(connection); return this; }
Setup a remote connection to a remote message broker.
@Override public String toString(){ return store.toString(); }
Returns a string representation of stored cookies organized by domain.
@DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:44.588 -0500",hash_original_method="7A084406CC3B18F733E08ECB30CF0A86",hash_generated_method="891CC4941D384D14DFB199FC6400C0E7") public ElementType rootElementType(){ return theRoot...
Get the root element of this schema
public boolean supportsSQL(){ return filter.supportsSQL(); }
To find out whether SQL queries are handled.
private void drawRoute(Set<Plottable> plottables,Graphics2D g,JXMapViewer viewer){ Point2D lastPoint=null; for ( Plottable plottable : plottables) { Point2D currentPoint=viewer.getTileFactory().geoToPixel(plottable.getGeoPosition(),viewer.getZoom()); if (lastPoint != null) { g.drawLine((int)lastPoint...
Draws a route from a list of plottables
public void reconnectCommand(){ sendMessage(CMD_RECONNECT); }
Initiate a reconnection to AP
XPath createMatchPatternXPath(String str,ElemTemplateElement owningTemplate) throws javax.xml.transform.TransformerException { ErrorListener handler=m_stylesheetProcessor.getErrorListener(); XPath xpath=new XPath(str,owningTemplate,this,XPath.MATCH,handler,m_funcTable); xpath.callVisitors(xpath,new ExpressionVisi...
Process an expression string into an XPath.
public MatteBorder(Icon tileIcon){ this(-1,-1,-1,-1,tileIcon); }
Creates a matte border with the specified tile icon. The insets will be calculated dynamically based on the size of the tile icon, where the top and bottom will be equal to the tile icon's height, and the left and right will be equal to the tile icon's width.
public boolean batchFinished(){ if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); } if (m_ModesAndMeans == null) { double sumOfWeights=getInputFormat().sumOfWeights(); double[][] counts=new double[getInputFormat().numAttributes()][]; for (int i=0;...
Signify that this batch of input to the filter is finished. If the filter requires all instances prior to filtering, output() may now be called to retrieve the filtered instances.
private void dispatch(byte[] clslbls,MessageAndMetadata<byte[],byte[]> message,KafkaDataMessage msg,byte[] outSipHashKey,byte[] outAESKey){ if (null == this.subscriptions || this.subscriptions.isEmpty()) { return; } long classid=msg.getClassId(); long labelsid=msg.getLabelsId(); for (int i=0; i < 8; i++) ...
Dispatch the message to the various topics
private int numParameters(){ return m_numParameters; }
Get the number of parameters in the model at this node
public static boolean isPubKeyCanonical(byte[] pubkey){ if (pubkey.length < 33) return false; if (pubkey[0] == 0x04) { if (pubkey.length != 65) return false; } else if (pubkey[0] == 0x02 || pubkey[0] == 0x03) { if (pubkey.length != 33) return false; } else return false; return true; }
Returns true if the given pubkey is canonical, i.e. the correct length taking into account compression.
public static InsertIntoClause create(String streamName){ return new InsertIntoClause(streamName); }
Creates the insert-into clause.
public IgniteFutureTimeoutException(String msg,@Nullable Throwable cause){ super(msg,cause); }
Creates a new exception with given error message and optional nested cause exception.
@Deprecated public RMISecurityException(String name,String arg){ this(name); }
Construct an <code>RMISecurityException</code> with a detail message.
public boolean isClosed(){ return journalWriter == null; }
Returns true if this cache has been closed.
public void quorumLost(Collection<InternalDistributedMember> failures,NetView view){ boolean notify=failures.size() > 1; if (!notify) { notify=services.getConfig().isNetworkPartitionDetectionEnabled(); } if (notify) { List<InternalDistributedMember> remaining=new ArrayList<>(view.getMembers()); rema...
this is invoked by JoinLeave when there is a loss of quorum in the membership system
public Timestamp(Date stamp,String format){ super(); m_Stamp=stamp; setFormat(format); }
creates a timestamp with the given date and format.
public boolean isVirtualColumn(int index){ if (index < 0 || index >= m_columns.length) return true; return m_columns[index].ColumnSQL != null && m_columns[index].ColumnSQL.length() > 0; }
Is Column Virtual?
private void handleInput(HTMLElement element,int align){ String type=element.getAttributeById(HTMLElement.ATTR_TYPE); if (type == null) { return; } int typeID=INPUT_TYPES.indexOf(type.toLowerCase()); if (typeID == -1) { if (htmlCallback != null) { if (!htmlCallback.parsingError(HTMLCallback.ERRO...
Handles the INPUT tag
public static final byte[] inflate(byte[] in) throws IOException { ByteArrayOutputStream outStream=new ByteArrayOutputStream(EXPECTED_COMPRESSION_RATIO * in.length); InflaterInputStream inStream=new InflaterInputStream(new ByteArrayInputStream(in)); byte[] buf=new byte[BUF_SIZE]; while (true) { int size=inS...
Returns an inflated copy of the input array.
public RegistrationException(){ super(); }
Constructs a new exception with <code>null</code> as its detail message. The cause is not initialized.
private void sumUsingPrimitiveStream(){ int sumQuantity=trades.stream().mapToInt(null).sum(); System.out.println("Total quantity (using primitive stream):" + sumQuantity); }
Summing up the quantity using primitive stream. The Object stream is converted to a primitive stream
public static NSObject parse(Document doc) throws PropertyListFormatException, IOException, ParseException { DocumentType docType=doc.getDoctype(); if (docType == null) { if (!doc.getDocumentElement().getNodeName().equals("plist")) { throw new UnsupportedOperationException("The given XML document is not a...
Parses a property list from an XML document.
public void addOrder(String columnName,boolean ascending){ if (columnName == null) { return; } for (int i=0; i < columns.size(); i++) { if (!columnName.equals(columns.get(i).getData())) { continue; } order.add(new Order(i,ascending ? "asc" : "desc")); } }
Add an order on the given column
public static synchronized boolean initializeRealtimeClasses(){ final Initializer initializer=new Initializer(OSGiServices.class.getClassLoader()); initializer.loadClass(MathLib.class); initializer.loadClass(Text.class); initializer.loadClass(TypeFormat.class); initializer.loadClass(Struct.class); initializ...
Initializes all real-time classes.
public String findURIFromDoc(int owner){ int n=m_sourceTree.size(); for (int i=0; i < n; i++) { SourceTree sTree=(SourceTree)m_sourceTree.elementAt(i); if (owner == sTree.m_root) return sTree.m_url; } return null; }
Given a document, find the URL associated with that document.
public speciesOrGridDisplayStatement createspeciesOrGridDisplayStatement(){ speciesOrGridDisplayStatementImpl speciesOrGridDisplayStatement=new speciesOrGridDisplayStatementImpl(); return speciesOrGridDisplayStatement; }
<!-- begin-user-doc --> <!-- end-user-doc -->
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:45.068 -0500",hash_original_method="5A39796CA8340A67B1FFF4D32268D0FF",hash_generated_method="519CB9D5598641D49CD5C6D24A5E2D01") private void badIndex(int index) throws ArrayI...
Report a bad array index in a manipulator.
public synchronized void merge(GTSEncoder encoder) throws IOException { if (0 == this.size() && this.baseTimestamp == encoder.baseTimestamp && Arrays.equals(this.wrappingKey,encoder.wrappingKey)) { this.reset(encoder); return; } if (this.baseTimestamp != encoder.baseTimestamp || !Arrays.equals(this.wrappi...
Merge data encoded in another encoder with this one. If the two encoders have different base timestamps or different encryption keys, the values will be fetched using a decoder and added individually. Otherwise a fastpath is taken and the encoded bytes are added.
public static int read(InputStream in,byte[] b,int off,int len) throws IOException { int cnt=0; while (cnt < len) { int readOnce=in.read(b,off + cnt,len - cnt); if (readOnce <= 0) break; cnt+=readOnce; } return cnt; }
Reads len bytes from in and places in b starting at off and returns len. Input: in should have at least len bytes; if not, then -1 is returned if no bytes are available (end of stream) or all of the remaining bytes are placed in b, starting at off and this number is returned. Output: The number of bytes read is retur...
public void write(String str,int off,int len){ int newcount=count + len; if (newcount > buf.length) { expandCapacity(newcount); } str.getChars(off,off + len,buf,count); count=newcount; }
Write a portion of a string to the buffer.
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter,java.lang.String namespace) throws javax.xml.stream.XMLStreamException { java.lang.String prefix=xmlWriter.getPrefix(namespace); if (prefix == null) { prefix=generatePrefix(namespace); while (xmlWriter.getNamespaceContext().g...
Register a namespace prefix
public static double[] convertFloatsToDoubles(float[] input,double[] output){ if (input == null || output == null) return output; for (int i=0; i < input.length; ++i) { output[i]=(double)input[i]; } return output; }
Converts an array of floats to an array of doubles, using the provided output array.
public final Region createRegion(final String name,final RegionAttributes attributes) throws CacheException { return createRegion(name,"root",attributes); }
Returns a region with the given name and attributes.
public int parseInt() throws SyntaxError { String str=parseArg(); if (argWasQuoted()) throw new SyntaxError("Expected double instead of quoted string:" + str); int value=Integer.parseInt(str); return value; }
Parse an integer
public TerminalSeq(Iterator<Terminal> iterator){ this.terminals=new LinkedList<Terminal>(); while (iterator.hasNext()) { this.terminals.add(iterator.next()); } }
The sequence is based on the orderering of the iterator
public Builder addEncodedQueryParameter(String encodedName,String encodedValue){ if (encodedName == null) { throw new IllegalArgumentException("encodedName == null"); } if (encodedQueryNamesAndValues == null) { encodedQueryNamesAndValues=new ArrayList<>(); } encodedQueryNamesAndValues.add(canonicalize...
Adds the pre-encoded query parameter to this URL's query string.
public boolean isRequestOneToOneDeliveryDisplayedReportsEnabled(){ return mRcsSettings.isImReportsActivated() && !mRcsSettings.isAlbatrosRelease(); }
Should we request one to one delivery displayed reports
static void calculateWeights(final Path best){ calculateWeights(best,best.getCalledIncluded(),best.getBaselineIncluded()); }
Find a weighting for all the TP calls in a path. this is done by sync points, within each <code>SyncPoint</code> <code>weight = number of TP in baseline / number of TP in called</code> this will assure that the total number of TP we output will always reflect number of TP in baseline file if there are any call TP witho...
private void refreshConfigurables(String serverName){ ConfigurableController controller=remoteControllers.get(serverName); if (controller.getModel().getSource().isConnected()) { controller.getView().refreshConfigurables(serverName); } }
reloads the configurables of the selected server
private void pause(){ noxItemCatalog.pause(); noxItemCatalog.deleteObserver(catalogObserver); }
Pauses NoxItemCatalog and removes the observer previously configured.
private List<String> missingFood(final Player player,final boolean hash){ final List<String> result=new LinkedList<String>(); String doneText=player.getQuest(QUEST_SLOT); if (doneText == null) { doneText=""; } final List<String> done=Arrays.asList(doneText.split(";")); for ( String ingredient : NEEDED_...
Returns a list of the names of all food that the given player still has to bring to fulfill the quest.
private void updateThisSwingSet(){ if (isApplet()) { SwingUtilities.updateComponentTreeUI(getApplet()); } else { JFrame frame=getFrame(); if (frame == null) { SwingUtilities.updateComponentTreeUI(this); } else { SwingUtilities.updateComponentTreeUI(frame); } } SwingUtilities.up...
Update this swing set.
UsageLogging(Properties licenseProperties,String modulename,UUID runId,File configFileOverride,boolean suppress) throws IOException { final String usageValue=licenseProperties.getProperty(REQUIRE_USAGE); mRequireUsage=usageValue != null && Boolean.valueOf(usageValue); final String destinationValue=licenseProperti...
Sets up usage logging using a specific configuration path
public static boolean askForPermissions(){ if (hasPermissions()) return true; if (sessionStart()) { SuperUserCommand superUserCommand=new SuperUserCommand("echo 'root'"); Logger.getInstance().logInfo("SuperUser","askForPermissions"); if (superUserCommand.execute()) { String[] output=superUserCom...
This is like hasPermissions() but asks for the superuser permissions and give the user a change to grant it now. Use this to start you session
public void dispatchCUISelection(Actor actor){ checkNotNull(actor); if (!hasCUISupport) { return; } if (selector instanceof CUIRegion) { CUIRegion tempSel=(CUIRegion)selector; if (tempSel.getProtocolVersion() > cuiVersion) { actor.dispatchCUIEvent(new SelectionShapeEvent(tempSel.getLegacyTypeI...
Send the selection information.
public void addJournal(VJournal journal){ addComponent(journal); }
Adds a journal entry to the calendar.
public static ThreadSafeFrame wrap(Object syncObj,Frame frame){ if (frame != null) return new ThreadSafeFrame(syncObj,frame); else return null; }
Wraps a Frame inside a ThreadSafeFrame. If the passed-in Frame is null, then this function returns null.
public T onmousemove(String value){ return attr("onmousemove",value); }
Sets the <code>onmousemove</code> attribute on the last started tag that has not been closed.
@Util public static void handleError(){ params.flash(); Validation.keep(); redirectToReferrer(); }
Redirects back to the request header referrer with params.flash() and Validation.keep().
protected void assertChanges(VirtualFile[] virtualFiles,FileStatus[] fileStatuses) throws VcsException { Map<FilePath,Change> result=getChanges(virtualFiles); for (int i=0; i < virtualFiles.length; i++) { FilePath fp=VcsUtil.getFilePath(virtualFiles[i]); FileStatus status=fileStatuses[i]; if (status == ...
Checks that the given files have respective statuses in the change list retrieved from myChangesProvider. Pass null in the fileStatuses array to indicate that proper file has not changed.
public String meanStddevTipText(){ return "The mean and stddev, in case of gaussian."; }
Returns the tip text for this property
private static int capacityForInitSize(int size){ int result=(size >> 1) + size; return (result & ~(MAXIMUM_CAPACITY - 1)) == 0 ? result : MAXIMUM_CAPACITY; }
Returns an appropriate capacity for the specified initial size. Does not round the result up to a power of two; the caller must do this! The returned value will be between 0 and MAXIMUM_CAPACITY (inclusive).
public ExtendedResolver() throws UnknownHostException { init(); String[] servers=ResolverConfig.getCurrentConfig().servers(); if (servers != null) { for (int i=0; i < servers.length; i++) { Resolver r=new SimpleResolver(servers[i]); r.setTimeout(quantum); resolvers.add(r); } } else ...
Creates a new Extended Resolver. The default ResolverConfig is used to determine the servers for which SimpleResolver contexts should be initialized.
@Override public void run(){ amIActive=true; String areaHeader=null; String slopeHeader=null; String outputHeader=null; int i; int progress; int row, col; double powerValue=0; double z=0; if (args.length <= 0) { showFeedback("Plugin parameters have not been set."); return; } for (i=0; i ...
Used to execute this plugin tool.
public int feed(IBytesConsumer consumer,int maxbytes){ if (pendinglen == 0) refillBuffer(); int tofeed=maxbytes >= 0 && maxbytes < pendinglen ? maxbytes : pendinglen; int n=0; if (tofeed > 0) { n=consumer.consume(buf,offset,tofeed); if (n > 0) { offset+=n; pendinglen-=n; } } if (n ...
Feeds the consumer (with at most maxbytes) <br> Returns 0 only if the stream is EOF (or maxbytes=0). Returns negative is the consumer is done.<br> It can return less than maxbytes (that doesn't mean that the consumer or the input stream is done)
private void initValues(){ IPreferenceStore store=doGetPreferenceStore(); final String storedItems=store.getString(CheckerPreferences.PREF_CHECKER_CUSTOM_CLASSES); if (!storedItems.equals("")) { customCheckers.setItems(storedItems.split(",")); } }
Initialize the values in the table to the preference values
public static Matrix makeW(int d,int h,Random r){ double W_[][]=MatrixUtils.multiply(MatrixUtils.randn(d + 1,h + 1,r),0.20); MatrixUtils.fillRow(W_,0,0.0); MatrixUtils.fillCol(W_,0,0.0); return new Matrix(W_); }
Make W matrix of dimensions d+1 and h+1 (+1 for biases). Initialized from ~N(0,0.2) (seems to work better than ~N(0.0.01)) -- except biases (set to 0)
public boolean removeSpringConfig(SpringConfig springConfig){ if (springConfig == null) { throw new IllegalArgumentException("springConfig is required"); } return mSpringConfigMap.remove(springConfig) != null; }
remove a specific SpringConfig from the registry
public void listen(GridOffHeapEventListener lsnr){ this.lsnr=lsnr; }
Sets event listener.
private Future<StreamState> streamRanges(Map<String,Multimap<Range<Token>,InetAddress>> rangesToStreamByKeyspace){ Map<String,Map<InetAddress,List<Range<Token>>>> sessionsToStreamByKeyspace=new HashMap<>(); for ( Map.Entry<String,Multimap<Range<Token>,InetAddress>> entry : rangesToStreamByKeyspace.entrySet()) { ...
Seed data to the endpoints that will be responsible for it at the future
public boolean hasCharacteristic(int characteristic){ return (characteristics & characteristic) > 0; }
Test whether the event type has the given characteristic.
public Vertex(Graph<V,E> source,Type type,V vertex){ super(source,type); this.vertex=vertex; }
Creates a graph event for the specified graph, vertex, and type.
private void sendNextSketchBlock(){ byte[] rawBlock=sketchBlocksToSend.get(currSketchBlockNum); Buffer block=new Buffer(); block.write(rawBlock); sendMessage(BeanMessageID.BL_FW_BLOCK,block); resetSketchBlockSendTimeout(); int blocksSent=currSketchBlockNum + 1; int totalBlocks=sketchBlocksToSend.size(); ...
Send one block of sketch data to the Bean and increment the block counter.
public String metaphone(String txt){ boolean hard=false; if ((txt == null) || (txt.length() == 0)) { return ""; } if (txt.length() == 1) { return txt.toUpperCase(); } char[] inwd=txt.toUpperCase().toCharArray(); StringBuffer local=new StringBuffer(40); StringBuffer code=new StringBuffer(10); swi...
Find the metaphone value of a String. This is similar to the soundex algorithm, but better at finding similar sounding words. All input is converted to upper case. Limitations: Input format is expected to be a single ASCII word with only characters in the A - Z range, no punctuation or numbers.
public Bounds addHorizontalPlane(final PlanetModel planetModel,final double latitude,final Plane horizontalPlane,final Membership... bounds){ return addPlane(planetModel,horizontalPlane,bounds); }
Add a horizontal plane to the bounds description. This method should EITHER use the supplied latitude, OR use the supplied plane, depending on what is most efficient.
private void fireMenuKeyReleased(MenuKeyEvent event){ Object[] listeners=listenerList.getListenerList(); for (int i=listeners.length - 2; i >= 0; i-=2) { if (listeners[i] == MenuKeyListener.class) { ((MenuKeyListener)listeners[i + 1]).menuKeyReleased(event); } } }
Notifies all listeners that have registered interest for notification on this event type.
private String generateId(){ return UUID.randomUUID().toString().toUpperCase() + "-GF"; }
Generate an ID string
public Queue createDeadletterQueue(final String queueName){ return new Queue(queueName,true,false,false,getTTLArgs()); }
Create a deadletter queue with ttl for messages
public static void objectArraySet(Object[] a,int i,Object v){ try { a[i]=v; } catch ( Throwable t) { a[DefaultGroovyMethodsSupport.normaliseIndex(i,a.length)]=v; } }
set value from double[] using normalized index
static boolean headersContainValue(HttpHeaders headers,String headerName,String value){ Object values=headers.get(headerName); if (values instanceof Collection) { @SuppressWarnings("unchecked") Collection<Object> valuesCollection=(Collection<Object>)values; return valuesCollection.contains(value); } ret...
Returns whether the headers contain the specified value as one of the entries in the specified header.
public void renderListHead(ListHead head){ Component header; WTableColumn column; for (int columnIndex=0; columnIndex < m_tableColumns.size(); columnIndex++) { column=m_tableColumns.get(columnIndex); header=getListHeaderComponent(column.getHeaderValue(),columnIndex,column.getColumnClass()); head.appen...
Render the ListHead for the table with headers for the table columns.
public PatternMatcher execute() throws DataflowAnalysisException { workList.addLast(cfg.getEntry()); while (!workList.isEmpty()) { BasicBlock basicBlock=workList.removeLast(); visitedBlockMap.put(basicBlock,basicBlock); BasicBlock.InstructionIterator i=basicBlock.instructionIterator(); while (i.hasN...
Search for examples of the ByteCodePattern.
public Object runSafely(Catbert.FastStack stack) throws Exception { boolean thumb=evalBool(stack.pop()); Person p=getPerson(stack); if (p != null && p.hasImage()) { return MetaImage.getMetaImage(p.getImageURL(thumb),stack.getUIComponent()); } else return null; }
Returns the image for the specified person
private static void displayMessage(String message){ System.out.println(message); System.out.flush(); }
Prints the message and flushes the output stream.
public void record(long value){ histogram.recordValue(value); }
Records a value for to the histogram and updates the Servo counter buckets
protected static URL appendUrlPath(URL url,String append) throws MalformedURLException { return new URL(url.getProtocol() + "://" + url.getAuthority()+ url.getPath()+ append+ (url.getQuery() != null ? "?" + url.getQuery() : "")); }
Appends to the path of the URL
public static boolean equals(Object[] array1,Object[] array2){ if (array1 == array2) { return true; } if (array1 == null || array2 == null || array1.length != array2.length) { return false; } for (int i=0; i < array1.length; i++) { Object e1=array1[i], e2=array2[i]; if (!(e1 == null ? e2 == nu...
Compares the two arrays.
private void checkProductUsingUPC(){ String upc=upcField.getDisplay(); ListModelTable model=(ListModelTable)window.getWListbox().getModel(); List<MProduct> products=MProduct.getByUPC(Env.getCtx(),upc,null); for ( MProduct product : products) { int row=findProductRow(product.get_ID()); if (row >= 0) { ...
Checks the UPC value and checks if the UPC matches any of the products in the list.
public static boolean hasJellyBean(){ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN; }
>= 4.1 16
@DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:20.437 -0500",hash_original_method="C32886C5E5EF95CE74E82DCEA7E677B6",hash_generated_method="D3B6DAB676DE9F36C58223BD4E21C20A") public SIPServerTransaction findPendingTransaction(SIP...
Finds a pending server transaction. Since each request may be handled either statefully or statelessly, we keep a map of pending transactions so that a duplicate transaction is not created if a second request is recieved while the first one is being processed.
public T download(String url,File target,Object handler,String callback){ AjaxCallback<File> cb=new AjaxCallback<File>(); cb.weakHandler(handler,callback); return download(url,target,cb); }
Download a file asynchronously.
private static FormObject[] sortCompsDesending(final FormObject[] array){ final int items=array.length; int left=items / 2; int right=items - 1; while (left > 0) { left-=1; siftCompsDesending(array,left,right); } while (right > 0) { final FormObject tempA=array[0]; array[0]=array[right]; ...
sorts as a tree like structure in array representation, the integer array in descending size order comparing the component size,
@Override public XMLEventWriter createXMLEventWriter(OutputStream out) throws XMLStreamException { return new WbXmlEventWriter(out,(WbXmlDefinition)props.get(DEFINITION_PROPERTY),(WbXmlEncoder.StrtblType)props.get(ENCODING_TYPE_PROPERTY),(Boolean)props.get(SKIP_SPACES_PROPERTY)); }
Create a new XMLEventWriter that writes to a stream
void dispatchAdded(final RPObject object){ try { logger.debug("Object(" + object.getID() + ") added to client"); fireAdded(object); } catch ( final Exception e) { logger.error("dispatchAdded failed, object is " + object,e); } }
Dispatch object added event.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:48.325 -0500",hash_original_method="85074EE9682A2A9BF13F64A0DA58B9BC",hash_generated_method="B138EB5B93DA05A5788C8DE0A12B3A73") public void endElement(String qName) throws SAXException { if (!namespaces) { if (contentHandler !...
Adapter implementation method; do not call. Adapt a SAX1 end element event.
public static String removeVowelsSkipStarts(String s){ String result=s; if (!s.startsWith(" ")) { result=result.substring(1); } result=encodeStartingVowels(result); result=removeVowels(result); result=decodeStartingVowels(result); if (!s.startsWith(" ")) { result=s.charAt(0) + result; } return...
Removes vowels from the string except those that start words. Case-insensitive.
public static PedigreeField parsePedigreeLine(String line){ return new PedigreeField(line); }
Convert format line into <code>PedigreeField</code> object
public UnicodeTranslatorStar(){ }
Creates a UnicodeTranslatorStar instance of UnicodeTranslatorInt
public Activity currentActivity(){ Activity activity=activityStack.lastElement(); return activity; }
get current activity from Stack
public ConnectionWatchDog(int length,AsyncWorker thread){ m_length=length; m_elapsed=0; underControl=thread; }
Creates a timer of a specified length
public static String extractMsisdnFromProvisioningResponse(String header){ Matcher matcher=PATTERN_EXTRACT_URI.matcher(header); if (matcher.find()) { return matcher.group(1); } throw new NoSuchElementException("Cannot found MSISDN!"); }
get URI from SIP identity header
private void showFeedback(String message){ if (myHost != null) { myHost.showFeedback(message); } else { System.out.println(message); } }
Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface.
public static byte[] decode(String s) throws java.io.IOException { return decode(s,NO_OPTIONS); }
Decodes data from Base64 notation, automatically detecting gzip-compressed data and decompressing it.