code
stringlengths
10
174k
nl
stringlengths
3
129k
public KMLScreenOverlay(String namespaceURI){ super(namespaceURI); }
Construct an instance.
@SuppressWarnings("deprecation") static HttpUriRequest createHttpRequest(Request<?> request,Map<String,String> additionalHeaders) throws AuthFailureError { switch (request.getMethod()) { case Method.DEPRECATED_GET_OR_POST: { byte[] postBody=request.getPostBody(); if (postBody != null) { HttpPost pos...
Creates the appropriate subclass of HttpUriRequest for passed in request.
public void createSubUsageScenario01() throws Exception { long usageStartTime=DateTimeHandling.calculateMillis("2012-12-01 00:00:00") - DateTimeHandling.daysToMillis(17.5); BillingIntegrationTestBase.setDateFactoryInstance(usageStartTime); VOServiceDetails serviceDetails=serviceSetup.createPublishAndActivateMarke...
Creates the subscription test data for long-lasting scenario based on the calculation of billing period. Usage started before the billing period and ended after the billing period (long-lasting usages).
public CharArray(int capacity){ _array=new char[capacity]; }
Creates a character array of specified default capacity.
public ILineSegment[] generate(int size){ ILineSegment[] lines=new ILineSegment[size]; for (int i=0; i < size; i++) { double x=Math.random(); x*=max; double y=Math.random(); y*=max; double dx=length * Math.cos(Math.random()); double dy=length * Math.sin(Math.random()); int sgn1, sgn2; ...
Generate a random set of segments within a [max,max] box, extending potentially out to a larger range based upon the length of each line segment. <p> Each coordinate value of the segment is an integer.
void endProcess(){ if (this.r != null) { try { if (this.needsLRUEnd) { this.needsLRUEnd=false; this.r.txLRUEnd(); } } finally { if (this.needsUnlock) { this.needsUnlock=false; this.r.unlockGII(); } } } }
Called when processing is complete; only needs to be called if beginProcess returned true.
public void invoke(VolumeAttachResponse attachResponse){ logger.info("Cinder Storage Port Invoke Operation Started for" + " the storage system : {}",storageSystem.getId()); synchronized (this) { try { String protocolType=attachResponse.connection_info.driver_volume_type; Map<String,List<String>> initi...
Invokes the FC or iSCSI ports operation based on the type of the export/attach operation
public String sendMessage(String gatewayId,Struct data) throws PageException, IOException { Gateway g=getGateway(gatewayId); if (g.getState() != Gateway.RUNNING) throw new GatewayException("Gateway [" + gatewayId + "] is not running"); return g.sendMessage(data); }
send the message to the gateway
private void createLogWindow(String title,ArrayList<String> logMessages,Color color){ if (logMessages == null || logMessages.size() == 0) return; ArrayList<String> displayLogMessages=new ArrayList<String>(logMessages); JFrame frame=new JFrame(s_logger.localizeMessage(title)); frame.setDefaultCloseOperation(JF...
create and show a log view window
public boolean resumeAll(long cyclePeriod){ if (timerTasks.containsKey(cyclePeriod)) { timerTasks.get(cyclePeriod).resume(); return true; } return false; }
Resumes the execution of all state machines which are registered for the given cyclePeriod.
public static byte[] long2buff(long n){ byte[] bs; bs=new byte[8]; bs[0]=(byte)((n >> 56) & 0xFF); bs[1]=(byte)((n >> 48) & 0xFF); bs[2]=(byte)((n >> 40) & 0xFF); bs[3]=(byte)((n >> 32) & 0xFF); bs[4]=(byte)((n >> 24) & 0xFF); bs[5]=(byte)((n >> 16) & 0xFF); bs[6]=(byte)((n >> 8) & 0xFF); bs[7]=(byt...
long convert to buff (big-endian)
private void updateProgress(String progressLabel,int progress){ if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) { myHost.updateProgress(progressLabel,progress); } previousProgress=progress; previousProgressLabel=progressLabel; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
public LoadField(Token t,Symbol symbol,Type fieldType,Expression index){ super(t); this.symbol=symbol; this.slot=symbol.getLocation(); this.index=index; this.fieldType=fieldType; }
Load a field and store the loaded value into the stack.
public boolean isInstanceAttribute(){ Object oo=get_Value(COLUMNNAME_IsInstanceAttribute); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get Instance Attribute.
@Override public boolean hasSkip(){ return canRead(); }
Returns true if stream is readable and bytes can be skipped.
public void nullPasswords(){ KeyStoreState state=initialState; while (true) { state.nullPasswords(); state=state.nextState(); if (state == null) { break; } } }
Null all passwords contained in the history.
public boolean isCurrentVersion(){ return StrgUtils.compareVersion(version,ReleaseInfo.getVersion()) == 0; }
is our settings file up2date?
public static void closeAttribute(){ Log.write("\""); }
Close an attribute (actually a simple close-quote)
@SideEffectFree public PropertyDescriptor(String propertyName,Class<?> beanClass) throws IntrospectionException { this(propertyName,beanClass,Introspector.IS_PREFIX + NameGenerator.capitalize(propertyName),Introspector.SET_PREFIX + NameGenerator.capitalize(propertyName)); }
Constructs a PropertyDescriptor for a property that follows the standard Java convention by having getFoo and setFoo accessor methods. Thus if the argument name is "fred", it will assume that the writer method is "setFred" and the reader method is "getFred" (or "isFred" for a boolean property). Note that the property...
@Override public void close(){ }
The close call does nothing since the rotate stream is shared for many logs.
public static boolean compileClass(Class<?> classToCompile){ return false; }
Compiles the specified class using the JIT compiler and indicates if compilation has been successful. Does nothing and returns false on Android.
void put(final Object item){ lbd.add(item); }
Insert an item into the FIFO
public ElementType rootElementType(){ return theRoot; }
Get the root element of this schema
protected POInfo initPO(Properties ctx){ POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName()); return poi; }
Load Meta Data
protected final void readChildren(final Element element,final PropertiesProvider provider) throws Exception { final Element childrenElement=LwXmlReader.getRequiredChild(element,"children"); for (Iterator i=childrenElement.getChildren().iterator(); i.hasNext(); ) { final Element child=(Element)i.next(); fina...
'children' is required attribute
public void release(){ try { if (this.ss != null) { this.ss.close(); } } catch ( IOException ignore) { } }
Once you call this the socket will be freed and can then be reallocated by someone else.
private MailImpl rawBounce(Mail mail,String bounceText) throws MessagingException { MimeMessage original=mail.getMessage(); MimeMessage reply=(MimeMessage)original.reply(false); reply.setSubject("Re: " + original.getSubject()); reply.setSentDate(new Date()); Collection<MailAddress> recipients=new HashSet<Mail...
Generates a bounce mail that is a bounce of the original message.
public boolean intersects(final PlanetModel planetModel,final Plane q,final GeoPoint[] notablePoints,final GeoPoint[] moreNotablePoints,final Membership[] bounds,final Membership... moreBounds){ if (isNumericallyIdentical(q)) { for ( GeoPoint p : notablePoints) { if (meetsAllBounds(p,bounds,moreBounds)) ...
Determine whether the plane intersects another plane within the bounds provided.
private SimpleSink.SimpleWriter buildWriter(){ SimpleSink.SimpleWriteOperation writeOp=buildWriteOperation(TemporaryFileRetention.REMOVE); return new SimpleSink.SimpleWriter(writeOp); }
Build a writer with the default options for its parent write operation and sink.
protected boolean doTest(String theMacAlgo,String thePBKDF2Algo) throws NoSuchAlgorithmException, InvalidKeyException, InvalidKeySpecException { int OFFSET=5; byte[] plain=new byte[25]; new SecureRandom().nextBytes(plain); byte[] tail=new byte[plain.length - OFFSET]; System.arraycopy(plain,OFFSET,tail,0,tail....
Uses a random generator to initialize a message, instantiate a Mac object according to the given PBMAC1 algorithm, initialize the object with a SecretKey derived using PBKDF2 algorithm (see PKCS #5 v21, chapter 7.1), feed the message into the Mac object all at once and get the output MAC as result1. Reset the Mac objec...
private static Object fieldObject(final Object obj,final Field field){ try { return field.get(obj); } catch ( final IllegalArgumentException e) { return null; } catch ( final IllegalAccessException e) { return null; } }
Get the object corresponding to a field. Return a null and otherwise ignore checked exceptions.
@Override public boolean eIsSet(int featureID){ switch (featureID) { case TypesPackage.PROPERTY__CONST: return const_ != CONST_EDEFAULT; case TypesPackage.PROPERTY__READONLY: return readonly != READONLY_EDEFAULT; case TypesPackage.PROPERTY__EXTERNAL: return external != EXTERNAL_EDEFAULT; } return super.eIsSet(fea...
<!-- begin-user-doc --> <!-- end-user-doc -->
public AnnotationVisitor visitAnnotation(String name,String desc){ if (av != null) { return av.visitAnnotation(name,desc); } return null; }
Visits a nested annotation value of the annotation.
private static final void usage(){ System.err.println("usage: java Health -l <levels> -t <time> -s <seed> [-p] [-m] [-h]"); System.err.println(" -l the size of the health care system"); System.err.println(" -t the amount of simulation time"); System.err.println(" -s a random no. generator seed"); Sys...
The usage routine which describes the program options.
private void updateFS(FileShare fsObj,DbClient dbClient,VNXeCommandJob job,StringBuilder logMsgBuilder,VNXeApiClient vnxeApiClient){ try { fsObj.setCreationTime(Calendar.getInstance()); VNXeFileSystem vnxeFS=null; vnxeFS=vnxeApiClient.getFileSystemByFSName(fsObj.getName()); if (vnxeFS != null) { ...
update FileShare after it is created in VNXe
public boolean drawImage(Image img,AffineTransform xform,ImageObserver observer){ if (img == null) { return true; } if (xform == null || xform.isIdentity()) { return drawImage(img,0,0,null,observer); } if (isHiDPIImage(img)) { final int w=img.getWidth(null); final int h=img.getHeight(null); ...
Draw an image, applying a transform from image space into user space before drawing. The transformation from user space into device space is done with the current transform in the Graphics2D. The given transformation is applied to the image before the transform attribute in the Graphics2D state is applied. The renderin...
public RunBatchScriptCommand(Configuration configuration,String resourcePath){ super(configuration,resourcePath); }
Sets configuration containing all needed information for building configuration scripts.
public static Object deserializeStream(final String witness) throws Exception { FileInputStream fileIs=new FileInputStream(witness); ObjectInputStream objIs=new ObjectInputStream(fileIs); return objIs.readObject(); }
Deserializes a specified file.
private void organizeComments(final List<JSONObject> comments) throws RepositoryException { for ( final JSONObject comment : comments) { organizeComment(comment); } }
Organizes the specified comments. <ul> <li>converts comment create time (long) to date type</li> <li>generates comment author thumbnail URL</li> <li>generates comment author URL</li> <li>generates comment author name</li> <li>generates comment author real name</li> <li>generates &#64;username home URL</li> <li>markdown...
public static <T>Flux<T> sorted(Flux<T> flux,Comparator<? super T> c){ return Flux.fromIterable(null); }
Sort Flux using the provided comparator This is a lazy operation that materializes the provided Flux on first use in order to sort it.
private void addTracks(){ EndToEndTestUtils.deleteAllTracks(); EndToEndTestUtils.createTrackIfEmpty(3,true); instrumentation.waitForIdleSync(); EndToEndTestUtils.createSimpleTrack(0,true); instrumentation.waitForIdleSync(); assertEquals(2,EndToEndTestUtils.SOLO.getCurrentViews(ListView.class).get(0).getCoun...
Adds multiple tracks.
public static OutputStream constructOutputStream(DataOutput out){ if (out instanceof OutputStream) { return (OutputStream)out; } else { return new DataOutputOutputStream(out); } }
Construct an OutputStream from the given DataOutput. If 'out' is already an OutputStream, simply returns it. Otherwise, wraps it in an OutputStream.
protected void startActivityForResult(Intent intent,int code){ activity.startActivityForResult(intent,code); }
Start an activity.<br> This method is defined to allow different methods of activity starting for newer versions of Android and for compatibility library.
private boolean isTemporalCoverageEmpty(TemporalCoverage cov){ if (cov != null) { String formationPeriod=cov.getFormationPeriod(); Date end=cov.getEndDate(); String period=cov.getLivingTimePeriod(); Date start=cov.getStartDate(); return (Strings.isNullOrEmpty(formationPeriod) && end == null && Str...
Determine if a single TemporalCoverage is empty. In other words, the user hasn't entered any information for a single field yet.
public Envelope(double x1,double x2,double y1,double y2){ init(x1,x2,y1,y2); }
Creates an <code>Envelope</code> for a region defined by maximum and minimum values.
public boolean GT(Word w2){ return w2.LT(this); }
Greater-than comparison
protected JPopupMenu createPopupMenu(){ JPopupMenu menu=new JPopupMenu(); JMenuItem menuItem; menuItem=new JMenuItem(undoAction); menuItem.setAccelerator(null); menuItem.setToolTipText(null); menu.add(menuItem); menuItem=new JMenuItem(redoAction); menuItem.setAccelerator(null); menuItem.setToolTipText...
Creates the right-click popup menu. Subclasses can override this method to replace or augment the popup menu returned.
public static final float[] hsvToRGB(float h,float s,float v){ return hsvToRGB(h,s,v,new float[3]); }
Converts HSV values into RGB array.
private ZLIBCodec(){ }
Prevent construction.
public void lockUI(ProcessInfo pi){ this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); this.setEnabled(false); }
Lock User Interface. Called from the Worker before processing
public void updateNull(String columnName) throws SQLException { updateNull(findColumn(columnName)); }
Updates the designated column with a <code>null</code> value. The <code>updateXXX</code> methods are used to update column values in the current row or the insert row. The <code>updateXXX</code> methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods are call...
public void reset(){ noIndex=false; noFollow=false; noCache=false; refresh=false; refreshTime=0; baseHref=null; refreshHref=null; generalTags.clear(); httpEquivTags.clear(); }
Sets all boolean values to <code>false</code>. Clears all other tags.
public HighlightBuilder useExplicitFieldOrder(boolean useExplicitFieldOrder){ this.useExplicitFieldOrder=useExplicitFieldOrder; return this; }
Send the fields to be highlighted using a syntax that is specific about the order in which they should be highlighted.
public boolean isNavigationAtBottom(){ return (mSmallestWidthDp >= 600 || mInPortrait); }
Should a navigation bar appear at the bottom of the screen in the current device configuration? A navigation bar may appear on the right side of the screen in certain configurations.
private void listReady(List<MyMap> myMaps){ if (myMaps.isEmpty()) { Toast.makeText(this,"There is a problem with the server, please report this to app developer!",Toast.LENGTH_SHORT).show(); } else { myDownloadAdapter.clearList(); myDownloadAdapter.addAll(myMaps); } }
list of countries are ready
public boolean isDescription(){ Object oo=get_Value(COLUMNNAME_IsDescription); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get Description Only.
public QueryIndex(Collection<String> fields,QueryIndexType type){ this.fields=new LinkedHashMap<>(); for ( String field : fields) this.fields.put(field,true); this.type=type; }
Creates index for a collection of fields. If index is sorted, fields will be sorted in ascending order.
public ValueChangeListenerITCase(String name){ super(name); }
Construct a new instance of this test case.
public boolean hasAmbience(){ return this.ambience != null; }
Returns whether the location has an ambience
public List<Company> companies(){ return companies; }
Returns a list of companies the user has made part of his professional experience.
public void configure() throws ReplicatorException { roleName=properties.getString(ReplicatorConf.ROLE); if (isProvisioning()) { if (!ReplicatorConf.ROLE_MASTER.equals(roleName)) throw new ReplicatorException("Provisioning can happen only on master"); roleName=ReplicatorConf.ROLE_MASTER + "-provision"; ...
Process configuration properties and instantiate/configure all plug-ins. This method must be called before the configuration is usable.
void submit(final long ts,final byte[] fromKey,final byte[] toKey,final IKeyRangeIndexProcedure proc,final IResultHandler resultHandler){ final boolean parallel=proc instanceof IParallelizableIndexProcedure; if (log.isInfoEnabled()) log.info("Procedure " + proc.getClass().getName() + " will be mapped across index...
Variant uses the caller's timestamp.
public static boolean initDebug(boolean InitCuda){ return StaticHelper.initOpenCV(InitCuda); }
Loads and initializes OpenCV library from current application package. Roughly, it's an analog of system.loadLibrary("opencv_java").
public boolean isAdjacentHolidayAsLeave(){ Object oo=get_Value(COLUMNNAME_IsAdjacentHolidayAsLeave); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get Consider Adjacent Holidays As Leave?.
private void returnData(Object ret){ if (myHost != null) { myHost.returnData(ret); } }
Used to communicate a return object from a plugin tool to the main Whitebox user-interface.
public static void main(String[] args){ int i=0; int classifierToUse=WORDSHAPECHRIS1; if (args.length == 0) { System.out.println("edu.stanford.nlp.process.WordShapeClassifier [-wordShape name] string+"); } else if (args[0].charAt(0) == '-') { if (args[0].equals("-wordShape") && args.length >= 2) { ...
Usage: <code>java edu.stanford.nlp.process.WordShapeClassifier [-wordShape name] string+ </code><br> where <code>name</code> is an argument to <code>lookupShaper</code>. Known names have patterns along the lines of: dan[12](bio)?(UseLC)?, jenny1(useLC)?, chris[1234](useLC)?. If you don't specify a word shape function,...
protected DocletElementImpl(){ super(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
protected static boolean contains(String value,int start,int length,String[] criteria){ boolean result=false; if (start >= 0 && start + length <= value.length()) { String target=value.substring(start,start + length); for ( String element : criteria) { if (target.equals(element)) { result=tr...
Determines whether <code>value</code> contains any of the criteria starting at index <code>start</code> and matching up to length <code>length</code>
public void pancakeSort(int[] A){ if (A == null || A.length <= 1) return; for (int i=A.length; i > 1; i--) { int mi=findMax(A,i); if (mi != i) { flip(A,mi); flip(A,i - 1); } } }
Find max from from start to end If max is not at the end, filp it to first and flip it to end Reduce array size by one Stop till size reduced to 1
protected void paintCircle(Geo originGeo,double distance,Graphics graphics,MapBean theMap){ OMCircle circle=new OMCircle(originGeo.getLatitude(),originGeo.getLongitude(),Length.DECIMAL_DEGREE.fromRadians(distance)); prepareCircle(circle); circle.generate(theMap.getRotatedProjection()); circle.render(graphics); ...
Paints a unique circle centered on <code>origin</code> and which crosses <code>dest</code> on the given Graphics.
public void update(long value,long timestamp){ rescaleIfNeeded(); lockForRegularUsage(); try { final double priority=weight(timestamp - startTime) / random.nextDouble(); final long newCount=count.incrementAndGet(); if (newCount <= reservoirSize) { values.put(priority,value); } else { ...
Adds an old value with a fixed timestamp to the sample.
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:59:51.865 -0500",hash_original_method="366F843C8FBE8BB09896187A9CDF1388",hash_generated_method="4859A824ABAA5B362F6D19FCD2E6553C") private String[] readArgumentList() throws IOE...
Reads an argument list from the command socket/
public static File savePage(File directory,Page page) throws Exception { File pageFile=getPageFile(directory); Marshaller marshaller=pagesJaxbContext.createMarshaller(); marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE); marshaller.marshal(page,pageFile); pageCache.invalidat...
Persists a page to the file system.
public RatTermVec copy(){ RatTermVec tv=new RatTermVec(); tv.underlying_terms=(Vector)this.underlying_terms.clone(); tv.terms=(RatTerm[])tv.underlying_terms.toArray(new RatTerm[]{}); return tv; }
Copy operation.
public void writeFieldBegin(TField field) throws TException { if (field.type == TType.BOOL) { booleanField_=field; } else { writeFieldBeginInternal(field,(byte)-1); } }
Write a field header containing the field id and field type. If the difference between the current field id and the last one is small (< 15), then the field id will be encoded in the 4 MSB as a delta. Otherwise, the field id will follow the type header as a zigzag varint.
public Group findGroup(String tenantName,String group) throws NoSuchTenantException, NoSuchIdpException, InvalidPrincipalException, IDMException, Exception { return getService().findGroup(tenantName,group,this.getServiceContext()); }
Search for a group by string based on account name.
@Override public void insertAll(DBIDs ids){ if (ids.isEmpty() || (ids.size() == 1)) { return; } if (canBulkLoad()) { List<SpatialEntry> leafs=new ArrayList<>(ids.size()); for (DBIDIter iter=ids.iter(); iter.valid(); iter.advance()) { leafs.add(createNewLeafEntry(iter)); } bulkLoad(leafs)...
Inserts the specified objects into this index. If a bulk load mode is implemented, the objects are inserted in one bulk.
private static void debugPrintln(String msg){ if (DEBUG) { System.err.println("JAXP: " + msg); } }
Prints a message to standard error if debugging is enabled.
public void resolve(CompilationUnitScope upperScope){ resolve(); updateMaxFieldCount(); }
Resolve a top level type declaration
@Override protected void doConfigure(LocalContainer container) throws Exception { LibertyInstall install=new LibertyInstall((InstalledLocalContainer)container); File serverDir=install.getServerDir(null); if (!serverDir.exists()) { Process p=install.runCommand("create"); int retVal=p.waitFor(); if (ret...
Configure the WebSphere Liberty server
public static void writeReverseInt(IoBuffer out,int value){ out.put((byte)(0xFF & value)); out.put((byte)(0xFF & (value >> 8))); out.put((byte)(0xFF & (value >> 16))); out.put((byte)(0xFF & (value >> 24))); }
Writes reversed integer to buffer.
public Operable openUrl(String url,Activity activity){ return openUrl(Uri.parse(url),activity); }
Method used to open an Uri
protected void prepare(){ ProcessInfoParameter[] para=getParameter(); for (int i=0; i < para.length; i++) { String name=para[i].getParameterName(); if (para[i].getParameter() == null) ; else if (name.equals("DateInvoiced")) { m_dateInvoiced_From=((Timestamp)para[i].getParameter()); m_da...
Prepare - e.g., get Parameters.
public javax2.sip.header.ExtensionHeader createExtensionHeader(String name,String value) throws ParseException { if (name == null) throw new NullPointerException("bad name"); gov2.nist.javax2.sip.header.ExtensionHeaderImpl ext=new gov2.nist.javax2.sip.header.ExtensionHeaderImpl(); ext.setName(name); ext.setVa...
Creates a new ExtensionHeader based on the newly supplied name and value values.
@Override public void propertyChange(PropertyChangeEvent evt){ updateText(); }
This method gets called when a bound property is changed.
public Map<String,Object> toMap(){ return schema.toMap(values); }
Obtain the contents of the tuple as a map.
private IoSessionIterator(Set<SelectionKey> keys){ iterator=keys.iterator(); }
Create this iterator as a wrapper on top of the selectionKey Set.
protected boolean fitsBounds(float val,float min,float max){ if (val < min || val > max) return false; else return true; }
Returns true if the specified value fits in between the provided min and max bounds, false if not.
public void testDecoder2(){ boolean res; int originalAppIdValue=mAppIdValue; Random rd=new Random(); mAppIdValue=rd.nextInt(0xFFFF); byte[] pdu=createPDU(2); WspTypeDecoder pduDecoder=new WspTypeDecoder(pdu); res=pduDecoder.seekXWapApplicationId(mWspHeaderStart,mWspHeaderStart + mWspHeaderLen - 1); asse...
WspTypeDecoder test, no header
public void ensureCapacity(int capacity){ if (capacity > _data.length) { int newCap=Math.max(_data.length << 1,capacity); int[] tmp=new int[newCap]; System.arraycopy(_data,0,tmp,0,_data.length); _data=tmp; } }
Grow the internal array as needed to accomodate the specified number of elements. The size of the array doubles on each resize unless <tt>capacity</tt> requires more than twice the current capacity.
public DocumentEvent(Document doc,int offset,int length,String text){ Assert.isNotNull(doc); Assert.isTrue(offset >= 0); Assert.isTrue(length >= 0); fDocument=doc; fOffset=offset; fLength=length; fText=text; fModificationStamp=fDocument.getModificationStamp(); }
Creates a new document event.
public JSONObject put(String key,double value) throws JSONException { this.put(key,new Double(value)); return this; }
Put a key/double pair in the JSONObject.
private void updateProgress(int progress){ if (myHost != null && progress != previousProgress) { myHost.updateProgress(progress); } previousProgress=progress; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
static void openTag(String name,boolean endTag){ openMinorTag(name); if (endTag) closeTag(false); }
Open an XML tag.
void processInverseOperation(){ if (this.displayMode != DISPLAY_MODE.ERROR) { try { if (getDisplayedNumber() == 0) { displayErrorMessage(ResourceManager.CALCULATOR_DIVIDE_BY_ZERO); return; } final double result=1 / getDisplayedNumber(); displayResult(result); } catch (...
Process 1/x operation
static private void updateStaticPortUsage(List<StoragePort> candidatePorts){ _log.debug(String.format("updateStaticPortUsage: %s",candidatePorts.toString())); StorageSystem system=null; Map<StoragePort,Long> portCache=new HashMap<StoragePort,Long>(); if (!candidatePorts.isEmpty()) { system=_dbClient.queryOb...
Updates the static port usage parameters for a set of ports.
public String htmlRuleString(XMLDocumentationHandler handler){ String html="<div class=\"requiredcompoundrule\">All of:"; for ( XMLSyntaxRule rule : rules) { html+=rule.htmlRuleString(handler); } html+="</div>"; return html; }
Describes the rule.
@CanIgnoreReturnValue K checkKey(@Nullable K key){ return key; }
Returns its input, or throws an exception if this is not a valid key.
public static boolean testLineSegmentSphere(float p0X,float p0Y,float p0Z,float p1X,float p1Y,float p1Z,float centerX,float centerY,float centerZ,float radiusSquared){ float dX=p1X - p0X; float dY=p1Y - p0Y; float dZ=p1Z - p0Z; float nom=(centerX - p0X) * dX + (centerY - p0Y) * dY + (centerZ - p0Z) * dZ; floa...
Test whether the line segment with the end points <tt>(p0X, p0Y, p0Z)</tt> and <tt>(p1X, p1Y, p1Z)</tt> intersects the given sphere with center <tt>(centerX, centerY, centerZ)</tt> and square radius <code>radiusSquared</code>. <p> Reference: <a href="http://paulbourke.net/geometry/circlesphere/index.html#linesphere">ht...
public PLCommandInterpreter(){ super(); }
init methods