code
stringlengths
10
174k
nl
stringlengths
3
129k
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
private List<Entry> reduceWithDouglasPeuker(List<Entry> entries,double epsilon){ if (epsilon <= 0 || entries.size() < 3) { return entries; } keep[0]=true; keep[entries.size() - 1]=true; algorithmDouglasPeucker(entries,epsilon,0,entries.size() - 1); List<Entry> reducedEntries=new ArrayList<Entry>(); fo...
uses the douglas peuker algorithm to reduce the given List of entries
public void rebaseZkSnapshot() throws LocalRepositoryException { final String prefix="rebase zk snapshot()"; _log.debug(prefix); final String[] cmd={_SYSTOOL_CMD,_SYSTOOL_REBASE_ZK_SNAPSHOT}; exec(prefix,cmd); _log.info(prefix + " Success"); }
Use current zk snapshot as base for future operations
public UnaryExpression(int operator,int operatorPosition,AstNode operand,boolean postFix){ assertNotNull(operand); int beg=postFix ? operand.getPosition() : operatorPosition; int end=postFix ? operatorPosition + 2 : operand.getPosition() + operand.getLength(); setBounds(beg,end); setOperator(operator); setO...
Constructs a new UnaryExpression with the specified operator and operand. It sets the parent of the operand, and sets its own bounds to encompass the operator and operand.
public void removeColumn(TableColumn column){ int allColumnsIndex=allTableColumns.indexOf(column); if (allColumnsIndex != -1) { allTableColumns.removeElementAt(allColumnsIndex); } super.removeColumn(column); }
Removes <code>column</code> from this column model. Posts <code>columnRemoved</code> event. Will do nothing if the column is not in this model.
public Iterator<E> iterator(){ return new Itr(); }
Returns an iterator over the elements in this queue in proper sequence. The elements will be returned in order from first (head) to last (tail). <p>The returned iterator is <a href="package-summary.html#Weakly"><i>weakly consistent</i></a>.
void done(Connection c){ if (dgcAckNeeded) { Connection conn=null; Channel ch=null; boolean reuse=true; DGCImpl.dgcLog.log(Log.VERBOSE,"send ack"); try { ch=c.getChannel(); conn=ch.newConnection(); DataOutputStream out=new DataOutputStream(conn.getOutputStream()); out.write...
Done with input stream for remote call. Send DGC ack if necessary. Allow sending of ack to fail without flagging an error.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:50.421 -0400",hash_original_method="B680B124D15C27AFF7F59A1FAD367143",hash_generated_method="81CA5C06312B19E2D21605AD81FEA398") public static void writeSwappedDouble(OutputStream output,double value) throws IOException { writeSwap...
Writes a "double" value to an OutputStream. The value is converted to the opposed endian system while writing.
private void updateResetTimeout(){ if (isTrafficChannel()) { mEndTimeout=System.currentTimeMillis(); } else { mEndTimeout=System.currentTimeMillis() + RESET_TIMEOUT_DELAY; } }
Updates the reset timeout threshold to the current time plus delay
private void queueResumeSteps(Workflow workflow,Map<String,com.emc.storageos.db.client.model.Workflow> childWFMap){ for ( String stepId : workflow.getStepMap().keySet()) { StepState state=workflow.getStepStatus(stepId).state; switch (state) { case ERROR: if (childWFMap.containsKey(stepId)) { Workfl...
Queue steps to resume workflow.
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:23.431 -0500",hash_original_method="69FE78AD0B4200050B3EDA46329CEBED",hash_generated_method="BFE6F106A50CB2C5C0AAB90CBC00F5C7") public LongSparseArray(int initialCapacity){...
Creates a new SparseArray containing no mappings that will not require any additional memory allocation to store the specified number of mappings.
DominatorInfo(BitVector dominators){ this.dominators=dominators; }
Make a structure with a given bit set holding the dominators of the basic block.
public float lengthSquared(){ return x * x + y * y + z * z; }
LengthSquared calculates the squared value of the magnitude of the vector.
private double[][] load(File file) throws IOException { MatrixReader reader=null; try { reader=new MatrixReader(file); List<double[]> data=new ArrayList<double[]>(); while (reader.hasNext()) { data.add(reader.next()); } return data.toArray(new double[0][]); } finally { if (reader !...
Loads the data from the specified file.
public void testSkipWholeMessage() throws Exception { TestAllTypes message=TestUtil.getAllSet(); byte[] rawBytes=message.toByteArray(); CodedInputStream input1=CodedInputStream.newInstance(rawBytes); CodedInputStream input2=CodedInputStream.newInstance(rawBytes); UnknownFieldSet.Builder unknownFields=UnknownF...
Tests skipField().
private void initDefinitionsFile() throws ReplicatorException { try { logger.info("Using: " + definitionsFile); String jsonText=NetworkClientFilter.readDefinitionsFile(definitionsFile); Object obj=parser.parse(jsonText); JSONArray array=(JSONArray)obj; definitions=array; for ( Object o : ar...
Initial validation of the JSON definitions file.
public MediaPrintableArea(int x,int y,int w,int h,int units){ if ((x < 0) || (y < 0) || (w <= 0)|| (h <= 0)|| (units < 1)) { throw new IllegalArgumentException("0 or negative value argument"); } this.x=x * units; this.y=y * units; this.w=w * units; this.h=h * units; }
Constructs a MediaPrintableArea object from integer values.
protected POInfo initPO(Properties ctx){ POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName()); return poi; }
Load Meta Data
protected String defaultAttrIndexRange(){ return "1"; }
returns the default attribute index range
@Override final public boolean needsMaterialization(){ return true; }
Always returns <code>true</code> since the RDF value is not inline.
public static String checkAndConvertToCompatibleIPv6Syntax(String hostAddress){ if (hostAddress.indexOf(":") != -1) { LogWrapper logger=LogWrapper.getInstance(); if (logger.fineEnabled()) { logger.fine("IPv6 host address detected, using IPv6 syntax for host in JMX connection URL"); } hostAddress...
If the given host address contains a ":", considers it as an IPv6 address & returns the host based on RFC2732 requirements i.e. surrounds the given host address string with square brackets. If ":" is not found in the given string, simply returns the same string.
public static void closeSilently(Connection conn){ if (conn != null) { try { conn.close(); } catch ( SQLException e) { } } }
Close a connection without throwing an exception.
public final void init(SecureRandom random){ if (serviceIterator == null) { spi.engineInit(random); return; } RuntimeException failure=null; KeyGeneratorSpi mySpi=spi; do { try { mySpi.engineInit(random); initType=I_RANDOM; initKeySize=0; initParams=null; initRandom=r...
Initializes this key generator.
public boolean isSetSyncValue(){ return this.syncValue != null; }
Returns true if field syncValue is set (has been assigned a value) and false otherwise
@Inject DefaultCollectionService(MQService mqService,TSDBService tsdbService,AuditService auditService,SystemConfiguration configuration,SchemaService schemaService,WardenService wardenService,MonitorService monitorService,NamespaceService namespaceService){ super(auditService,configuration); _mqService=mqService; ...
Creates a new DefaultCollectionService object.
private boolean zzRefill() throws java.io.IOException { if (zzStartRead > 0) { System.arraycopy(zzBuffer,zzStartRead,zzBuffer,0,zzEndRead - zzStartRead); zzEndRead-=zzStartRead; zzCurrentPos-=zzStartRead; zzMarkedPos-=zzStartRead; zzStartRead=0; } if (zzCurrentPos >= zzBuffer.length) { cha...
Refills the input buffer.
public boolean isLargestMaxX(final PlanetModel planetModel){ if (maxX == null) return false; return planetModel.getMaximumXValue() - maxX < Vector.MINIMUM_RESOLUTION; }
Return true if maxX is as large as the planet model allows.
public void readSequenceOf(ASN1SequenceOf sequenceOf) throws IOException { if (tag != ASN1Constants.TAG_C_SEQUENCEOF) { throw expected("sequenceOf"); } decodeValueCollection(sequenceOf); }
Decodes ASN.1 SequenceOf type
public void testNegateZero(){ byte rBytes[]={0}; BigInteger aNumber=BigInteger.ZERO; BigInteger result=aNumber.negate(); byte resBytes[]=new byte[rBytes.length]; resBytes=result.toByteArray(); for (int i=0; i < resBytes.length; i++) { assertTrue(resBytes[i] == rBytes[i]); } assertEquals("incorrect s...
negate() ZERO.
@Override public boolean isEmpty(){ return size() == 0; }
Indicates whether map has any entries.
public static BufferedImage createCompatibleImage(BufferedImage image,int width,int height){ return getGraphicsConfiguration().createCompatibleImage(width,height,image.getTransparency()); }
<p>Returns a new compatible image of the specified width and height, and the same transparency setting as the image specified as a parameter.</p>
public SoundCloudTrack next(){ mCurrentTrackIndex=(mCurrentTrackIndex + 1) % mSoundCloudPlaylist.getTracks().size(); return mSoundCloudPlaylist.getTracks().get(mCurrentTrackIndex); }
Retrieve the next track.
public static String validateAccountNo(String AccountNo){ int length=checkNumeric(AccountNo).length(); if (length > 0) return ""; return "PaymentBankAccountNotValid"; }
Validate Account No
public Object runSafely(Catbert.FastStack stack) throws Exception { UIManager ui=stack.getUIMgr(); if (ui != null) ui.reloadSystemHooks(); return null; }
This is a Windows only API call which tells SageTV to unload and then reload any system hooks it has installed. This allows reconfiguration of parameters in the UI and then realization of those changes on the fly.
public void dispose() throws SaslException { if (m_state != STATE_DISPOSED) { m_state=STATE_DISPOSED; } }
Disposes of any system resources or security-sensitive information the SaslClient might be using. Invoking this method invalidates the SaslClient instance. This method is idempotent.
@Override public void visit(NodeVisitor v){ if (v.visit(this) && returnValue != null) { returnValue.visit(v); } }
Visits this node, then the return value if specified.
private int indexOf(String fullPath){ for (int i=0, length=this.relativePaths.length; i < length; i++) { String currentRelativePath=this.relativePaths[i]; if (currentRelativePath == null) continue; String currentContainerPath=this.containerPaths[i]; String currentFullPath=currentRelativePath.lengt...
Returns paths list index of given path or -1 if not found. NOTE: Use indexOf(String, String) for path inside jars
protected synchronized boolean shouldPush(final LogEvent event){ return (m_threshold.isLowerOrEqual(event.getPriority()) || isFull()); }
Determine if LogEvent should initiate a push to target. Subclasses can overide this method to change the conditions under which a push occurs.
public void serialize(Iterable<? extends TransactionOperation> txn,OutputStream out) throws IOException { assert txn != null : "operation list must not be null"; assert out != null : "output stream must not be null"; XMLWriter xmlWriter=new XMLWriter(out); xmlWriter.setPrettyPrint(true); xmlWriter.startDocume...
serialize the passed list of operations to the passed writer.
public boolean isOverflowEnabled(){ return overflowEnabled && (overflowMaxCount == 0 || overflowCounters.synchronousOverflowCounter.get() < overflowMaxCount); }
<code>true</code> if overflow processing is enabled and <code>false</code> if overflow processing was disabled as a configuration option or if a maximum overflow count was configured and has been satisfied, in which case the live journal will NOT overflow.
public BasicDiagnosticFormatter(Options options,JavacMessages msgs){ super(msgs,new BasicConfiguration(options)); }
Create a basic formatter based on the supplied options.
private void updateSystemVolumeInfo(String clusterName,VPlexSystemVolumeInfo systemVolumeInfo) throws VPlexApiException { String systemVolumeName=systemVolumeInfo.getName(); StringBuilder uriBuilder=new StringBuilder(); uriBuilder.append(VPlexApiConstants.URI_CLUSTERS.toString()); uriBuilder.append(clusterName)...
Updates the attribute info for the passed system volume.
public void startJobQueue(){ log.info("Starting geosvc job queue"); try { _queue=_coordinator.getQueue(GEOSVC_QUEUE_NAME,null,new GeoServiceJobSerializer(),DEFAULT_MAX_THREADS); } catch ( Exception e) { log.error("can not startup geosvc job queue",e); } }
Start geosvc job queue
public JSONArray put(int index,Map<String,Object> value) throws JSONException { this.put(index,new JSONObject(value)); return this; }
Put a value in the JSONArray, where the value will be a JSONObject that is produced from a Map.
public IVariableBinding resolveFieldBinding(){ return this.ast.getBindingResolver().resolveField(this); }
Resolves and returns the binding for the field accessed by this expression. <p> Note that bindings are generally unavailable unless requested when the AST is being built. </p>
public void firePropertyChange(PropertyChangeID id,Object oldProp,Object newProp){ String pcname; pcname=PCIDMap.get(id); firePropertyChange(new PropertyChangeEvent(this,pcname,oldProp,newProp)); }
Fire a property change from this object
protected int matchNameValue(char[] pattern,char[] name){ if (pattern == null) return ACCURATE_MATCH; if (name == null) return IMPOSSIBLE_MATCH; if (name.length == 0) { if (pattern.length == 0) { return ACCURATE_MATCH; } return IMPOSSIBLE_MATCH; } else if (pattern.length == 0) { ret...
Return how the given name matches the given pattern.
private boolean handleTouchEvent(MotionEvent ev){ DeviceProfile grid=mLauncher.getDeviceProfile(); int x=(int)ev.getX(); int y=(int)ev.getY(); switch (ev.getAction()) { case MotionEvent.ACTION_DOWN: if (!mContentBounds.isEmpty()) { Rect tmpRect=new Rect(mContentBounds); tmpRect.inset(-grid.allApps...
Handles the touch events to dismiss all apps when clicking outside the bounds of the recycler view.
public FastShortBuffer(){ this.minChunkLen=1024; }
Creates a new <code>short</code> buffer. The buffer capacity is initially 1024 bytes, though its size increases if necessary.
public TrustManagerImpl(KeyStore keyStore){ this(keyStore,null); }
Creates X509TrustManager based on a keystore
public void testSetCapacity(){ int old_size=100; int new_size=200; ByteFifoBuffer instance=new ByteFifoBuffer(old_size); boolean expResult=true; instance.write(getWData(old_size),old_size); boolean result=instance.setCapacity(new_size); assertEquals(expResult,result); expResult=false; instance.resetWr...
Test of SetCapacity method, of class ByteFifoBuffer.
public static FloatBuffer allocateFloatBuffer(float[] coords){ ByteBuffer byteBuffer=ByteBuffer.allocateDirect(coords.length * BYTES_PER_FLOAT); byteBuffer.order(ByteOrder.nativeOrder()); FloatBuffer floatBuffer=byteBuffer.asFloatBuffer(); floatBuffer.put(coords); floatBuffer.position(0); return floatBuffer...
Creates a direct float buffer, and copy coords into it.
private static String escapeJSON(String text){ StringBuilder builder=new StringBuilder(); builder.append('"'); for (int index=0; index < text.length(); index++) { char chr=text.charAt(index); switch (chr) { case '"': case '\\': builder.append('\\'); builder.append(chr); break; case '\b': builder.a...
Escape a string to create a valid JSON string
public PropertyField(String label,String initialValue,boolean isReadWrite,Object domain,int show){ setLayout(new BorderLayout()); add(optionalLabel,BorderLayout.WEST); valFieldBorder=valField.getBorder(); Insets i=valFieldBorder.getBorderInsets(valField); emptyBorder=new EmptyBorder(i.top,i.left,i.bottom,i.ri...
Constructs a PropertyField with an optional label, an initial value, a "writeable" flag, an optional domain (for the slider and list options), and a display form (checkboxes, view buttons, text fields, sliders, or lists). <ul> <li>If show is SHOW_CHECKBOX, a checkbox will be shown (expecting "true" and "false" string v...
public DSAPublicKeyImpl(DSAPublicKeySpec keySpec){ super("DSA"); SubjectPublicKeyInfo spki; p=keySpec.getP(); q=keySpec.getQ(); g=keySpec.getG(); ThreeIntegerSequence threeInts=new ThreeIntegerSequence(p.toByteArray(),q.toByteArray(),g.toByteArray()); AlgorithmIdentifier ai=new AlgorithmIdentifier(AlgName...
Creates object from DSAPublicKeySpec.
public void changeDateUpdated(){ java.text.DateFormat df=java.text.DateFormat.getDateTimeInstance(); setDateUpdated(df.format(new java.util.Date())); }
Mark the date updated, e.g. from storing this roster entry
public JSONObject(JSONTokener x) throws JSONException { this(); char c; String key; if (x.nextClean() != '{') { throw x.syntaxError("A JSONObject text must begin with '{'"); } for (; ; ) { c=x.nextClean(); switch (c) { case 0: throw x.syntaxError("A JSONObject text must end with '}'"); case '}...
Construct a JSONObject from a JSONTokener.
public final boolean isSynchronized(){ return Modifier.isSynchronized(getModifiers()); }
Returns true if the method is synchronized.
public static long divide(long dividend,long divisor){ if (divisor < 0) { if (compare(dividend,divisor) < 0) { return 0; } else { return 1; } } if (dividend >= 0) { return dividend / divisor; } long quotient=((dividend >>> 1) / divisor) << 1; long rem=dividend - quotient * divis...
Returns dividend / divisor, where the dividend and divisor are treated as unsigned 64-bit quantities.
public boolean categoryDesignatorIsGroups(){ return (this.key[4] == 0x02); }
Checks if the category designator in the key of this KLV packet is set to the value corresponding to groups as defined in st336:2007
public PriorExpression(){ }
Ctor - for use to create an expression tree, without child expression.
protected void updateShardBuffers(IndexShard shard,ByteSizeValue shardIndexingBufferSize,ByteSizeValue shardTranslogBufferSize){ if (shard != null) { try { shard.updateBufferSize(shardIndexingBufferSize,shardTranslogBufferSize); } catch ( EngineClosedException e) { } catch ( FlushNotAllowedEn...
set new indexing and translog buffers on this shard. this may cause the shard to refresh to free up heap.
public RangePredicate(int operation,Expression middle,Expression left,Expression right,Comparator cmp){ super(operation,IN_IN,EX_EX,left,right); this.m_middle=middle; this.m_cmp=cmp; }
Create a new RangePredicate.
private static void convertActivityToTranslucentAfterL(Activity activity){ try { Method getActivityOptions=Activity.class.getDeclaredMethod("getActivityOptions"); getActivityOptions.setAccessible(true); Object options=getActivityOptions.invoke(activity); Class<?>[] classes=Activity.class.getDeclaredCl...
Calling the convertToTranslucent method on platforms after Android 5.0
protected void disposeDrawingBuffer(){ Image localDrawingBuffer=drawingBuffer; drawingBuffer=null; if (localDrawingBuffer != null) { localDrawingBuffer.flush(); } }
Clear out resources for the current drawing buffer.
public dr.evolution.util.Date[] parseCalibrationBlock(TaxonList taxonList) throws ImportException, IOException { return readCalibrationBlock(taxonList); }
Parses a 'CALIBRATION' block putting the dates into the appropriate taxa
public void push(){ current.pushCount++; }
Pushes a new table on the stack.
public static short parseShort(CharSequence csq){ return parseShort(csq,10); }
Parses the whole specified character sequence as a signed decimal <code>short</code>.
public static boolean isUseLocalTimeInToString(){ return useLocalTimeInToString; }
If this is true, then DateTime.toString should print local timestamps and Utc if this is false. Default is false.
public void incNumEntriesInVM(long delta){ this.stats.incLong(numEntriesInVMId,delta); }
Increments the current number of entries whose value has been overflowed to disk by a given amount.
public String generate(IStatusBar statusBar,KeyNamePair docTypeKNPair,String docActionSelected){ String info=""; log.info("M_Warehouse_ID=" + m_M_Warehouse_ID); String trxName=Trx.createTrxName("IOG"); Trx trx=Trx.get(trxName,true); setSelectionActive(false); statusBar.setStatusLine(Msg.getMsg(Env.getCtx(),...
Generate Shipments
private void validateProbeEssentials(IdentityProviderDTO identityProvider){ Validate.notNull(identityProvider,sm.getString("valid.not.null","Details of identity provider")); Validate.notEmpty(identityProvider.getUsername(),sm.getString("valid.not.empty","Username")); Validate.notNull(identityProvider.getPassword(...
Validates all required parameters to examine connectivity against identity provider
public String toString(cp_info constant_pool[]){ return Float.toString(bytes); }
Returns a String representation of this entry.
@SideOnly(Side.CLIENT) protected boolean isPlayerLookingAt(){ final MovingObjectPosition hit=Minecraft.getMinecraft().objectMouseOver; return hit != null && hit.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && getCasing().getPosition().equals(hit.getBlockPos()) && hit.sideHit == Face.toEnumFacing(getFace...
Utility method for determining whether the player is currently looking at this module.
public boolean contains(String data){ return map.get(data) != null; }
Determines whether or not the Set contains this String.
private void startScan(boolean reverseScan){ mIsScanInProgress=true; mReverseScan=reverseScan; mHandler.post(mAutoScanRunnable); }
Starts the auto scan if it is not already running
private void loadAndValidate(DatabaseDataSet databaseDataSet,OperationGroup updateGroup,OperationGroup deleteGroup,OperationGroup dependsOnGroup) throws SortServiceProviderException, SortPersistException { logStep("Loading dataset from database"); try { databaseDataSet.loadEntities(updateGroup,deleteGroup,depen...
Loads update and delete entities fresh from the data from the database. Each entity must exist and have the correct optimistic lock.
@Override public boolean eIsSet(int featureID){ switch (featureID) { case N4JSPackage.N4_ENUM_DECLARATION__LITERALS: return literals != null && !literals.isEmpty(); } return super.eIsSet(featureID); }
<!-- begin-user-doc --> <!-- end-user-doc -->
private void extractKeys(Properties props){ String keyspec=props.getProperty(io.warp10.continuum.Configuration.DIRECTORY_KAFKA_METADATA_MAC); if (null != keyspec) { byte[] key=this.keystore.decodeKey(keyspec); Preconditions.checkArgument(16 == key.length,"Key " + io.warp10.continuum.Configuration.DIRECTORY_...
Extract Directory related keys and populate the KeyStore with them.
private void addBefore(Entry<K,V> existingEntry){ after=existingEntry; before=existingEntry.before; before.after=this; after.before=this; }
Inserts this entry before the specified existing entry in the list.
protected void annotateInheritedFromClass(AnnotatedTypeMirror type,Set<AnnotationMirror> fromClass){ type.addMissingAnnotations(fromClass); }
Callback to determine what to do with the annotations from a class declaration.
private void recordMessage(final BaseMqttMessage message){ if (recentMessages.size() > 0 && message.getTopic().equals(recentMessages.get(0).getTopic()) && message.getPayload().equals(recentMessages.get(0).getPayload())) { recentMessages.remove(0); } recentMessages.add(0,message); while (recentMessages.size(...
Records the given message on the list of 'recent' messages.
private static <T>void siftUpComparable(int k,T x,Object[] array){ Comparable<? super T> key=(Comparable<? super T>)x; while (k > 0) { int parent=(k - 1) >>> 1; Object e=array[parent]; if (key.compareTo((T)e) >= 0) break; array[k]=e; k=parent; } array[k]=key; }
Inserts item x at position k, maintaining heap invariant by promoting x up the tree until it is greater than or equal to its parent, or is the root. To simplify and speed up coercions and comparisons. the Comparable and Comparator versions are separated into different methods that are otherwise identical. (Similarly fo...
public void testDetectLanguageEs(){ LOGGER.debug("detectLanguage es"); LanguageDetector instance=LanguageDetector.getInstance(); Document doc; try { doc=Jsoup.parse(new File(PATH + "es.wikipedia.org-wiki-Accesibilidad_web_20140701.html"),UTF_8); LOGGER.debug("start detection"); assertEquals("es",ins...
Test of detectLanguage method, of class LanguageDetector with es pages.
public void deleteBucketImage(String bucketName,GenericRequest genericRequest) throws OSSException, ClientException { assertParameterNotNull(bucketName,"bucketName"); ensureBucketNameValid(bucketName); Map<String,String> params=new HashMap<String,String>(); params.put(SUBRESOURCE_IMG,null); RequestMessage req...
Delete bucket image
private void updateProgress(int progress){ if (myHost != null) { myHost.updateProgress(progress); } else { System.out.println("Progress: " + progress + "%"); } }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
@Override protected double solveImpl(final Derivative f,final double xAccuracy){ double froot, dfroot, dx, dxold; double xh, xl; if (fxMin < 0.0) { xl=xMin; xh=xMax; } else { xh=xMin; xl=xMax; } dxold=xMax - xMin; dx=dxold; froot=f.op(root); dfroot=f.derivative(root); evaluationNumb...
Computes the roots of a function by using the Newton Safe method.
public ChannelSnapshot createSnapshot(){ return new ChannelSnapshot(this,mode); }
Create an immutable snapshot of this channel.
@Override public void execute(){ entity.onPrivateListen(event.get("texttype"),event.get("text")); }
executes the event
public void testSplit2(){ SplittableRandom sr=new SplittableRandom(12345); for (int reps=0; reps < REPS; ++reps) { SplittableRandom sc=sr.split(); int i=0; while (i < NCALLS && sr.nextLong() == sc.nextLong()) ++i; assertTrue(i < NCALLS); } }
A SplittableRandom produced by split() of a seeded-constructed SplittableRandom generates a different sequence
static int createShader(String resource,int type,String version) throws IOException { int shader=glCreateShader(type); ByteBuffer source=ioResourceToByteBuffer(resource,8192); if (version == null) { PointerBuffer strings=BufferUtils.createPointerBuffer(1); IntBuffer lengths=BufferUtils.createIntBuffer(1);...
Create a shader object from the given classpath resource.
public void addConnectionOptions(MqttConnectOptions connectOptions){ mqttConnectOptions=connectOptions; }
Add the connectOptions used to connect the client to the server
public static void check(boolean cond,String msg){ if (!cond) error(msg); }
Equivalent to assert cond : value;
public RDFParseException(Throwable t){ this(t,-1,-1); }
Creates a new ParseException wrapping another exception. The ParseException will inherit its message from the supplied source exception.
public GF2nONBElement(GF2nONBField gf2n,BigInteger val){ mField=gf2n; mDegree=mField.getDegree(); mLength=gf2n.getONBLength(); mBit=gf2n.getONBBit(); mPol=new long[mLength]; assign(val); }
Construct the element of the field <tt>gf2n</tt> with the specified value <tt>val</tt>.
public Key minKey(){ if (isEmpty()) throw new NoSuchElementException("Priority queue is empty"); return min.key; }
Gets the minimum key currently in the queue Worst case is O(1)
public void gotoPosition(int x,int y){ int start=pointToInt(x,y); setCaretPosition(start); }
set the cursor position on screen
protected void sequence_TerminalExpression(ISerializationContext context,DoubleLiteral semanticObject){ if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject,GamlPackage.Literals.EXPRESSION__OP) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing...
Contexts: Expression returns DoubleLiteral Pair returns DoubleLiteral Pair.Pair_1_0_0 returns DoubleLiteral If returns DoubleLiteral If.If_1_0 returns DoubleLiteral Or returns DoubleLiteral Or.Expression_1_0 returns DoubleLiteral And returns DoubleLiteral And.Expression_1_0 returns DoubleLiteral Cast returns DoubleLite...
@Override public Envelope computeEnvelope(final IScope scope){ return null; }
Method computeEnvelope()
public static Label icone(String tipo){ Label label=new Label(); switch (tipo) { case "INFO": label.getStyleClass().add("img-dialog"); break; case "ERRO": label.getStyleClass().add("img-dialog-erro"); break; case "ALERTA": label.getStyleClass().add("img-dialog-alert"); break; case "CONFIRMAR": label.getStyleCla...
Conforme o tipo da mensagem exibir seu respectivo icone