code
stringlengths
10
174k
nl
stringlengths
3
129k
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 boolean isSecure(){ return secure; }
Returns true if this protocol is secure
protected void skipRemainingTagsInCurrentIfd() throws IOException, ExifInvalidFormatException { int endOfTags=mIfdStartOffset + OFFSET_SIZE + TAG_SIZE * mNumOfTagInIfd; int offset=mTiffStream.getReadByteCount(); if (offset > endOfTags) { return; } if (mNeedToParseOffsetsInCurrentIfd) { while (offset <...
Skips the tags area of current IFD, if the parser is not in the tag area, nothing will happen.
public OADProfile.OADApproval programWithFirmware(FirmwareBundle bundle,OADProfile.OADListener listener){ return gattClient.getOADProfile().programWithFirmware(bundle,listener); }
Programs the Bean with new firmware images.
public static double pooledMean(int size1,double mean1,int size2,double mean2){ return (size1 * mean1 + size2 * mean2) / (size1 + size2); }
Returns the pooled mean of two data sequences. That is <tt>(size1 * mean1 + size2 * mean2) / (size1 + size2)</tt>.
@DSSource({DSSourceKind.NETWORK}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:58:41.462 -0500",hash_original_method="2F721D777A36DFB8DFB35BB3F12A2C71",hash_generated_method="8CBE85E4D5CC888894020E43CC5894C6") public static byte[] stringToGsm7BitPackedWithHeader(String data,byte[...
Converts a String into a byte array containing the 7-bit packed GSM Alphabet representation of the string. If a header is provided, this is included in the returned byte array and padded to a septet boundary. This method is used by OEM code.
public void paint(Graphics g,int offs0,int offs1,Shape bounds,JTextComponent c){ Rectangle alloc=bounds.getBounds(); try { TextUI mapper=c.getUI(); Rectangle p0=mapper.modelToView(c,offs0); Rectangle p1=mapper.modelToView(c,offs1); Color color=getColor(); if (color == null) { g.setColor(c....
Paints a highlight.
@Override public boolean isConnected(){ return channel.isConnected(); }
Description: <br>
public void add_return(java.lang.String param){ if (local_return == null) { local_return=new java.lang.String[]{}; } local_returnTracker=true; java.util.List list=org.apache.axis2.databinding.utils.ConverterUtil.toList(local_return); list.add(param); this.local_return=(java.lang.String[])list.toArray(ne...
Auto generated add method for the array for convenience
private void loadAcsIdFromArchId(String entidad) throws Exception { String qual; ArchivesTable table=new ArchivesTable(); if (_logger.isDebugEnabled()) _logger.debug("loadAcsIdFromArchId"); DbConnection dbConn=new DbConnection(); try { dbConn.open(DBSessionManager.getSession(entidad)); qual=table.ge...
Carga el identificador de acceso del archivador.
@Override protected Cipher initCipher(int mode) throws GeneralSecurityException { Provider provider=Security.getProvider("SunJCE"); if (provider == null) { throw new RuntimeException("SunJCE provider does not exist."); } Cipher ci=Cipher.getInstance(transformation,provider); if (Cipher.ENCRYPT_MODE == mod...
Initiate the Cipher object using given "mode".
public void initialize(){ }
Is called during toolbox initialization The implementation is empty, subclasses may override
public static boolean isRemoveAirThatCanNotLand(final GameData data){ final boolean isRemoveAir; data.acquireReadLock(); try { final String prop=data.getSequence().getStep().getProperties().getProperty(GameStep.PROPERTY_removeAirThatCanNotLand); if (prop != null) { isRemoveAir=Boolean.parseBoolean(p...
Kills all air that cannot land. Normally would occur both at the end of noncombat movement and also at end of placement phase.
public static void main(String args[]){ String myIP="1.2.3.5"; String exitIP="27.124.124.122"; String DNSELServer="torproject.org"; System.out.println("Using Tor? " + isUsingTor(myIP,443,exitIP,DNSELServer)); }
Test the checker.
public IXMLElement createElement(String fullName,String systemID,int lineNr){ return new XMLElement(fullName,systemID,lineNr); }
Creates an empty element.
private int max(Map<Integer,ModifiableDBIDs> candidates){ DBIDs maxSet=null; Integer maxDim=null; for ( Integer nextDim : candidates.keySet()) { DBIDs nextSet=candidates.get(nextDim); if (maxSet == null || maxSet.size() < nextSet.size()) { maxSet=nextSet; maxDim=nextDim; } } return ma...
Returns the set with the maximum size contained in the specified map.
public static String quoteName(String name){ StringBuilder sb=new StringBuilder(); int len=name.length(); for (int i=0; i < len; i++) { char c=name.charAt(i); if (c == '\\' || c == '"') { sb.append('\\'); } sb.append(c); } return sb.toString(); }
Returns the name, with internal backslashes and quotation marks preceded by backslashes. The outer quote marks themselves are not added by this method.
@Override public void send(HandshakeIODataStream out){ }
Sends message
public static void closeCache(){ if (cache != null && !cache.isClosed()) { cache.close(); cache.getDistributedSystem().disconnect(); } }
Close the cache
public void detach(){ throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,null)); }
Detaches the <code>DTMIterator</code> from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. After <code>detach</code> has been invoked, calls to <code>nextNode</code> or <code>previousNode</code> will raise a runtime exception. In general, detach shoul...
public static void main(String[] args) throws Exception { TechnicalInformation info; TechnicalInformation additional; String tmpStr; Class<?> cls; TechnicalInformationHandler handler; if (args.length != 0) { info=null; tmpStr=Utils.getOption('W',args); if (tmpStr.length() != 0) { cls=Class...
Prints some examples of technical informations if there are no commandline options given. Otherwise the information of a given TechnicalInformationHandler can be printed. <p/> Valid options are: <p/> -W classname <br/> The classname of the TechnicalInformationHandler to print the information for <p/> -bibtex <br/> Prin...
public GMSMember(MemberAttributes attr,InetAddress i,int p,boolean networkPartitionDetectionEnabled,boolean preferredForCoordinator,short version,long msbs,long lsbs){ setAttributes(attr); this.inetAddr=i; this.udpPort=p; this.networkPartitionDetectionEnabled=networkPartitionDetectionEnabled; this.preferredFo...
Create a CacheMember referring to the current host (as defined by the given string).
private void patchVMNetworkDetails(EnumerationContext ctx,ComputeState resource,String resourceGroupName,String vmName,AtomicInteger numOfPatches){ if (resource.networkInterfaceLinks != null) { String networkLink=resource.networkInterfaceLinks.get(0); Operation.createGet(getHost(),networkLink).setCompletion(n...
Gets the network links from the compute resource. Obtains the Network state information from Azure.
protected Text createTextNode(String text){ return getOwnerDocument().createCDATASection(text); }
Creates a text node of the current type.
public void lerp(Vector2 dp,double da,double alpha,Transform result){ result.set(this); result.translate(dp.x * alpha,dp.y * alpha); result.rotate(da * alpha,result.getTranslationX(),result.getTranslationY()); }
Interpolates this transform linearly, by alpha, given the change in position (&Delta;p) and the change in angle (&Delta;a) and places it into result.
public SQLNonTransientException(String reason,Throwable cause){ super(reason,cause); }
Constructs a <code>SQLTransientException</code> object with a given <code>reason</code> and <code>cause</code>. The <code>SQLState</code> is initialized to <code>null</code> and the vendor code is initialized to 0. <p>
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 void actionPerformed(ActionEvent e){ if (!p_loadedOK) return; if (e.getSource() != null) { if (e.getSource() instanceof VCheckBox) { VCheckBox cb=(VCheckBox)e.getSource(); if (cb.getName().equals("IsSOTrx")) { if (cb.isSelected()) { fIsDelivered.setText(Msg.translate(Env.g...
Action Listener
@Override protected boolean isSuccessful(final Player player){ final int random=Rand.roll1D100(); double karma=player.useKarma(FINDING_PROBABILITY * 10); if (karma <= 0) { karma=karma - FINDING_PROBABILITY * 5; } karma=karma / 10; return random <= (FINDING_PROBABILITY + karma) * 100; }
Decides if the activity was successful.
public static String escape(String theString){ theString=theString.replaceAll("\"","\\\\\""); StringBuffer aBuffer=new StringBuffer(); Matcher aMatcher=Pattern.compile("\\\\([^tnrbf\"'\\\\])").matcher(theString); while (aMatcher.find()) { aMatcher.appendReplacement(aBuffer,String.format("\\\\\\\\%s",aMatche...
Properly escape out any special characters in the query string. Replaces unescaped double quotes with \" and replaces slashes '\' which are not a valid escape sequence such as \t or \n with a double slash '\\' so they are unescaped correctly by a SPARQL parser.
private void makeTail(LinkedEntry<K,V> e){ e.prv.nxt=e.nxt; e.nxt.prv=e.prv; LinkedEntry<K,V> header=this.header; LinkedEntry<K,V> oldTail=header.prv; e.nxt=header; e.prv=oldTail; oldTail.nxt=header.prv=e; modCount++; }
Relinks the given entry to the tail of the list. Under access ordering, this method is invoked whenever the value of a pre-existing entry is read by Map.get or modified by Map.put.
public SyncValueResponseMessage(SyncValueResponseMessage other){ __isset_bitfield=other.__isset_bitfield; if (other.isSetHeader()) { this.header=new AsyncMessageHeader(other.header); } this.count=other.count; }
Performs a deep copy on <i>other</i>.
private CSelectionEvaluator(){ }
You are not supposed to instantiate this class.
public SIPHeader parse() throws ParseException { if (debug) dbg_enter("RetryAfterParser.parse"); RetryAfter retryAfter=new RetryAfter(); try { headerName(TokenTypes.RETRY_AFTER); String value=lexer.number(); try { int ds=Integer.parseInt(value); retryAfter.setRetryAfter(ds); } catch...
parse the String message
public static double cdf(double x,double lower,double upper){ if (x < lower) return 0.0; if (x > upper) return 1.0; return (x - lower) / (upper - lower); }
cumulative density function of the uniform distribution
public void visitOuterClass(String owner,String name,String desc){ if (cv != null) { cv.visitOuterClass(owner,name,desc); } }
Visits the enclosing class of the class. This method must be called only if the class has an enclosing class.
public AnimatedGraphics(){ Timer timer=new Timer(30,this); timer.setInitialDelay(1000); animStartTime=1000 + System.nanoTime() / 1000000; timer.start(); }
Set up and start the timer
private void createStoragePool(StoragePool pool,CIMInstance poolInstance,AccessProfile profile,String poolClassName,String supportedVolumeTypes,Set<String> protocols,Map<URI,StoragePool> poolsToMatchWithVpool,StorageSystem device) throws URISyntaxException, IOException { boolean newPool=false; boolean modifiedPool=...
Create StoragePool Record, if not present already, else update only the properties.
private Object sanitizeGauge(Object value){ final Object finalValue; if (value instanceof Double && (Double.isInfinite((Double)value) || Double.isNaN((Double)value))) { finalValue=null; } else if (value instanceof Float && (Float.isInfinite((Float)value) || Float.isNaN((Float)value))) { finalValue=null...
InfluxDB does not like "NaN" for number fields, use null instead
void stop(){ httpServer.stop(0); }
Stop TSA service.
public String sendMsgWaitingFax(int count,String dest) throws SmsException, IOException { return sendMsgWaiting(MwiType.FAX,count,dest); }
Sends a fax message waiting message indication.
protected URL makeCommentsFeedUrl(String issueId) throws MalformedURLException { return new URL(issuesBaseUri + "/" + issueId+ "/comments"+ PROJECTION); }
Constructs comments feed URL.
public final int yylength(){ return zzMarkedPos - zzStartRead; }
Returns the length of the matched text region.
private static void importIdbFileInternal(final String idaDirectory,final String idbFile,final IDatabase database,final CBaseExporter exporter) throws ImportFailedException { try { exporter.importModule(idbFile,idaDirectory,database); } catch ( final ConfigFileException exception) { throw new ImportFailed...
Imports an IDB file while showing a progress dialog.
public void markBlockForBonemeal(int x,int y,int z){ bonemealMarkers.add(x); bonemealMarkers.add(y); bonemealMarkers.add(z); }
Marks coordinates to be applied bonemeal to after spawning has finished and a block update was pushed
public Period withFieldAdded(DurationFieldType field,int value){ if (field == null) { throw new IllegalArgumentException("Field must not be null"); } if (value == 0) { return this; } int[] newValues=getValues(); super.addFieldInto(newValues,field,value); return new Period(newValues,getPeriodType()...
Creates a new Period instance with the valueToAdd added to the specified field. <p> This period instance is immutable and unaffected by this method call.
public boolean implies(Permission p){ if (!(p instanceof MBeanServerPermission)) return false; MBeanServerPermission that=(MBeanServerPermission)p; return ((this.mask & that.mask) == that.mask); }
<p>Checks if this MBeanServerPermission object "implies" the specified permission.</p> <p>More specifically, this method returns true if:</p> <ul> <li> <i>p</i> is an instance of MBeanServerPermission,</li> <li> <i>p</i>'s target names are a subset of this object's target names</li> </ul> <p>The <code>createMBeanServer...
protected int read(byte[] buffer) throws IOException { return mTiffStream.read(buffer); }
Equivalent to read(buffer, 0, buffer.length).
public boolean addWorkingDir(String dirName){ if (dirName == null) { throw new NullPointerException(); } return addToListInternal(currentWorkingDirectoryList,new File(dirName)); }
Add a working directory to the project.
public static HadoopErrorSimulator instance(){ return ref.get(); }
Gets the error simulator instance.
public static JsonFormatter createJsonFormatter(){ return new DefaultJsonFormatter(); }
Create the default JSON formatter.
@Override public ImmutableSet<Entry<K,V>> entries(){ ImmutableSet<Entry<K,V>> result=entries; return result == null ? (entries=new EntrySet<K,V>(this)) : result; }
Returns an immutable collection of all key-value pairs in the multimap. Its iterator traverses the values for the first key, the values for the second key, and so on.
public void testTypicalInverted(){ Instances result; m_Filter=getFilter(".*Att2$",true); result=useFilter(); assertEquals(3,result.numAttributes()); assertEquals(m_Instances.numInstances(),result.numInstances()); }
Tests removing all attributes but attributes ending with "Att2".
private static Bitmap createAvatar(int backgroundColor,String text,int pixelsSide){ android.graphics.Bitmap.Config bitmapConfig=android.graphics.Bitmap.Config.ARGB_8888; Bitmap bitmap=Bitmap.createBitmap(pixelsSide,pixelsSide,bitmapConfig); Canvas canvas=new Canvas(bitmap); canvas.drawColor(backgroundColor); ...
Create an avatar bitmap from a text.
private int dowait(boolean timed,long nanos) throws InterruptedException, BrokenBarrierException, TimeoutException { final ReentrantLock lock=this.lock; lock.lock(); try { final Generation g=generation; if (g.broken) throw new BrokenBarrierException(); if (Thread.interrupted()) { breakBarrie...
Main barrier code, covering the various policies.
protected void Argument() throws javax.xml.transform.TransformerException { int opPos=m_ops.getOp(OpMap.MAPINDEX_LENGTH); appendOp(2,OpCodes.OP_ARGUMENT); Expr(); m_ops.setOp(opPos + OpMap.MAPINDEX_LENGTH,m_ops.getOp(OpMap.MAPINDEX_LENGTH) - opPos); }
Argument ::= Expr
public static void w(String msg){ if (!allowW) return; StackTraceElement caller=getCallerStackTraceElement(); String tag=generateTag(caller); if (sLevel > LEVEL_WARNING) { return; } Log.w(tag,msg); }
Send a WARNING log message
void addClasses(List<ClassNode> classList){ for ( ClassNode node : classList) { addClass(node); } }
Appends all of the fully qualified class names in this module into the given map
protected boolean isBroken(){ return broken; }
Set a flag indicating that it is not safe to continue using this semaphore. This is the case only if one of two things happened: 1. A node that previously acquired on this semaphore failed and semaphore is created in non-failoversafe mode; 2. Local node failed (is closed), so any any threads on this node waiting to acq...
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.
protected short reportReturn(String methodCall,short value){ reportAllReturns(methodCall,"" + value); return value; }
Conveniance method to report (for logging) that a method returned a short value.
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd,int featureID,NotificationChain msgs){ switch (featureID) { case N4JSPackage.ITERATION_STATEMENT__STATEMENT: return basicSetStatement(null,msgs); case N4JSPackage.ITERATION_STATEMENT__EXPRESSION: return basicSetExpression(null,msgs); } ret...
<!-- begin-user-doc --> <!-- end-user-doc -->
public XObject operate(XObject left,XObject right) throws javax.xml.transform.TransformerException { return new XNumber((int)(left.num() / right.num())); }
Apply the operation to two operands, and return the result.
public boolean isEmpty(){ return scanner.isEmpty(); }
This is used to determine whether the scanned class represents a primitive type. A primitive type is a type that contains no XML annotations and so cannot be serialized with an XML form. Instead primitives a serialized using transformations.
public void clearTransaction(){ this.transactionID=null; if (this.transactionQueue != null) { for ( Command c : this.transactionQueue) { ByteBuf r=c.getResponse(); if (r != null) r.release(); } this.transactionQueue.clear(); } }
Reset the transaction of client
public static String streamFile(HttpServletResponse response,File file){ if (file == null) return "No File"; if (!file.exists()) return "File not found: " + file.getAbsolutePath(); MimeType mimeType=MimeType.get(file.getAbsolutePath()); try { int bufferSize=2048; int fileLength=(int)file.length(); ...
Stream File
public boolean fullScroll(int direction){ boolean down=direction == View.FOCUS_DOWN; int height=getHeight(); mTempRect.top=0; mTempRect.bottom=height; if (down) { int count=getChildCount(); if (count > 0) { View view=getChildAt(count - 1); mTempRect.bottom=view.getBottom() + getPaddingBott...
<p>Handles scrolling in response to a "home/end" shortcut press. This method will scroll the view to the top or bottom and give the focus to the topmost/bottommost component in the new visible area. If no component is a good candidate for focus, this scrollview reclaims the focus.</p>
public ReflectionApp(){ super("Reflections"); add(new ReflectionPanel()); setSize(360,380); setLocationRelativeTo(null); }
Creates a new instance of ReflectionApp
IgfsDirectoryInfo(IgniteUuid id,@Nullable Map<String,IgfsListingEntry> listing,@Nullable Map<String,String> props,long accessTime,long modificationTime){ super(id,props,accessTime,modificationTime); this.listing=listing; }
Constructs file info.
public String toString(){ return contact.toString(); }
This is used to provide a textual representation of the parameter. Providing a string describing the parameter is useful for debugging and for exception messages.
public LoggingConfigurator(LogContext context){ this.context=context; this.propertyConfigurator=new PropertyConfigurator(this.context); }
Construct a new instance.
public AbIocEventListener longClick(String method){ this.longClickMethod=method; return this; }
Long click.
protected static void zeroOneNormalization(List<float[]> instanceList,int len){ int dimension=len; float[] mins=new float[dimension]; float[] maxs=new float[dimension]; Arrays.fill(mins,Float.MAX_VALUE); Arrays.fill(maxs,Float.MIN_VALUE); for ( float[] instance : instanceList) { for (int i=0; i < len; ...
Conduct the 0-1 normalization.
public static VersionInfoRequest create(){ VersionInfoRequest m=new VersionInfoRequest(); return m; }
Returns a <code>VersionInfoRequest</code>.
private Location findRandomAvailableLocation(){ List<Location> availableLocations=new ArrayList<>(); for ( Integer x : gridOperator.getTraverseX()) { for ( Integer y : gridOperator.getTraverseY()) { Location thisloc=new Location(x,y); if (gameGrid.get(thisloc) == null) { availableLocatio...
Finds a random location or returns null if none exist
public int read(char[] buffer,int offset,int size) throws IOException { if (this.atEndOfData) { return -1; } int charsRead=0; if ((offset + size) > buffer.length) { size=buffer.length - offset; } while (charsRead < size) { char ch=this.reader.read(); if (ch == '?') { char ch2=this.read...
Reads a block of data.
AtlasVertex findVertex(DataTypes.TypeCategory category,String typeName){ LOG.debug("Finding AtlasVertex for {}.{}",category,typeName); Iterator results=graph.query().has(Constants.TYPENAME_PROPERTY_KEY,typeName).vertices().iterator(); AtlasVertex vertex=null; if (results != null && results.hasNext()) { vert...
Find vertex for the given type category and name, else create new vertex
protected void processMatrixMatrixBinaryInstruction(ExecutionContext ec) throws DMLRuntimeException { SparkExecutionContext sec=(SparkExecutionContext)ec; checkMatrixMatrixBinaryCharacteristics(sec); String rddVar1=input1.getName(); String rddVar2=input2.getName(); JavaPairRDD<MatrixIndexes,MatrixBlock> in1=s...
Common binary matrix-matrix process instruction
void createHeapPhiInstruction(BasicBlock bb,HeapVariable<Object> H){ Instruction s=makePhiInstruction(H,bb); ArrayList<Instruction> heapPhis=heapPhi.get(bb); if (heapPhis == null) { heapPhis=new ArrayList<Instruction>(2); heapPhi.put(bb,heapPhis); } heapPhis.add(s); registerInstruction(s,bb); }
Create a heap control phi instruction, and store it at the beginning of a basic block.
private void writeHexByte(byte b){ int i=b; if (b < 0) { i=256 + b; } writeHexDigit((byte)(i / 16)); writeHexDigit((byte)(i & 0xf)); }
Write a byte as two hex characters
public ForwardingDrawable(Drawable drawable){ mCurrentDelegate=drawable; DrawableUtils.setCallbacks(mCurrentDelegate,this,this); }
Constructs a new forwarding drawable.
public SQLStringAutoIndentStrategy(String partitioning){ super(); }
Creates a new SQL string auto indent strategy for the given document partitioning.
void showGameOptions(){ GameOptions options=new GameOptions(); options.initialize(); options.loadOptions(); if (optdlg == null) { optdlg=new GameOptionsDialog(frame,options,true); } optdlg.update(options); optdlg.setVisible(true); }
Display the game options dialog.
public boolean isDefaultNamespace(String namespaceURI){ return false; }
DOM Level 3: This method checks if the specified <code>namespaceURI</code> is the default namespace or not.
public void updateThreadCount(int threadCount){ this.threadCount=threadCount; shutdown(); start(); }
Sets the number of network threads and restarts the network threads
protected void sequence_LogicalANDExpression_LogicalORExpression(ISerializationContext context,BinaryLogicalExpression semanticObject){ genericSequencer.createSequence(context,semanticObject); }
Contexts: LogicalORExpression<In,Yield> returns BinaryLogicalExpression LogicalORExpression<In> returns BinaryLogicalExpression LogicalORExpression<Yield> returns BinaryLogicalExpression LogicalORExpression returns BinaryLogicalExpression LogicalORExpression.BinaryLogicalExpression_1_0_0_0<In,Yield> returns BinaryLogic...
private void changeDisplay(int year,int monthOfYear,int dayOfMonth){ timeDisplay.setText(String.format("%d/%d/%d",++monthOfYear,dayOfMonth,year)); }
changes the date display
public static void resetLoadSaveFailure(){ loadSaveFailureEncountered=false; }
Resets the failure flag
static public NodeModel parse(File f,boolean removeComments,boolean removePIs) throws SAXException, IOException, ParserConfigurationException { DocumentBuilder builder=getDocumentBuilderFactory().newDocumentBuilder(); ErrorHandler errorHandler=getErrorHandler(); if (errorHandler != null) builder.setErrorHandler...
Create a NodeModel from an XML file.
public boolean equals(java.lang.Object obj){ return false; }
Compares this object against the specified object. The result is true if and only if the argument is not null and is a Double object that represents a double that has the identical bit pattern to the bit pattern of the double represented by this object. For this purpose, two double values are considered to be the same ...
public static void write(ObjectReference o){ writeHex(o.toAddress().toWord(),BYTES_IN_ADDRESS); }
writes an object reference, in hexadecimal. It is zero-padded.
protected boolean hasHistory(){ return true; }
Has History
public void testRecognizePortRestrictedCone() throws Exception { Response testIResponse1=MessageFactory.create3489BindingResponse(mappedClientAddress,responseServerAddress,responseServerAddress); Response testIResponse2=null; Response testIResponse3=MessageFactory.create3489BindingResponse(mappedClientAddress,res...
Performs a test where no responces are given the stun client so that it concludes it is behind a Port Restricted Cone.
public V addVertex(G graph,V2 delegate){ V vertex=factory.createVertex(delegate); if (insertVertex(graph,vertex)) { graph.setMapping(delegate,vertex); return vertex; } else return null; }
Creates a new vertex decorator that decorates <tt>delegate</tt> and adds it to a graph.
public static void main(String[] args){ double[] p=new double[3]; p[0]=6.0; p[1]=-11.0; p[2]=6.0; Polynomial P=new Polynomial(p); double[] x=new double[3]; x[0]=1.0; x[1]=2.0; x[2]=3.0; double[] f=new double[3]; f[0]=1.0; f[1]=8.0; f[2]=27.0; LagrangePolynomial L=new LagrangePolynomial(x,f);...
The main method.
public static void writeToFileReal_1D(int[] x,String filename){ try { BufferedWriter out=new BufferedWriter(new FileWriter(filename)); for (int j=0; j < x.length; j++) { out.write(Integer.toString(x[j])); out.newLine(); } out.close(); } catch ( IOException e) { e.printStackTrace();...
Saves elements of <code>x</code> in a file <code>filename</code>, assuming that it is 2D real array.
public int cardinality(){ return BitsUtil.cardinality(bits); }
Compute the vector cardinality (uncached!)
public void generateKey(int bitLengthVal,int certainty){ bitLength=bitLengthVal; p=new BigInteger(bitLength / 2,certainty,rand); q=new BigInteger(bitLength / 2,certainty,rand); n=p.multiply(q); nSquared=n.multiply(n); g=new BigInteger("2"); lambda=p.subtract(BigInteger.ONE).multiply(q.subtract(BigInteger....
Sets up the public key and private key.
protected double findSplitNumeric(int index) throws Exception { if (m_Instances.classAttribute().isNominal()) { return findSplitNumericNominal(index); } else { return findSplitNumericNumeric(index); } }
Finds best split for numeric attribute and returns value.
@Override public void clear(){ if (mMemoryCache != null) { mMemoryCache.evictAll(); if (DEBUG) { Log.d(TAG,"Memory cache cleared"); } } }
clear the memory cache