code
stringlengths
10
174k
nl
stringlengths
3
129k
private void checkShellNotNested(LinearRing shell,Polygon p,GeometryGraph graph){ Coordinate[] shellPts=shell.getCoordinates(); LinearRing polyShell=(LinearRing)p.getExteriorRing(); Coordinate[] polyPts=polyShell.getCoordinates(); Coordinate shellPt=findPtNotNode(shellPts,polyShell,graph); if (shellPt == null...
Check if a shell is incorrectly nested within a polygon. This is the case if the shell is inside the polygon shell, but not inside a polygon hole. (If the shell is inside a polygon hole, the nesting is valid.) <p> The algorithm used relies on the fact that the rings must be properly contained. E.g. they cannot partial...
@Override public void exec(String sql,Result<Object> result,Object... args){ _kraken.query(sql).exec(result,args); }
Executes a command against the database.
public String sqlMetadata_primaryKeyNames(String vendorName,String catalogName,String schemaName){ return m_interfaces.get(getDBVendorID(vendorName)).sqlMetadata_primaryKeyNames(catalogName,schemaName); }
gets the database specific SQL command to find primary key names
public List<String> selectJobGroups(Connection conn) throws SQLException { PreparedStatement ps=null; ResultSet rs=null; try { ps=conn.prepareStatement(rtp(SELECT_JOB_GROUPS)); rs=ps.executeQuery(); LinkedList<String> list=new LinkedList<String>(); while (rs.next()) { list.add(rs.getString(1...
<p> Select all of the job group names that are stored. </p>
final public boolean isStoreBlankNodes(){ return storeBlankNodes; }
<code>true</code> iff blank nodes are being stored in the lexicon's forward index.
public static int tokenizeProlog(char[] buf,int off,int end,Token token) throws PartialTokenException, InvalidTokenException, EmptyTokenException, ExtensibleTokenException, EndOfPrologException { int tok; if (off == end) throw new EmptyTokenException(); switch (charType(buf[off])) { case CT_QUOT: return scanL...
Scans the first token of a char subarray that contains part of a prolog. Returns one of the following integers according to the type of token that the subarray starts with: <ul> <li><code>TOK_PI</code> <li><code>TOK_XML_DECL</code> <li><code>TOK_COMMENT</code> <li><code>TOK_PARAM_ENTITY_REF</code> <li><code>TOK_PROLOG_...
public final void writeBoolean(boolean v) throws IOException { out.write(v ? 1 : 0); incCount(1); }
Writes a <code>boolean</code> to the underlying output stream as a 1-byte value. The value <code>true</code> is written out as the value <code>(byte)1</code>; the value <code>false</code> is written out as the value <code>(byte)0</code>. If no exception is thrown, the counter <code>written</code> is incremented by <cod...
static boolean isType(Symbol sym){ return sym != null && sym.kind == TYP; }
Is this symbol a type?
public char reverseMap(short glyphID){ Short result=glyphLookup.get(new Short(glyphID)); if (result == null) { return '\000'; } return (char)result.shortValue(); }
Get the src code which maps to the given glyphID
@SuppressWarnings("unchecked") @Override public Generator<SelectableMultiPoint> construct(String[] args){ try { Class<?> c=pointGen.getClass(); java.lang.reflect.Method cons=c.getDeclaredMethod("construct",new Class[]{args.getClass()}); Generator<IMultiPoint> newOne=(Generator<IMultiPoint>)cons.invoke(poi...
Provide reflective behavior to construct instance of generator given an array of string arguments.
public void list(PrintStream out){ properties.list(out); }
Prints the contents of this preference store to the given print stream.
public ExchangeRate(Fiat fiat){ this(Coin.COIN,fiat); }
Construct exchange rate. One coin is worth this amount of fiat.
private void calculateGridSizes(float numbersRadius,float xCenter,float yCenter,float textSize,float[] textGridHeights,float[] textGridWidths){ float offset1=numbersRadius; float offset2=numbersRadius * ((float)Math.sqrt(3)) / 2f; float offset3=numbersRadius / 2f; mPaint.setTextSize(textSize); mSelectedPaint....
Using the trigonometric Unit Circle, calculate the positions that the text will need to be drawn at based on the specified circle radius. Place the values in the textGridHeights and textGridWidths parameters.
static int copyBytes(RandomAccessFile os,InputStream is,int byteLimit,byte[] buffer) throws IOException { int bytesCopied=0; int nrRead; while (bytesCopied < byteLimit && (nrRead=is.read(buffer,0,Math.min(buffer.length,byteLimit - bytesCopied))) != -1) { os.write(buffer,0,nrRead); bytesCopied+=nrRead; }...
Copy up to byteLimit bytes from the input stream to the output stream.
public ISicresAdminIntercambioRegistralException(String message){ this(message,null); }
Construye un objeto de la clase.
public ReadOnlyActionPipe<A> asReadOnly(){ return new ReadOnlyActionPipe<A>(this); }
Returns a presentation of the ActionPipe with read only mod
protected IsolatedJavaFileManager(JavaFileManager fileman,CompiledCode unit,IsolatedClassLoader loader){ super(fileman); this.unit=unit; this.loader=loader; this.loader.setCode(unit); }
Constructs this file-manager from the manager it will forward files from.
@Override public void stop(){ if (!HAConfiguration.isHAEnabled(configuration)) { LOG.info("HA is not enabled, no need to stop leader election service"); return; } try { leaderLatch.close(); curatorFactory.close(); } catch ( IOException e) { LOG.error("Error closing leader latch",e); } }
Leave leader election process and clean up resources on shutting down. If Atlas High Availability configuration is disabled, this operation is a no-op.
public ARQ2SPIN(Model model){ this(model,true); }
Constructs a new ARQ2SPIN engine for a given Model, equivalent with <code>ARQ2SPIN(model, true)</code>.
public static synchronized int recompileWithOpt(CompilationPlan plan){ if (VM.BuildForOptCompiler) { if (compilationInProgress) { return -1; } else { try { compilationInProgress=true; CompiledMethod cm=optCompile(plan.method,plan); try { plan.method.replaceCompil...
This method tries to compile the passed method with the Compiler. It will install the new compiled method in the VM, if successful. <p> NOTE: the recompile method should never be invoked via RuntimeCompiler.compile; it does not have sufficient guards against recursive recompilation.
public String next(Pattern pattern){ checkOpen(); checkNotNull(pattern); matchSuccessful=false; saveCurrentStatus(); if (!setTokenRegion()) { recoverPreviousStatus(); throw new NoSuchElementException(); } matcher.usePattern(pattern); if (!matcher.matches()) { recoverPreviousStatus(); thr...
Returns the next token if it matches the specified pattern. The token will be both prefixed and suffixed by the delimiter that is currently being used (or a string that matches the delimiter pattern). This method will block if input is being read.
public Message send(Message query) throws IOException { try (Socket socket=factory.createSocket(InetAddress.getByName(updateHost),DNS_PORT)){ socket.setSoTimeout(updateTimeout); writeMessage(socket.getOutputStream(),query); Message response=readMessage(socket.getInputStream()); checkValidResponse(quer...
Sends a DNS "query" message (most likely an UPDATE) and returns the response. The response is checked for matching ID and opcode.
public List<T> findByProject(URI projectId,ResourceFilter<T> filter){ return search().byProject(projectId).filter(filter).run(); }
Finds the list of resources in the given project by ID, optionally filtering the results.
public final void updateClusters(List<ClusterData> clusterData,int[] matIndexToMsgInternalId){ final Map<String,Collection<Integer>> names=new HashMap<String,Collection<Integer>>(); int count=0; String cName=null; m_finalClusterNames=new HashMap<Integer,String>(); for (int i=0; i < clusterData.size(); ++i) { ...
Update the clusters using the passed in cluster data.
@Override public boolean equals(Object other){ if (!(other instanceof NettyFullHttpRequest)) { return false; } return super.equals(other); }
We override to avoid a Findbugs warning. We ignore the operation field on purpose.
public List<VariableDeclarationFragment> fragments(){ return this.variableDeclarationFragments; }
Returns the live list of variable declaration fragments in this statement. Adding and removing nodes from this list affects this node dynamically. All nodes in this list must be <code>VariableDeclarationFragment</code>s; attempts to add any other type of node will trigger an exception.
public static void logInvalidTaskType(final Logger logger,final TaskTypes type){ logger.logMessage(Level.INFO,"Invalid TaskType: " + type); }
Logs the occurance of an invalid task type.
@Override public String toString(){ return "Q" + this.quarter + "/"+ this.year; }
Returns a string representing the quarter (e.g. "Q1/2002").
ProtocolVersion selectProtocolVersion(ProtocolVersion protocolVersion){ ProtocolVersion selectedVersion=null; for ( ProtocolVersion pv : protocols) { if (pv.v > protocolVersion.v) { break; } selectedVersion=pv; } return selectedVersion; }
Select a protocol version from the list. Return the lower of the protocol version of that suggested by the <code>protocolVersion</code> and the highest version of this protocol list, or null if no protocol version is available. The method is used by TLS server to negotiated the protocol version between client suggested...
public boolean isDistinct(){ return distinct; }
This method was generated by MyBatis Generator. This method corresponds to the database table attachment
private static void registerComponents(){ registerComponent(BarChartComponent.class,BarChartGui.class); registerComponent(DocViewerComponent.class,DocViewerDesktopComponent.class); registerComponent(ConsoleComponent.class,ConsoleDesktopComponent.class); registerComponent(DisplayComponent.class,DisplayComponentD...
Create mappings from guiComponents to their GUI wrappers.
private static String readLine(String filename) throws IOException { BufferedReader reader=new BufferedReader(new FileReader(filename),256); try { return reader.readLine(); } finally { reader.close(); } }
Reads a line from the specified file.
public void addColumnListener(ColumnListener listener){ return; }
Does nothing.
public static void main(String[] args){ int size; HashSet collection=new HashSet(); String str1="Yellow", str2="White", str3="Green", str4="Blue"; if (true) { System.out.println("True"); } Iterator iterator; if (true) System.out.println("True"); collection.add(str1); collection.add(str2); coll...
Normal JavaDoc, can be formatted.
public static int[] availableSpace(Aero a){ int availSpace[]={SLOTS_PER_ARC,SLOTS_PER_ARC,SLOTS_PER_ARC,SLOTS_PER_ARC}; AeroArmor armor=AeroArmor.getArmor(a.getArmorType(Aero.LOC_NOSE),a.isClanArmor(Aero.LOC_NOSE)); if (armor == null) { return null; } int spaceUsedByArmor=armor.space; int loc=(spaceUsed...
Computes the available space for each location in the supplied Aero. Aeros can only have so many weapons in each location, and this available space is reduced by the armor type.
private boolean classDeclaresIdentifier(Context cx,ClassDefinitionNode classDef,TypeAnalyzer typeAnalyzer,String identifier){ String className=NodeMagic.getClassName(classDef); typeAnalyzer.evaluate(cx,classDef); ClassInfo classInfo=typeAnalyzer.getClassInfo(className); if (classInfo != null && (classInfo.defin...
Returns true if the class definition has previously declared a symbol (function or variable) with the identifier provided.
public Grid(FIRFilterSpecification specification){ create(specification); }
Creates a dense frequency grid from the filter specification for those frequency bands where the weighted value is non-zero. This grid is appropriate for use in the Remez exchange algorithm.
protected ActionMap createRTextAreaActionMap(){ ActionMap map=new ActionMapUIResource(); Action[] actions=textArea.getActions(); int n=actions.length; for (int i=0; i < n; i++) { Action a=actions[i]; map.put(a.getValue(Action.NAME),a); } map.put(TransferHandler.getCutAction().getValue(Action.NAME),T...
Creates a default action map. This action map contains actions for all basic text area work - cut, copy, paste, select, caret motion, etc. <p> This isn't named <code>createActionMap()</code> because there is a package-private member by that name in <code>BasicTextAreaUI</code>, and some compilers will give warnings tha...
public boolean verifySignature(byte[] signature){ byte[] block=null; if (preSig == null) { try { block=cipher.processBlock(signature,0,signature.length); } catch ( Exception e) { return false; } } else { if (!Arrays.areEqual(preSig,signature)) { throw new IllegalStateExcepti...
return true if the signature represents a ISO9796-2 signature for the passed in message.
private void createDimensionTitleLegendItem(PlotInstance plotInstance,Set<PlotDimension> dimensionSet,LegendItemCollection legendItemCollection){ PlotConfiguration plotConfig=plotInstance.getCurrentPlotConfigurationClone(); StringBuilder titleBuilder=new StringBuilder(); boolean first=true; boolean showDimensio...
Creates the headings for the dimension config items ( like "Color (attribute X)" ) and adds it to legendItemCollection.
public BitMatrix(int columns,int rows){ elements(QuickBitVector.makeBitVector(columns * rows,1),columns,rows); }
Constructs a bit matrix with a given number of columns and rows. All bits are initially <tt>false</tt>.
public void summarizeRoutesAndPatterns(){ System.out.println("Total stops " + stopForIndex.size()); System.out.println("Total patterns " + tripPatterns.size()); System.out.println("routeId,patterns,trips,stops"); Multimap<String,TripPattern> patternsForRoute=HashMultimap.create(); for ( TripPattern pattern :...
Log some summary information about the contents of the layer that might help with spotting errors or bad data.
public boolean isNumberInvited(ContactId contact){ return RcsStatus.PENDING.equals(getContactSharingStatus(contact)); }
Has the number been invited to RCS
private void writeQNameAttribute(java.lang.String namespace,java.lang.String attName,javax.xml.namespace.QName qname,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String attributeNamespace=qname.getNamespaceURI(); java.lang.String attributePrefix=xmlWriter.getPre...
Util method to write an attribute without the ns prefix
private SerializerWriteBuilder(){ }
Creates a new instance of SerializerWriteBuilder
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case UmplePackage.ABSTRACT_METHOD_DECLARATION___TYPE_1: return getType_1(); case UmplePackage.ABSTRACT_METHOD_DECLARATION___METHOD_DECLARATOR_1: return getMethodDeclarator_1(); } return super.eGet(featureID,resolve,...
<!-- begin-user-doc --> <!-- end-user-doc -->
public pre(Element element){ addElement(element); }
Use the set* methods to set the values of the attributes.
public boolean canWrite(){ return true; }
The standard-output stream returns true since it's writable.
public static IXMLParser createDefaultXMLParser(IXMLBuilder builder) throws ClassNotFoundException, InstantiationException, IllegalAccessException { String className=XMLParserFactory.DEFAULT_CLASS; try { className=System.getProperty(XMLParserFactory.CLASS_KEY,XMLParserFactory.DEFAULT_CLASS); } catch ( Acces...
Creates a default parser.
private void checkAndEnableViewButton(){ boolean enabled=true; enabled&=Desktop.isDesktopSupported(); enabled&=txt_PubCert.getDocument().getLength() > MIN_CERT_LENGTH; bt_view.setEnabled(enabled); }
Viewing is only allowed, if (a) when java.Desktop#open() works (b) there's a certificate (text) in the text area
static void luBacksubstitution(double[] matrix1,int[] row_perm,double[] matrix2){ int i, ii, ip, j, k; int rp; int cv, rv; rp=0; for (k=0; k < 4; k++) { cv=k; ii=-1; for (i=0; i < 4; i++) { double sum; ip=row_perm[rp + i]; sum=matrix2[cv + 4 * ip]; matrix2[cv + 4 * ip]=matr...
Solves a set of linear equations. The input parameters "matrix1", and "row_perm" come from luDecompostionD4x4 and do not change here. The parameter "matrix2" is a set of column vectors assembled into a 4x4 matrix of floating-point values. The procedure takes each column of "matrix2" in turn and treats it as the right-h...
public JCalendarDialog(java.awt.Dialog parent,boolean modal){ super(parent,modal); if (m_resources != null) { } else { m_resources=new LocaleResources(); m_resources.addBundleName("beans_messages"); } }
Creates new form JCalendarDialog
public static void multRow(Matrix A,int i,int start,int to,double c){ for (int j=start; j < to; j++) A.set(i,j,A.get(i,j) * c); }
Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:] * c
public DiceServerEditor(final IRemoteDiceServer diceServer){ m_bean=diceServer; final int bottomSpace=1; final int labelSpace=2; int row=0; if (m_bean.sendsEmail()) { add(m_toLabel,new GridBagConstraints(0,row,1,1,0,0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(0,0,bottomSpace,labelSpace),0...
Creating a new instance
public static URI eraseQuery(URI uri) throws URISyntaxException { return replaceQuery(uri,(String)null); }
Creates a URI with the given query, removing an previous query value from the given URI.
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:51.917 -0400",hash_original_method="FA1D85D28CEAB4A4964615D0CD6BE099",hash_generated_method="9A62DA35FF42BC4BB25038177C97FF8C") @Override public void close() throws IOException { if (writer == null) { ...
Close the underlying writer.
public static long factorial(int n){ return cern.jet.math.Arithmetic.longFactorial(n); }
Returns <tt>n!</tt>.
public void write(int theByte) throws java.io.IOException { if (suspendEncoding) { super.out.write(theByte); return; } if (encode) { buffer[position++]=(byte)theByte; if (position >= bufferLength) { out.write(encode3to4(b4,buffer,bufferLength,options)); lineLength+=4; if (breakLi...
Writes the byte to the output stream after converting to/from Base64 notation. When encoding, bytes are buffered three at a time before the output stream actually gets a write() call. When decoding, bytes are buffered four at a time.
public StunCandidateHarvester(TransportAddress stunServer){ this(stunServer,null); }
Creates a new STUN harvester that will be running against the specified <tt>stunServer</tt> using a specific username for the purposes of the STUN short-term credential mechanism.
public XaDataSourceScriptCommand(Configuration configuration,String resourcePath,DataSource dataSource){ super(configuration,resourcePath); this.ds=dataSource; }
Sets configuration containing all needed information for building configuration scripts.
private RowMap processHeartbeats(RowMap row) throws SQLException { String hbClientID=(String)row.getData("client_id"); if (!Objects.equals(hbClientID,this.clientID)) return row; Object heartbeat_at=row.getData("heartbeat_at"); Object old_heartbeat_at=row.getOldData("heartbeat_at"); if (heartbeat_at != null ...
Possibly convert a RowMap object into a HeartbeatRowMap Process a rowmap that represents a write to `maxwell`.`positions`. If it's a write for a different client_id, or it's not a heartbeat, we return just the RowMap. Otherwise, we transform it into a HeartbeatRowMap and set lastHeartbeatRead.
private void pruneAndReAddToDynamicActions(List<ComponentStruct> dynamicActionList,ComponentStruct struct){ if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("FaceletPartialStateManagementStrategy.pruneAndReAddToDynamicActions"); } int firstIndex=dynamicActionList.indexOf(struct); if (firstIndex == -1) {...
Methods that takes care of pruning and re-adding an action to the dynamic action list. <p> If you remove a component, re-add it to the same parent and then remove it again, you only have to capture the FIRST remove. Similarly if you add a component, remove it, and then re-add it to the same parent you only need to capt...
public void testEmptyFileCleanup() throws Exception { File logDir=prepareLogDir("testEmptyFileCleanup"); long lastSeqno=-1; for (int i=0; i < 100; i++) { DiskLog log=openLog(logDir,false,1000); if (i % 10 == 0) log.validate(); LogConnection conn=log.connect(false); assertEquals("Checking log m...
Confirm that if a tail log file is empty due to truncation of partial data that we can still open the log for reading and writing and that moreover the log correctly reports the number of transactions in the log.
public boolean isChoking(){ return choking; }
Check if the entity is choking.
private void processPatch(final State current){ try { switch (current.taskState.stage) { case STARTED: processDhcpSubnetsDocuments(current); break; case FAILED: case FINISHED: case CANCELLED: break; default : this.failTask(new IllegalStateException(String.format("Un-expected stage: %s",current.taskState.s...
Does any additional processing after the patch operation has been completed.
public Ligature(RandomAccessFile raf) throws IOException { ligGlyph=raf.readUnsignedShort(); compCount=raf.readUnsignedShort(); components=new int[compCount - 1]; for (int i=0; i < compCount - 1; i++) { components[i]=raf.readUnsignedShort(); } }
Creates new Ligature
protected Chromaticity(int value){ super(value); }
Construct a new chromaticity enumeration value with the given integer value.
@Override protected EClass eStaticClass(){ return UmplePackage.eINSTANCE.getAnonymous_linkingOp_2_(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public CCSprite(CCTexture2D texture){ CGSize size=texture.getContentSize(); CGRect rect=CGRect.make(0,0,size.width,size.height); init(texture,rect); }
Initializes an sprite with a texture. The rect used will be the size of the texture. The offset will be (0,0).
public String toDebugString(){ String info="ABOUT ATTRIBUTE: " + about + "\n"+ "TITLE: "+ title+ "\n"+ "LINK: "+ link+ "\n"+ "DESCRIPTION: "+ description+ "\nLANGUAGE: "+ lang; return info; }
Useful for debug
public JBBPNamedFieldInfo findFieldForPath(final String fieldPath){ JBBPNamedFieldInfo result=null; for ( final JBBPNamedFieldInfo f : this.namedFieldData) { if (f.getFieldPath().equals(fieldPath)) { result=f; break; } } return result; }
Find a field for its path.
@Override public boolean evaluate(Number[] params){ if (this.evalForGtThan) return super.evaluate(params) && isGreaterThan(getValue(params)[0],threshold); else return super.evaluate(params) && isLessThan(getValue(params)[0],threshold); }
This eval just applies to a single value or the 1st value in params
public static <T>Maybe<T> monoToMaybe(Mono<T> source){ return new MonoAsMaybe<>(source); }
WRaps Mono instance into an RxJava Maybe.
public Icon(String id,String sourcePath,SVGResource svgResource){ this.id=id; this.sourcePath=sourcePath; this.svgResource=svgResource; this.imageResource=null; }
Creates new icon.
protected void incrementNewlyCreatedVmsCount(){ setNewlyCreatedVms(getNewlyCreatedVms() + 1); }
Increment migration count.
public long run(String[] args) throws Exception { int size=Integer.parseInt(args[0]); int nbatches=Integer.parseInt(args[1]); int ncycles=Integer.parseInt(args[2]); byte[][] arrays=new byte[ncycles][size]; StreamBuffer sbuf=new StreamBuffer(); ObjectOutputStream oout=new ObjectOutputStream(sbuf.getOutputStr...
Write and read byte arrays to/from a stream. The benchmark is run in batches, with each batch consisting of a fixed number of read/write cycles. The ObjectOutputStream is reset after each batch of cycles has completed. Arguments: <array size> <# batches> <# cycles per batch>
public double weightedTruePositiveRate(){ double[] classCounts=new double[m_NumClasses]; double classCountSum=0; for (int i=0; i < m_NumClasses; i++) { for (int j=0; j < m_NumClasses; j++) { classCounts[i]+=m_ConfusionMatrix[i][j]; } classCountSum+=classCounts[i]; } double truePosTotal=0; ...
Calculates the weighted (by class size) true positive rate.
public FileLinesCollection(final CharSequence filename,final String encoding,final boolean zipped){ this.zipped=zipped; this.filename=filename.toString(); this.encoding=encoding; }
Creates a file-lines collection for the specified filename with the specified encoding, optionally assuming that the file is compressed using <samp>gzip</samp> format.
public NceLight(String systemName,NceTrafficController tc,NceLightManager mgr){ super(systemName); this.tc=tc; this.mgr=mgr; initializeLight(systemName); }
Create a Light object, with only system name. <P> 'systemName' was previously validated in NceLightManager
private void initializeNoxItemPlaceholder(TypedArray attributes){ Drawable placeholder=attributes.getDrawable(R.styleable.nox_item_placeholder); if (placeholder == null) { placeholder=getContext().getResources().getDrawable(R.drawable.ic_nox); } noxConfig.setPlaceholder(placeholder); }
Configures the placeholder used if there is no another placeholder configured in the NoxItem instances during the onDraw execution.
public static RuntimeException asRuntime(Throwable e){ if (e instanceof RuntimeException) { return (RuntimeException)e; } else { return new WrappedAsRuntimeException(e); } }
Casts or wraps the given exception to be a RuntimeException.
@Override protected boolean convertToUppercase(){ return false; }
Method convertToUppercase.
public PDFShapeCmd(Path gp,int style){ this.gp=new Path(gp); this.style=style; bounds=new RectF(); gp.computeBounds(bounds,false); }
create a new PDFShapeCmd and check it against the previous one to find any shared edges.
static public Map<URI,Map<URI,Integer>> mapExportMaskToVolumeShareCount(DbClient dbClient,List<URI> volumeURIs,List<URI> initiatorURIs){ List<Initiator> initiators=dbClient.queryObject(Initiator.class,initiatorURIs); Map<URI,Map<URI,Integer>> exportMaskToVolumeCount=new HashMap<>(); for ( URI volumeURI : volumeU...
Method returns a mapping of ExportMask URIs to a Map of Volume URIs to Integers. The Mapping of Volume URIs to Integers represents how many ExportGroups that the volume belongs to.
private Element computeSummary(List<Book> books){ Element contentElement=JDOMManager.element("content"); File calibreLibraryFolder=currentProfile.getDatabaseFolder(); File summaryFile=new File(calibreLibraryFolder,"calibre2opds_summary.html"); if (summaryFile.exists()) { contentElement.setAttribute("type","...
TODO: Not sure what this routine is intended for (it is not used)
private void initLoggerConfig(){ try { if (!loggerConfigFile.isLocationSpecified() && !loggerConfigFile.getPath().toFile().exists()) { try { loggerConfigFile.createByDefault(); } catch ( Exception e) { play.Logger.error("Failed to initialize logger configuration",e); } ...
Creates application-logger.xml by default if necessary Note: This method creates application-logger.xml even if logger.xml exists.
public long optLong(int index){ return this.optLong(index,0); }
Get the optional long value associated with an index. Zero is returned if there is no value for the index, or if the value is not a number and cannot be converted to a number.
public V1 addAction(int icon,CharSequence title,Action.OnActionListener listener,Bundle extra){ N.addAction(icon,title,listener,extra); return this; }
Add a action to this notification. Actions are typically displayed as a button adjacent to the notification content.
public static long pause(final long sleepTimeMS){ final long startTime=System.currentTimeMillis(); do { try { final long sleepTime=sleepTimeMS - (System.currentTimeMillis() - startTime); Thread.sleep(sleepTime > 0 ? sleepTime : 5); } catch ( InterruptedException e) { } } while ((Syste...
Pause the calling thread the specified amount of time.
public static void putBoolean(Context context,String key,boolean value){ SharedPreferences mainPref=context.getSharedPreferences(context.getResources().getString(R.string.shared_pref_package),Context.MODE_PRIVATE); Editor editor=mainPref.edit(); editor.putBoolean(key,value); editor.commit(); }
Put boolean data to shared preferences in private mode.
public boolean hasSameSignature(MethodInfo m){ if (!m.name.equals(name) || m.paramTypes.length != paramTypes.length) return false; for (int i=0; i < this.paramTypes.length; ++i) { if (this.paramTypes[i] != m.paramTypes[i]) return false; } return true; }
Test if two functions have the same prototype
protected ElemVariable createLocalPseudoVarDecl(QName uniquePseudoVarName,ElemTemplateElement psuedoVarRecipient,LocPathIterator lpi) throws org.w3c.dom.DOMException { ElemVariable psuedoVar=new ElemVariablePsuedo(); XPath xpath=new XPath(lpi); psuedoVar.setSelect(xpath); psuedoVar.setName(uniquePseudoVarName);...
Create a psuedo variable reference that will represent the shared redundent XPath, for a local reduction.
public void shutdown(GL10 gl){ if (mTexture != null) { mTexture.delete(gl); } }
Call when the surface has been destroyed
@Override public InputStream openFileStream(String filename) throws IOException { if (logger.isDebugEnabled()) logger.debug("Opening " + filename); return hdfs.open(new Path(filename)); }
open a file of given filename for reading
@Override public int hashCode(){ int h=classHash(); h=31 * h + slop; h=31 * h + Arrays.hashCode(terms); h=31 * h + Arrays.hashCode(positions); return h; }
Returns a hash code value for this object.
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.
private void $$$setupUI$$$(){ contentPane=new JPanel(); contentPane.setLayout(new GridBagLayout()); contentPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(14,14,14,14),null)); myProgressBar=new JProgressBar(); GridBagConstraints gbc; gbc=new GridBagConstraints(); gbc.gridx=...
Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
public void stopPinchScaleDetection(){ pinchScaleDetector=null; }
Stop pinch scale detection.
protected void sequence_If(ISerializationContext context,If semanticObject){ if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject,GamlPackage.Literals.EXPRESSION__LEFT) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject,GamlPacka...
Contexts: Expression returns If Pair returns If Pair.Pair_1_0_0 returns If If returns If Constraint: (left=If_If_1_0 op='?' right=Or ifFalse=Or)
protected final void adoptState(Model source){ makeDirty(); }
Adopt the state of the model from source.