code
stringlengths
10
174k
nl
stringlengths
3
129k
protected double variance(double[][] s,double[] sS,double[] sumOfWeights){ double var=0; for (int i=0; i < s.length; i++) { if (sumOfWeights[i] > 0) { var+=sS[i] - ((s[i][0] * s[i][0]) / (double)sumOfWeights[i]); } } return var; }
Computes variance for subsets.
public static void requireWrapper(Writer writer,Module mod) throws IOException { writer.write("var $$req$ = require; require = (typeof $$ceylon$require == 'undefined') ? $$req$ : function() { return $$ceylon$require('" + JsCompiler.scriptPath(mod) + "', $$req$, Array.prototype.slice.call(arguments)); }\n"); }
Writes the require wrapper handling for our wrapper
public void onDataChange(String key,T value){ }
Called when data is changed with the data key and the value
public void insert(Collection geoms){ for (Iterator i=geoms.iterator(); i.hasNext(); ) { Geometry geom=(Geometry)i.next(); index.insert(geom.getEnvelopeInternal(),PreparedGeometryFactory.prepare(geom)); } }
Inserts a collection of Geometrys into the index.
public void runTest() throws Throwable { Document doc; NodeList elementList; Element addrNode; Attr addrAttr; doc=(Document)load("staffNS",true); elementList=doc.getElementsByTagName("emp:address"); addrNode=(Element)elementList.item(0); assertNotNull("empAddrNotNull",addrNode); addrAttr=addrNode.getA...
Runs the test case.
public StockQuoteService(){ stockQuotes.put("IBM",new Stock("IBM","International Business Machines",149.62,150.78,149.18)); stockQuotes.put("GOOG",new Stock("GOOG","Alphabet Inc.",652.30,657.81,643.15)); stockQuotes.put("AMZN",new Stock("AMZN","Amazon.com",548.90,553.20,543.10)); }
Add initial stocks IBM, GOOG, AMZN.
public void loadByteArray(SdfBuffer buffer){ buffer.setAtIndexAndInc(bytes[0]); buffer.setAtIndexAndInc(bytes[1]); buffer.setAtIndexAndInc(bytes[2]); buffer.setAtIndexAndInc(bytes[3]); super.loadByteArray(buffer); }
Store into a buffer.
public void testClearBitPositiveInside4(){ byte aBytes[]={1,-128,56,100,-2,-76,89,45,91,3,-15,35,26}; int aSign=1; int number=50; byte rBytes[]={1,-128,56,100,-2,-76,89,45,91,3,-15,35,26}; BigInteger aNumber=new BigInteger(aSign,aBytes); BigInteger result=aNumber.clearBit(number); byte resBytes[]=new byte...
clearBit(int n) inside a positive number
public boolean handleMobileCellScroll(final Rect r){ final int offset=computeVerticalScrollOffset(); final int height=getHeight(); final int extent=computeVerticalScrollExtent(); final int range=computeVerticalScrollRange(); final int hoverViewTop=r.top; final int hoverHeight=r.height(); if (hoverViewTop ...
This method is in charge of determining if the hover cell is above or below the bounds of the gridview. If so, the gridview does an appropriate upward or downward smooth scroll so as to reveal new items.
public void paintProgressBarBorder(SynthContext context,Graphics g,int x,int y,int w,int h,int orientation){ paintBorder(context,g,x,y,w,h,orientation); }
Paints the border of a progress bar. This implementation invokes the method of the same name without the orientation.
public void test_read$CII() throws IOException { char[] c=new char[11]; cr=new CharArrayReader(hw); cr.read(c,1,10); assertTrue("Test 1: Read returned incorrect chars.",new String(c,1,10).equals(new String(hw,0,10))); try { cr.read(null,1,0); fail("Test 2: NullPointerException expected."); } catch ...
java.io.CharArrayReader#read(char[], int, int)
protected KMLAbstractFeature(String namespaceURI){ super(namespaceURI); }
Construct an instance.
public UnivalArray(RRDFile file,int size) throws IOException { sizeoflong=file.getBits(); buffer=ByteBuffer.allocate(size * 8); if (file.isBigEndian()) buffer.order(ByteOrder.BIG_ENDIAN); else buffer.order(ByteOrder.LITTLE_ENDIAN); file.align(); file.read(buffer); }
Read an UnivalArray from a rrd native file at the current position
public boolean isPrimitivesDefaultedForNullValue(){ return primitivesDefaultedForNullValue; }
Return whether we're defaulting Java primitives in the case of mapping a null value from corresponding database fields.
public void changedUpdate(DocumentEvent e,Shape a,ViewFactory f){ Element elem=getElement(); AttributeSet attributes=elem.getAttributes(); URL oldPage=src; String srcAtt=(String)attributes.getAttribute(HTML.Attribute.SRC); URL base=((HTMLDocument)elem.getDocument()).getBase(); try { if (!createdComponen...
Gives notification from the document that attributes were changed in a location that this view is responsible for. Currently this view handles changes to its SRC attribute.
public static boolean is32BitUuid(ParcelUuid parcelUuid){ UUID uuid=parcelUuid.getUuid(); if (uuid.getLeastSignificantBits() != BASE_UUID.getUuid().getLeastSignificantBits()) { return false; } if (is16BitUuid(parcelUuid)) { return false; } return ((uuid.getMostSignificantBits() & 0xFFFFFFFFL) == 0x1...
Check whether the given parcelUuid can be converted to 32 bit bluetooth uuid.
@Deprecated protected void loadData3(final LoadStats totals,final Object source,final String baseURL,final RDFFormat rdfFormat,final String defaultGraph,final boolean endOfBatch) throws IOException { final MyLoadStats tmp=newLoadStats(); loadData4_ParserErrors_Trapped(tmp,source,null,baseURL,rdfFormat,defaultGraph,...
Loads data from the <i>source</i>. The caller is responsible for closing the <i>source</i> if there is an error.
public Executor removeProperty(String key){ properties.remove(key); return this; }
Unsets a property.
public <T>Book write(String key,T value){ if (value == null) { throw new PaperDbException("Paper doesn't support writing null root values"); } else { mStorage.insert(key,value); } return this; }
Saves any types of POJOs or collections in Book storage.
public DelegateTree(Supplier<DirectedGraph<V,E>> graphFactory){ super(graphFactory.get()); this.vertex_depths=new HashMap<V,Integer>(); }
create an instance with passed values.
@SuppressWarnings("unused") private static String workflowToString(int workflow){ String result; if ((workflow & extraSources) >= 1) { result="extraSources"; } else if ((workflow & adjustQNames) >= 1) { result="adjustQNames"; } else if ((workflow & resolveImportStatements) >= 1) { result="reso...
Useful when debugging batch issues.
public void removeDataSource(){ Integer lastSeriesIndex=dataset.getSeriesCount() - 1; if (lastSeriesIndex >= 0) { this.fireDataSourceRemoved(lastSeriesIndex); dataset.removeSeries(lastSeriesIndex); } }
Removes a data source from the chart.
public void reportNewTestUnuseful(){ nrOfSolutionWithNoImprovement++; }
Call this method to report a new test found by DSE did not lead to a fitness improvement.
@NotNull @Override public Iterator<E> iterator(){ Object[] elements=array; if (elements.length == 0) return EmptyIterator.getInstance(); return new COWIterator(elements,0); }
Returns an iterator over the elements in this list in proper sequence. <p/> <p>The returned iterator provides a snapshot of the state of the list when the iterator was constructed. No synchronization is needed while traversing the iterator. The iterator does <em>NOT</em> support the <tt>remove</tt> method.
public void mouseExited(MouseEvent e){ if (!isDragging) { setThumbRollover(false); } }
Invoked when the mouse exits the scrollbar.
protected boolean afterSave(boolean newRecord,boolean success){ if (newRecord && getPrintName() != null && getPrintName().length() > 0) { String sql="UPDATE AD_PrintFormatItem_Trl trl " + "SET PrintName = (SELECT e.PrintName " + "FROM AD_Element_Trl e, AD_Column c "+ "WHERE e.AD_Language=trl.AD_Language"+ " AND e...
After Save
@SuppressWarnings("unchecked") @Override public void eSet(int featureID,Object newValue){ switch (featureID) { case FunctionblockPackage.FAULT__PROPERTIES: getProperties().clear(); getProperties().addAll((Collection<? extends Property>)newValue); return; } super.eSet(featureID,newValue); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void onNavigationEvent(int navigationEvent,Bundle extras){ }
To be called when a navigation event happens.
public String rangesTipText(){ return "The attribute ranges to be used; 'inv(...)' denotes an inverted range."; }
Returns the tip text for this property.
public static void rotationX(View v,float fromX,float toX,int duration){ rotationX(v,fromX,toX,duration,null); }
rotation x
public static void writeVehicles(Vehicles vehicles,String filePath){ log.info("Writing vehicles to file " + filePath); new VehicleWriterV1(vehicles).writeFile(filePath); }
Writes the vehicles to the output file.
public int hashCode(){ return m_key; }
Return Hashcode of key
protected TimeStampType(SqlType sqlType,Class<?>[] classes){ super(sqlType,classes); }
Here for others to subclass.
public int writeSize(){ return (triesSize() * TRY_ITEM_WRITE_SIZE) + +encodedHandlers.length; }
Gets the write size of this instance, in bytes.
private void endCurrentTrack(){ if (!isRecording()) { Log.d(TAG,"Ignore endCurrentTrack. Not recording."); return; } long trackId=recordingTrackId; boolean paused=recordingTrackPaused; updateRecordingState(PreferencesUtils.RECORDING_TRACK_ID_DEFAULT,true); Track track=myTracksProviderUtils.getTrack(...
Ends the current track.
public static boolean isVisible(Projection sourceMapProjection,Point2D llp){ boolean ret=false; if (sourceMapProjection != null) { if (sourceMapProjection.isPlotable(llp)) { Point2D p=sourceMapProjection.forward(llp); double x=p.getX(); double y=p.getY(); if (x >= 0 && x <= sourceMapProj...
Returns true if the Point is visible on the provided projection.
public void endDTD() throws org.xml.sax.SAXException { }
Report the end of DTD declarations.
private Observable<BluetoothGatt> disconnect(BluetoothGatt bluetoothGatt){ return rxBleGattCallback.getOnConnectionStateChange().doOnSubscribe(null).timeout(TIMEOUT_DISCONNECT,TimeUnit.SECONDS,just(RxBleConnection.RxBleConnectionState.DISCONNECTED)).filter(null).take(1).map(null); }
TODO: [DS] 09.02.2016 This operation makes the radio to block until disconnection - maybe it would be better if it would not? What would happen then if a consecutive call to BluetoothDevice.connectGatt() would be made? What BluetoothGatt would be returned? 1. A completely fresh BluetoothGatt - would work with the curre...
public void testStartStop() throws Exception { for (int i=0; i < 3; i++) { System.out.println(String.format("Creating service, host=%s, port=%d, serviceName=%s",host,port,serviceName)); JmxManager jmx=new JmxManager(host,port,serviceName); System.out.println(String.format("Starting service, host=%s, port=...
Demonstrate how to start and stop a JMX manager. We do it several times to provide that JMX clean-up works.
protected Long[] boundingBoxOfZones(String path2ZonesFile){ Set<SimpleFeature> features=new HashSet<SimpleFeature>(); features.addAll(ShapeFileReader.getAllFeatures(path2ZonesFile)); Long[] boundings=new Long[4]; boolean first=true; for ( SimpleFeature feature : features) { Geometry geometry=(Geometry)fe...
Unites the provided zones and finds the bounding box of the zones.
@Override public Collection<String> values(){ final THashSet<String> values=new THashSet<>(); for (int i=1; i < contents.length; i+=2) { values.add(contents[i]); } return values; }
Method values()
@Override public void resize(int width,int height){ super.resize(width,height); camera.resize(width,height); needsRender.set(true); }
The view was resized
public UnsupportedQueryLanguageException(Throwable cause){ super(cause); }
Creates a new UnsupportedRDFormatException.
public static int quantile(ArrayModifiableDBIDs data,Comparator<? super DBIDRef> comparator,int begin,int end,double quant){ final int length=end - begin; assert (length > 0) : "Quantile on empty set?"; final double dleft=begin + (length - 1) * quant; final int ileft=(int)Math.floor(dleft); quickSelect(data,c...
Compute the median of an array efficiently using the QuickSelect method. It will prefer the lower element. Note: the array is <b>modified</b> by this.
public static boolean hasHoneycomb(){ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB; }
Uses static final constants to detect if the device's platform version is Honeycomb or later.
public JustificationIterator(final IIndexManager indexManager,final IIndex ndx,int capacity){ if (indexManager == null) throw new IllegalArgumentException(); if (ndx == null) throw new IllegalArgumentException(); if (capacity < 0) throw new IllegalArgumentException(); boolean async=true; final long rang...
Create an iterator reading from the justifications index.
public <T>com.twitter.util.Future<T> apply(Function0<T> function){ return chooseFuturePool().apply(function); }
Execute the <code>function</code> by the scheduler. It would be submitted to any executor randomly.
static void initNetwork(MatsimConfigType matsim4urbansimConfigPart1,Config config){ log.info("Setting NetworkConfigGroup to config..."); config.network().setInputFile(matsim4urbansimConfigPart1.getNetwork().getInputFile()); log.info("...done!"); }
setting MATSim network NOTE: If the MATSim4UrbanSim network section contains a road network this overwrites a previous network, e.g. from an external MATSim configuration <p></p> (The above statement is correct. But irrelevant, since at the end everything is overwritten again from an external MATSim configuration. k...
public static int nextRandomInt(int min,int max){ return (int)(nextRandomFloat() * (max - min + 1)) + min; }
Returns a random float between min and max.
public String toString(){ return name; }
Gets field's attributes to string.
private void addHandler(GenericExceptionHandler handler){ if (!genericHandlers.contains(handler)) genericHandlers.add(handler); }
Adds new GUI-level handler if it is not yet registered.
public static boolean writeFile(File file,InputStream is,boolean append){ OutputStream o=null; try { makeDirs(file.getAbsolutePath()); o=new FileOutputStream(file,append); byte data[]=new byte[1024]; int length=-1; while ((length=is.read(data)) != -1) { o.write(data,0,length); } o....
Write file
public void write(String filename){ logger.info("write carrier plans"); try { openFile(filename); writeXmlHead(); startCarriers(this.writer); for ( Carrier carrier : carriers) { startCarrier(carrier,this.writer); writeVehiclesAndTheirTypes(carrier,this.writer); writeShipments(ca...
Writes carriers and their plans into a xml-file.
public NTRUEncryptionKeyGenerationParameters(int N,int q,int df,int dm0,int db,int c,int minCallsR,int minCallsMask,boolean hashSeed,byte[] oid,boolean sparse,boolean fastFp,Digest hashAlg){ super(new SecureRandom(),db); this.N=N; this.q=q; this.df=df; this.db=db; this.dm0=dm0; this.c=c; this.minCallsR=...
Constructs a parameter set that uses ternary private keys (i.e. <code>polyType=SIMPLE</code>).
protected void revalidate(){ }
Updates the values in this object according to the associated attribute value. This should be overridden in descendant classes that associate the angle object with an attribute.
public Script toScript(){ Script s=new Script(); s.setComments(comments); s.setCreated(created); s.setCreator(creator); s.setId(id != null ? id : 0); s.setModified(modified); s.setName(name); s.setProductName(productName); s.setRuntime(runtime); s.setScriptSteps(steps); return s; }
create a Script Entity object form this Descriptor
public byte build(){ byte flags=0; flags=PreambleFlags.setAllFlags(flags,isSparseMode,isUnionMode,isEmpty,isEightBytePadding,isBigEndian,isReadOnly,isSharedPreambleMode); return flags; }
Build a Preamble Flags byte
private void updateNextButton(){ m_nextButton.setEnabled((m_currentTutorial != null) && (m_currentTutorial.getStepCounter() != m_currentTutorial.getStepCount()) && m_currentTutorial.getCurrentStep().canNext()); }
Updates the Next button depending on the state of the current tutorial.
public Shape rhumbLineShape(){ GeneralPath path=null; if (llpts != null && llpts.length >= 4 && llpts.length % 2 == 0) { LatLonPoint ll1=new LatLonPoint.Double(llpts[0],llpts[1],true); path=new GeneralPath(GeneralPath.WIND_EVEN_ODD,llpts.length / 2); boolean firstCoords=true; for (int i=2; i < llpts...
Create a java.awt.Shape object of coordinates connected by rhumb lines.
public ResponseAddressAttribute(){ super(RESPONSE_ADDRESS); }
Creates a RESPONSE_ADDRESS attribute
public static int roundUpToPowerOfTwo(int i){ i--; i|=i >>> 1; i|=i >>> 2; i|=i >>> 4; i|=i >>> 8; i|=i >>> 16; return i + 1; }
Returns the smallest power of two >= its argument, with several caveats: If the argument is negative but not Integer.MIN_VALUE, the method returns zero. If the argument is > 2^30 or equal to Integer.MIN_VALUE, the method returns Integer.MIN_VALUE. If the argument is zero, the method returns zero.
public long runChain(long length,boolean disableCoerce){ likelihood.makeDirty(); currentScore=evaluate(likelihood,prior); long currentState=currentLength; final Model currentModel=likelihood.getModel(); if (currentState == 0) { initialScore=currentScore; bestScore=currentScore; fireBestModel(curre...
Run the chain for a given number of states.
public static String buildFullRequestUrl(String scheme,String serverName,int serverPort,String requestURI,String queryString){ scheme=scheme.toLowerCase(); StringBuilder url=new StringBuilder(); url.append(scheme).append("://").append(serverName); if ("http".equals(scheme)) { if (serverPort != 80) { u...
Obtains the full URL the client used to make the request. <p> Note that the server port will not be shown if it is the default server port for HTTP or HTTPS (80 and 443 respectively).
@Override public void flush() throws IOException { if (debug > 1) { System.out.println("flush() @ CompressionResponseStream"); } if (closed) { throw new IOException("Cannot flush a closed output stream"); } if (gzipstream != null) { gzipstream.flush(); } }
Flush any buffered data for this output stream, which also causes the response to be committed.
public BubbleXYItemLabelGenerator(){ this(DEFAULT_FORMAT_STRING,NumberFormat.getNumberInstance(),NumberFormat.getNumberInstance(),NumberFormat.getNumberInstance()); }
Creates a new tool tip generator using default number formatters for the x, y and z-values.
public static GankFragment newInstance(int year,int month,int day){ GankFragment fragment=new GankFragment(); Bundle args=new Bundle(); args.putInt(ARG_YEAR,year); args.putInt(ARG_MONTH,month); args.putInt(ARG_DAY,day); fragment.setArguments(args); return fragment; }
Returns a new instance of this fragment for the given section number.
public boolean forEachEntry(TIntIntProcedure procedure){ byte[] states=_states; int[] keys=_set; int[] values=_values; for (int i=keys.length; i-- > 0; ) { if (states[i] == FULL && !procedure.execute(keys[i],values[i])) { return false; } } return true; }
Executes <tt>procedure</tt> for each key/value entry in the map.
@SuppressWarnings({"rawtypes","unchecked"}) @Test public void testNodeProcessing(){ LineToTokenArrayList oper=new LineToTokenArrayList(); ArrayListTestSink tokenSink=new ArrayListTestSink(); ArrayListTestSink stokenSink=new ArrayListTestSink(); oper.setSplitBy(";"); oper.setSplitTokenBy(","); oper.tokens.se...
Test oper logic emits correct results
public boolean isMarkMaxMessageSizeExceededSeen(){ return fieldMarkMaxMessageSizeExceededSeen; }
Returns the markMaxMessageSizeSeen.
@Override protected EClass eStaticClass(){ return TypesPackage.Literals.PRIMITIVE_TYPE; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void closeEntry() throws IOException { checkClosed(); if (currentEntry == null) { return; } if (currentEntry instanceof java.util.jar.JarEntry) { Attributes temp=((JarEntry)currentEntry).getAttributes(); if (temp != null && temp.containsKey("hidden")) { return; } } Exception fai...
Closes the current zip entry and prepares to read the next entry.
public void showHideStatusBar(){ Container contentPane=frame.getContentPane(); boolean statusBarShown=false; for (int i=0; i < contentPane.getComponentCount(); i++) { if (contentPane.getComponent(i).equals(jlStatusBar)) { statusBarShown=true; break; } } if (statusBarShown) { frame.getC...
If the status bar is currently displayed hide it and vice versa.
public static AssociationSessionType create(String sessType,String assocType,boolean compatibility) throws AssociationException { AssociationSessionType result; if (!compatibility && "no-encryption".equals(sessType) && Association.TYPE_HMAC_SHA1.equals(assocType)) result=NO_ENCRYPTION_SHA1MAC; else if (!compat...
Creates a AssociationSessionType with the specified session and association types. <p> Compatibility flag defines backwards-compatibile value sets allowed in OpenID 1.x, but not in OpenID 2
public NodeMetadataLeftIndexedReaderAccessibleInfo(LongToInternalIntBiMap leftNodesToIndexBiMap,LongToInternalIntBiMap rightNodesToIndexBiMap,EdgePool leftNodeEdgePool,List<IntToIntArrayMap> rightNodesToMetadataMap){ super(leftNodesToIndexBiMap,rightNodesToIndexBiMap,leftNodeEdgePool); this.rightNodesToMetadataMap=...
A new instance is immediately visible to the readers due to publication safety.
private void readObject(){ }
<!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
public static double min(double a,double b){ return (a <= b) ? a : b; }
Returns the smaller of two <code>double</code> values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. Does none of the special checks for NaN or -0.0f that <code>Math.max</code> does.
default B append8bit(@NotNull CharSequence cs,int start,int end) throws IllegalArgumentException, BufferOverflowException, BufferUnderflowException, IndexOutOfBoundsException { if (cs instanceof BytesStore) { return write((BytesStore)cs,(long)start,end); } for (int i=start; i < end; i++) { char c=cs.charA...
Append a portion of a String to the Bytes in ISO-8859-1
public void stopMonitoringQueryThread(Thread queryThread,Query query){ QueryExecutionTimeoutException testException=null; DefaultQuery q=(DefaultQuery)query; boolean[] queryCompleted=q.getQueryCompletedForMonitoring(); synchronized (queryCompleted) { queryExecutionStatus.get().getAndSet(Boolean.FALSE); if...
Stops monitoring the query. Removes the passed thread from QueryMonitor queue.
public static File[] filesOverModDate(File[] files,Interval retention){ ArrayList<File> overFiles=new ArrayList<File>(); long now=System.currentTimeMillis(); for ( File file : files) { long modDate=file.lastModified(); if (modDate > 0 && retention.overInterval(modDate,now)) overFiles.add(file); } ...
Returns members of a file array whose last modification dates are older than a specific retention period.
public static LatLon limitEyePositionLocation(Angle latitude,Angle longitude,ViewPropertyLimits viewLimits){ if (latitude == null || longitude == null) { String message=Logging.getMessage("nullValue.LatitudeOrLongitudeIsNull"); Logging.logger().severe(message); throw new IllegalArgumentException(message);...
Clamp eye location angles to the range specified in a limit object.
public Object jjtAccept(ParserVisitor visitor,Object data){ return visitor.visit(this,data); }
Accept the visitor.
public String fixLastIdentityValues(Table table){ return null; }
Generates the SQL to execute that sets the current sequence number.
protected static File extractFileArg(final String argumentName,final File alternative,final List<String> args){ final String filePath=extractArg(argumentName,null,args); if (filePath == null) { return alternative; } else { return new File(filePath); } }
Remove the argument given by argumentName and the subsequent value from the list args if present. Return the subsequent value wrapped as a File.
private CaseMapper(){ }
Our current GC makes short-lived objects more expensive than we'd like. When that's fixed, this class should be changed so that you instantiate it with the String and its value, offset, and count fields.
private boolean isWhitespace(int position){ if (_len >= 0 && position >= _len) { return false; } return Character.isWhitespace(_working[position]); }
Checks if character at specified position is whitespace.
void imtqlb(int n,double d[],double e[],double bnd[],int offset){ double[] dn=new double[n]; System.arraycopy(d,offset,dn,0,n); double[] en=new double[n]; System.arraycopy(e,offset,en,0,n); double[] bndn=new double[n]; System.arraycopy(bnd,offset,bndn,0,n); imtqlb(n,dn,en,bndn); System.arraycopy(dn,0,d,...
Description ----------- imtqlb() is a translation of a Fortran version of the Algol procedure IMTQL1, Num. Math. 12, 377-383(1968) by Martin and Wilkinson, as modified in Num. Math. 15, 450(1970) by Dubrulle. Handbook for Auto. Comp., vol.II-Linear Algebra, 241-248(1971). See also B. T. Smith et al, Eispack Guide,...
@Deprecated public MultiConfirmDialog(String i18nKey,int mode,Object... i18nArgs){ this(ApplicationFrame.getApplicationFrame(),i18nKey,mode,i18nArgs); }
Creates a confirm dialog where the user can select that his selection should apply to all cases.
public Writer writeTo(Writer writer){ Binding binding; if (map == null) binding=new Binding(); else binding=new Binding(map); Script scriptObject=InvokerHelper.createScript(script.getClass(),binding); PrintWriter pw=new PrintWriter(writer); scriptObject.setProperty("out",pw); scriptObject.run(); pw.f...
Write the template document with the set binding applied to the writer.
private Spannable highlightUrls(Spannable text){ if (text == null) { return null; } final Matcher matcher=PATTERN_URLS.matcher(text); while (matcher.find()) { final int start=matcher.start(1); final int end=matcher.end(1); text.setSpan(new ForegroundColorSpan(mUrlHighlightColor),start,end,Spanne...
Highlights all the URLs in the passed text.
public void addHistoryCall(HistoryCall historyCall,CallContact linkedTo){ calls.put(historyCall.call_start,historyCall); if (historyCall.isIncoming()) { ++incoming_sum; } else { ++outgoing_sum; } if (historyCall.isMissed()) missed_sum++; if (contact.isUnknown() && !linkedTo.isUnknown()) setCont...
Each call is associated with a contact. When adding a call to an HIstoryEntry, this methods also verifies if we can update the contact (if contact is Unknown, replace it)
@Override public void generateAtom(XmlWriter w,ExtensionProfile extProfile) throws IOException { if (content != null) { content.generateAtom(w,"content"); } }
Generates XML in the Atom format.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:31.781 -0500",hash_original_method="1D88AF12F47BE66D32BA577915055CD5",hash_generated_method="9890FA3634057FE61E5F0620C66A19E9") public void reset(){ super.reset(); H1=0x67452301; H2=0xefcdab89; H3=0x98badcfe; H4=0x10325476...
reset the chaining variables to the IV values.
public void testGetAbsolutePathFromExplicit(){ String path=this.fileHandler.getAbsolutePath(System.getProperty("user.home")); assertEquals(path,System.getProperty("user.home")); }
Test explicit to absolute path.
public static void f(String msg,Object... args){ if (!allowWtf) return; StackTraceElement caller=getCallerStackTraceElement(); String tag=generateTag(caller); if (sLevel > LEVEL_FATAL) { return; } if (args.length > 0) { msg=String.format(msg,args); } Log.wtf(tag,msg); }
Send a FATAL ERROR log message
public OMText(double lt,double ln,String stuff,Font font,int just){ super(RENDERTYPE_LATLON,LINETYPE_UNKNOWN,DECLUTTERTYPE_NONE); lat=lt; lon=ln; setData(stuff); f=font; justify=just; }
Creates a text object, with Lat/Lon placement.
public boolean hasGenre(){ return hasExtension(Genre.class); }
Returns whether it has the genre.
public Factory(){ super(); }
Needed by CGLib
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 SynchronizedWeakCacheStringConverter(final int lengthLimit){ this(Collections.synchronizedMap(new WeakCache<String,String>()),lengthLimit); }
Constructs a SynchronizedWeakCacheStringConverter.
@Override public String toString(){ return "Kernel estimator with bandwidth " + m_Width + " and total weight "+ m_SumOfWeights+ " based on\n"+ m_TM.toString(); }
Returns textual description of this estimator.