code
stringlengths
10
174k
nl
stringlengths
3
129k
public static boolean isLocationOld(Location location){ return !LocationUtils.isValidLocation(location) || (System.currentTimeMillis() - location.getTime() > MAX_LOCATION_AGE_MS); }
Returns true if a location is old.
public static float bytesToFloat(byte[] arr){ return Float.intBitsToFloat(bytesToInt(arr)); }
Converts a byte array to float.
protected static void createEntry(String name) throws CacheException { GenericListener l=getListener(name); createEntry(name,0,ExpirationAction.INVALIDATE,l); }
Sets a listener based on the test, and then (attempts to) create an entry in this test's region with the given name
public static OMEllipse read(DataInputStream dis) throws IOException { return read(dis,null); }
Read the ellipse protocol off the data input, and return an OMEllipse. Assumes the header for the graphic has already been read.
public static String hash(File fle){ FileInputStream fis; try { fis=new FileInputStream(fle); } catch ( FileNotFoundException e) { Log.error("Couldn't hash %s: File not found.",fle.getName()); e.printStackTrace(); return null; } try { MessageDigest sha=MessageDigest.getInstance("SHA-1");...
Returns the SHA-1 checksum of a file.
private boolean zzRefill() throws java.io.IOException { return true; }
Refills the input buffer.
public static boolean deleteDirectorySubdirectories(String rootDirectory){ if ((rootDirectory == null)) { return false; } boolean didSuccessfullyDeleteAllDirectories=true; try { List<File> files=getListOfFilesInADirectory(rootDirectory); for ( File file : files) { if (file.isDirectory()) { ...
This is a quiet method. Only deletes directories. Will fail if the directories have files in them.
public ZyGraph(final INaviView view,final LinkedHashMap<Node,NaviNode> nodeMap,final LinkedHashMap<Edge,NaviEdge> edgeMap,final ZyGraphViewSettings settings,final ZyGraph2DView g2dview){ super(g2dview,nodeMap,edgeMap,settings); m_rawView=Preconditions.checkNotNull(view,"IE00869: Argument view can't be null"); m_s...
Creates a new graph for a given view.
public java.lang.String toString(){ return null; }
Returns a short description of this Throwable object. If this Throwable object was with an error message string, then the result is the concatenation of three strings: The name of the actual class of this object ": " (a colon and a space) The result of the method for this object If this Throwable object was with no err...
public void addSwipeOpenListener(ActionListener l){ dispatcher.addListener(l); }
Adds a listener to the SwipeableContainer which will cause an event to dispatch once the SwipeableContainer is fully opened
@Override public boolean isLabelVisible(){ return (false); }
Find out if the label is visible
public static String rename(String desc,Map map){ if (map == null) return desc; StringBuffer newdesc=new StringBuffer(); int head=0; int i=0; for (; ; ) { int j=desc.indexOf('L',i); if (j < 0) break; int k=desc.indexOf(';',j); if (k < 0) break; i=k + 1; String name=desc.subst...
Substitutes class names in the given descriptor string according to the given <code>map</code>.
public void mousePress(MouseEvent e){ }
mousePress, Override this function to catch standard mouse press events.
@Override public void buildClone(Object original,CacheKey cacheKey,Object clone,Integer refreshCascade,AbstractSession cloningSession){ Object attributeValue=getAttributeValueFromObject(original); Object aggregateClone=buildClonePart(original,clone,cacheKey,attributeValue,refreshCascade,cloningSession); if (aggre...
INTERNAL: Clone the attribute from the original and assign it to the clone.
public QRDecomposition(Matrix A){ QR=A.getArrayCopy(); m=A.getRowDimension(); n=A.getColumnDimension(); Rdiag=new double[n]; for (int k=0; k < n; k++) { double nrm=0; for (int i=k; i < m; i++) { nrm=Maths.hypot(nrm,QR[i][k]); } if (nrm != 0.0) { if (QR[k][k] < 0) { nrm=-nrm...
QR Decomposition, computed by Householder reflections.
public void create(View view){ ForumPostConfig config=new ForumPostConfig(); saveProperties(config); config.forum=MainActivity.instance.id; CheckBox checkbox=(CheckBox)findViewById(R.id.replyToParentCheckBox); if (checkbox.isChecked() && MainActivity.post.parent != null && MainActivity.post.parent.length() !=...
Create the instance.
public void testGetColumns() throws Exception { try { this.stmt.execute("CREATE TABLE IF NOT EXISTS longblob_regress(field_1 longblob)"); DatabaseMetaData dbmd=this.conn.getMetaData(); ResultSet dbmdRs=null; try { dbmdRs=dbmd.getColumns("","","longblob_regress","%"); while (dbmdRs.next()) ...
Tests bug reported by OpenOffice team with getColumns and LONGBLOB
public static long hash64(final String text){ final byte[] bytes=text.getBytes(); return hash64(bytes,bytes.length); }
Generates 64 bit hash from a string.
public int generateDirectSurrogateKey(String memberStr,String format){ if (null == format) { return generateDirectSurrogateKeyForNonTimestampType(memberStr); } else { SimpleDateFormat timeParser=new SimpleDateFormat(format); timeParser.setLenient(false); if (null == memberStr || memberStr.trim().is...
The method take member String as input and converts and returns the dictionary key
public void publish(String message,Level level){ try { publish(new LogRecord(level,message)); } catch ( BadLocationException e) { throw new RuntimeException("Error writing a log-like message.",e); } }
Print a message as if it were logged, without going through the full logger.
public static int previousSetBit(long[] v,int start){ if (start == -1) { return -1; } int wordindex=start >>> LONG_LOG2_SIZE; if (wordindex >= v.length) { return magnitude(v) - 1; } final int off=Long.SIZE - 1 - (start & LONG_LOG2_MASK); long cur=v[wordindex] & (LONG_ALL_BITS >>> off); for (; ; ...
Find the previous set bit.
public ClientConfig withTasksExecutionTimeoutSeconds(int tasksExecutionTimeoutSeconds){ this.setTasksExecutionTimeoutSeconds(tasksExecutionTimeoutSeconds); return this; }
Adds the total tasks execution timeout in seconds
public void shutdownOutput() throws IOException { implCreateIfNeeded(); impl.shutdownOutput(); }
Shuts down the output side of the socket.
public static JSONArray rowToJSONArray(JSONTokener x) throws JSONException { JSONArray ja=new JSONArray(); for (; ; ) { String value=getValue(x); char c=x.next(); if (value == null || (ja.length() == 0 && value.length() == 0 && c != ',')) { return null; } ja.put(value); for (; ; ) { ...
Produce a JSONArray of strings from a row of comma delimited values.
private String removeDuplicateWords(String phrase){ String[] words=phrase.split(" "); String out=""; boolean add=true; for ( String s : words) { if (add) { out+=s + " "; add=false; } else { add=true; } } if (words.length % 2 == 0) return out + words[words.length - 1]; ret...
Removes every other word in the phrase
private void removeMovie(MovieSet movieSet,Movie movie){ synchronized (root) { MovieSetTreeNode parent=(MovieSetTreeNode)nodeMap.get(movieSet); MovieTreeNode child=(MovieTreeNode)nodeMap.get(movie); if (parent != null && child != null && parent.isNodeChild(child)) { int index=parent.getIndex(child); ...
Removes the movie.
public Instrumenter attachAllMetricCollectors(){ attachHypervolumeCollector(); attachGenerationalDistanceCollector(); attachInvertedGenerationalDistanceCollector(); attachSpacingCollector(); attachAdditiveEpsilonIndicatorCollector(); attachContributionCollector(); return this; }
Includes all indicator collectors when instrumenting algorithms. This includes hypervolume, generational distance, inverted generational distance, spacing, additive &epsilon;-indicator and contribution.
public static CommandResult execCommand(String[] commands,boolean isRoot){ return execCommand(commands,isRoot,true); }
execute shell commands, default return result msg
public boolean doMousePressed(MouseEvent event,Positionable pos){ if (_drawFrame instanceof DrawPolygon) { DrawPolygon f=(DrawPolygon)_drawFrame; f.anchorPoint(event.getX(),event.getY()); } if (pos instanceof PositionableShape && _editor.isEditable()) { if (!pos.equals(_currentSelection)) { if (...
*** return true if creating or editing
public void ajaxFired(AjaxBehaviorEvent event) throws AbortProcessingException { setFireState(event.getComponent().getClientId() + "-" + vip); }
Fired through Ajax.
public CDumpMemoryRangeAction(final JFrame parent,final IDebugger debugger,final IDataProvider dataProvider,final IAddress start,final int size){ super("Dump whole section"); m_parent=Preconditions.checkNotNull(parent,"IE01412: Parent argument can not be null"); m_debugger=Preconditions.checkNotNull(debugger,"IE0...
Creates a new action object.
private void constructModel(ModelBase modelBase,double modelScale,boolean renderDoubleFace){ this.modelBoxList.clear(); double modelWidth=modelBase.textureWidth; double modelHeight=modelBase.textureHeight; for ( ModelRenderer modelRenderer : (List<ModelRenderer>)modelBase.boxList) { if (modelRenderer.child...
Reconstructs a list of vertices and UVs with the given data.
public Stack(final File stackFile) throws IOException { this.stack=new Heap(stackFile,8,NaturalOrder.naturalOrder,0); this.lastHandle=0; }
create a new stack object. a stack object is backed by a blob file that contains the stack entries. all stack entries can be accessed with a long handle; the handle is represented as b256-encoded byte[] as key in the blob. The handle is created using the current time. That means that the top element on the stack has th...
public void testCsiS(){ withTerminalSized(3,4).enterString("1\r\n2\r\n3\r\nhi\033[2Sy").assertLinesAre("3 ","hi "," "," y"); withTerminalSized(3,4).enterString("1\r\n2\r\n3\r\nhi\033[Sy").assertLinesAre("2 ","3 ","hi "," y"); }
CSI Ps S Scroll up Ps lines (default = 1) (SU).
protected void validateState(State current){ ValidationUtils.validateState(current); }
Validate the service state for coherence.
public int size(){ return count; }
Get the length of the list.
protected boolean isUserLoggedIn(HttpServletRequest request){ return null != request.getUserPrincipal(); }
Method isUserLoggedIn Check whether user is logged in or not.
private void markSubroutineWalk(final BitSet sub,final int index,final BitSet anyvisited){ if (LOGGING) { log("markSubroutineWalk: sub=" + sub + " index="+ index); } markSubroutineWalkDFS(sub,index,anyvisited); boolean loop=true; while (loop) { loop=false; for (Iterator<TryCatchBlockNode> it=tryCa...
Performs a depth first search walking the normal byte code path starting at <code>index</code>, and adding each instruction encountered into the subroutine <code>sub</code>. After this walk is complete, iterates over the exception handlers to ensure that we also include those byte codes which are reachable through an e...
public static void enableLog(){ isLogEnable=true; }
Enable the log output.
public static List<DownloadFileDescription> sortByMapName(final List<DownloadFileDescription> downloads){ checkNotNull(downloads); final List<DownloadFileDescription> returnList=new ArrayList<>(); List<DownloadFileDescription> maps=new ArrayList<>(); for ( final DownloadFileDescription download : downloads) { ...
Sorts a list of map downloads alphabetically case insensitive by group where dummy URL headers delimit the map groups.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:28:38.459 -0500",hash_original_method="9556B578266975E5A98CFEB0C2204667",hash_generated_method="B0F6AB4EB61F7A86F4C78599925651CF") public long insert(ContentValues values){ return insertInternal(values,false); }
Performs an insert, adding a new row with the given values. If the table contains conflicting rows, an error is returned.
public void unsign(){ LinkedList<String> entriesToRemove=new LinkedList<String>(); for ( Entry<String,JarEntry> jarEntry : jarEntries.entrySet()) { if (jarEntry.getKey().endsWith(".SF") || jarEntry.getKey().endsWith(".DSA") || jarEntry.getKey().endsWith(".RSA")|| jarEntry.getKey().endsWith(".EC")) { entr...
From: http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html When jarsigner is used to sign a JAR file, the output signed JAR file is exactly the same as the input JAR file, except that it has two additional files placed in the META-INF directory: a signature file, with a .SF extension, and a sig...
@Override public void run(){ amIActive=true; try { String inputFilesString=""; String sagaHeaderFile=""; String sagaDataFile=""; int i=0; int row, col, rows=0, cols=0; double north=0, south=0, east=0, west=0, cellSize=0; long dataFileOffset=0; double zFactor=1.0; String descripti...
Used to execute this plugin tool.
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 void addFillOutsideLine(FillOutsideLine fill){ mFillBelowLine.add(fill); }
Sets if the line chart should be filled outside its line. Filling outside with FillOutsideLine.INTEGRAL the line transforms a line chart into an area chart.
public String displayInputParameters(){ return MLContextUtil.displayMap("Input Parameters",inputParameters); }
Display the script input parameters.
public VectorStore makeWriteableVectorStore(){ VectorStoreRAM outputVectors=new VectorStoreRAM(flagConfig); for (int i=0; i < this.luceneUtils.getNumDocs(); ++i) { try { String externalDocId=luceneUtils.getExternalDocId(i); Vector docVector=this.docVectors.getVector(externalDocId); outputVecto...
Create a version of the vector store indexes by path / filename rather than Lucene ID.
public Builder addFormDataPart(String name,String filename,RequestBody body){ return addPart(Part.createFormData(name,filename,body)); }
Add a form data part to the body.
public synchronized void write(String logData){ if (logEnabled) { histData.append(logData); histData.revalidate(); synchronized (histData) { histData.notify(); } } }
Append text to the log, repaint the window and notify the autoscroll thread to scroll to the end of the text area.
protected static float convertSpecularExponent(Element filterElement,BridgeContext ctx){ String s=filterElement.getAttributeNS(null,SVG_SPECULAR_EXPONENT_ATTRIBUTE); if (s.length() == 0) { return 1; } else { try { float v=SVGUtilities.convertSVGNumber(s); if (v < 1 || v > 128) { throw...
Returns the specular exponent of the specular feSpecularLighting filter primitive element.
static String generateErrorCorrection(CharSequence dataCodewords,int errorCorrectionLevel){ int k=getErrorCorrectionCodewordCount(errorCorrectionLevel); char[] e=new char[k]; int sld=dataCodewords.length(); for (int i=0; i < sld; i++) { int t1=(dataCodewords.charAt(i) + e[e.length - 1]) % 929; int t2; ...
Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E).
protected void incrementVmsAcks(){ vmsAcks++; }
Increment the number of acknowledges (ACKs) sent in response to requests of VM creation.
public boolean isAssignableFrom(Class cl){ if (getName().equals(cl.getName())) return true; Class[] ifc=cl.getInterfaces(); for (int i=0; i < ifc.length; i++) { if (isAssignableFrom(ifc[i])) return true; } if (cl.getSuperclass() != null) return isAssignableFrom(cl.getSuperclass()); else return ...
Returns true if the class is assignable from the argument.
public static int interp(int c1,int c2,double frac){ double ifrac=1 - frac; return rgba((int)Math.round(frac * red(c2) + ifrac * red(c1)),(int)Math.round(frac * green(c2) + ifrac * green(c1)),(int)Math.round(frac * blue(c2) + ifrac * blue(c1)),(int)Math.round(frac * alpha(c2) + ifrac * alpha(c1))); }
Interpolate between two color values by the given mixing proportion. A mixing fraction of 0 will result in c1, a value of 1.0 will result in c2, and value of 0.5 will result in the color mid-way between the two in RGB color space.
public ContinueStatement createContinueStatement(){ ContinueStatementImpl continueStatement=new ContinueStatementImpl(); return continueStatement; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public R1Interval union(R1Interval y){ if (isEmpty()) { return y; } if (y.isEmpty()) { return this; } return new R1Interval(Math.min(lo(),y.lo()),Math.max(hi(),y.hi())); }
Return the smallest interval that contains this interval and the given interval "y".
public XMLContent(String content){ this(wrap(content)); }
Construct from an XML string
public static double info(int counts[]){ int total=0; double x=0; for (int j=0; j < counts.length; j++) { x-=xlogx(counts[j]); total+=counts[j]; } return x + xlogx(total); }
Computes entropy for an array of integers.
public boolean isLogicalFunction(){ return false; }
subtraction is not a logical function.
public void add(String keyword,byte id){ int key=getStringMapKey(keyword); map[key]=new Keyword(keyword.toCharArray(),id,map[key]); }
Adds a key-value mapping.
public static void dropTable(SQLiteDatabase db,boolean ifExists){ String sql="DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "'GroupVideo'"; db.execSQL(sql); }
Drops the underlying database table.
protected void paintGlass(Graphics g){ }
This method can be overriden by a component to draw on top of itself or its children after the component or the children finished drawing in a similar way to the glass pane but more refined per component
@Override public void finish() throws IOException { if (out == null) { throw new IOException("Stream is closed"); } if (cDir == null) { return; } if (entries.isEmpty()) { throw new ZipException("No entries"); } if (currentEntry != null) { closeEntry(); } int cdirSize=cDir.size(); wri...
Indicates that all entries have been written to the stream. Any terminal information is written to the underlying stream.
public StackOfIntegers(){ this(DEFAULT_CAPACITY); }
Construct a stack with the default capacity 16
@SuppressWarnings("unchecked") @Override public void eSet(int featureID,Object newValue){ switch (featureID) { case DomPackage.COMPOSITE__CONTENTS: getContents().clear(); getContents().addAll((Collection<? extends ContentNode>)newValue); return; } super.eSet(featureID,newValue); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public boolean containsIdentical(Object element){ for ( Object obj : objects) if (element == obj) return true; return false; }
Identity check
public static <Req,Res>void loadTestConcurrency(final int concurrency,final int warmupRequests,final ReceivePort<Req> requests,final RequestExecutor<Req,Res> executor,final SendPort<TimingEvent<Res>> eventChannel,final FiberScheduler fiberScheduler) throws SuspendExecution, InterruptedException { loadTestConcurrency(...
Run a load test with a given number of fibers, making as many requests as possible. This method can be run in any strand; thread-fiber synchronization is more expensive than fiber-fiber synchronization though, so if requests are being performed by fibers its best to call this method inside a fiber.
private void updatePositionConfiguration(){ if (mWindowWidth == 0 || mWindowHeight == 0) { return; } mPositionConfiguration=getPositionConfiguration(mWindowWidth,mWindowHeight,mAspectRatio,mRotation); }
Updates bottom bar rect and preview rect. This gets called whenever preview aspect ratio changes or main activity layout size changes.
public static void main(String[] args) throws IOException { int low=0; int high=32000; if (args == null || args.length == 0) { } else if (args.length == 1) { low=Integer.valueOf(args[0]); } else if (args.length >= 2) { low=Integer.valueOf(args[0]); high=Integer.valueOf(args[1]); if (args...
Load up series of deals from the file "32000.txt" and process those between argv[0] and argv[1]. These are both strings. If no arguments, then process all; If just one, then process starting from that point onwards. If both, then process the range inclusively.
protected void addIfdData(IfdData data){ mIfdDatas[data.getId()]=data; }
Adds IFD data. If IFD data of the same type already exists, it will be replaced by the new data.
public static void assertVocabulary(Analyzer a,Path zipFile,String voc,String out) throws IOException { Path tmp=LuceneTestCase.createTempDir(); try (InputStream in=Files.newInputStream(zipFile)){ TestUtil.unzip(in,tmp); } try (InputStream v=Files.newInputStream(tmp.resolve(voc));InputStream o=Files.newInp...
Run a vocabulary test against two data files inside a zip file
@Override public void run(){ try { while (true) { InputStreamReader isr=null; try { isr=new InputStreamReader(getFeedInputStream()); SyndFeedInput feedInput=new SyndFeedInput(); SyndFeed feed=feedInput.build(isr); List entries=feed.getEntries(); List<RomeFeedEnt...
Thread processing of the syndication feeds
public static <K extends Comparable<K>,V extends Comparable<V>>Map<K,V> createByValueSortedConcurrentMap(Map<K,V> map,boolean reversed,Comparator<V> comparator){ return new ByValueSortingConcurrentSkipListMap<>(ByValueComparator.create(map,reversed,comparator)); }
Construct new sorted by values concurrent map using given map and comparator.
@Override public void release(){ super.release(); clazz=null; scope=Constants.class.getName(); }
Release all allocated resources.
public String className(){ return getConstPool().getClassInfo(classIndex()); }
Returns the name of the class specified by <code>class_index</code>.
@Override public V put(K key,V value){ if (key == null) { return putValueForNullKey(value); } int hash=secondaryHash(key); HashMapEntry<K,V>[] tab=table; int index=hash & (tab.length - 1); for (HashMapEntry<K,V> e=tab[index]; e != null; e=e.next) { if (e.hash == hash && key.equals(e.key)) { pr...
Maps the specified key to the specified value.
public BasicSplitPaneDivider createDefaultDivider(){ return new BasicSplitPaneDivider(this); }
Creates the default divider.
public DateHeader createDateHeader(Calendar date){ SIPDateHeader d=new SIPDateHeader(); if (date == null) throw new NullPointerException("null date"); d.setDate(date); return d; }
Creates a new DateHeader based on the newly supplied date value.
public void addChildBefore(Node newChild,Node node){ if (newChild.next != null) throw new RuntimeException("newChild had siblings in addChildBefore"); if (first == node) { newChild.next=first; first=newChild; return; } Node prev=getChildBefore(node); addChildAfter(newChild,prev); }
Add 'child' before 'node'.
protected void writeTldDescription() throws IOException { writer.startElement("taglib",TAG_LIB_SCHEMA_ATTRIBUTES); writer.writeComment("============== Tag Library Description Elements ============="); writer.startElement("description"); writer.writeText(propManager.getProperty(PropertyManager.TAGLIB_DESCRIPTION...
The description element for this TLD.
public boolean supports(StringBuilder string){ SortedSet<StringBuilder> t=this.dict.tailSet(string); for ( final StringBuilder r : t) { if (StringBuilderComparator.CASE_INSENSITIVE_ORDER.startsWith(string,r)) { return true; } break; } string=reverse(string); t=this.tcid.tailSet(string); f...
check if the library supports the given word A word is supported, if the library contains a word that starts or ends with the given word
public <T>T notNull(T reference,String errorMessageTemplate,Object... errorMessageArgs){ if (reference == null) { throw new NullPointerException(format(errorMessageTemplate,errorMessageArgs)); } return reference; }
Ensures that an object reference passed as a parameter to the calling method is not null.
static Tuple<Map<String,String>,Long> readLegacyChecksums(Directory directory) throws IOException { synchronized (directory) { long lastFound=-1; for ( String name : directory.listAll()) { if (!isChecksum(name)) { continue; } long current=Long.parseLong(name.substring(CHECKSUMS_PREF...
Reads legacy checksum files found in the directory. <p/> Files are expected to start with _checksums- prefix followed by long file version. Only file with the highest version is read, all other files are ignored.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:35:17.088 -0500",hash_original_method="1B4F9BFF1D832A07D0E1F41D0B16D2FF",hash_generated_method="5D26BC6CD7492E3645E935033A475185") @DSVerified @DSSafe(DSCat.ANDROID_CALLBACK) protected void onStart(){ if (mActionBar != null) mActio...
Called when the dialog is starting.
public NotificationChain basicSetElseStep(Step newElseStep,NotificationChain msgs){ Step oldElseStep=elseStep; elseStep=newElseStep; if (eNotificationRequired()) { ENotificationImpl notification=new ENotificationImpl(this,Notification.SET,SexecPackage.IF__ELSE_STEP,oldElseStep,newElseStep); if (msgs == nu...
<!-- begin-user-doc --> <!-- end-user-doc -->
public long lastBinlogPosition(){ return lastBinlogPosition; }
Get the position within the MySQL binary log file of the most recently processed event.
protected void start(){ log.debug("main initialization done"); }
Final actions before releasing control of app to user, invoked explicitly after object has been constructed, e.g. in main().
private void findLicenseUrl(Element element){ if (!"a".equalsIgnoreCase(element.getTagName())) return; String href=element.getAttribute("href"); if (href == null) return; try { URL url=new URL(base,href); if ("http".equalsIgnoreCase(url.getProtocol()) && "creativecommons.org".equalsIgnoreCase(url.ge...
Extract license url from element, if any. Thse are the href attribute of anchor elements with rel="license". These must also point to http://creativecommons.org/licenses/.
public void nextEntry(ZipEntry ze) throws IOException { LOG.fine("nextEntry().currentPos=" + currentPos); byte[] intBuffer=new byte[4]; int bytesRead=fis.read(intBuffer); LOG.fine("bytes read=" + bytesRead); if (bytesRead == -1) { throw new IOException("no data available - available=" + fis.available()); ...
position input stream to start of ZipEntry this instance was created for
public Realm(DerValue encoding) throws Asn1Exception, RealmException, IOException { if (encoding == null) { throw new IllegalArgumentException("encoding can not be null"); } realm=new KerberosString(encoding).toString(); if (realm == null || realm.length() == 0) throw new RealmException(Krb5.REALM_NULL); ...
Constructs a Realm object.
public ActionForward searchInstructionalOfferings(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws Exception { sessionContext.checkPermission(Right.InstructionalOfferings); InstructionalOfferingListForm frm=(InstructionalOfferingListForm)form; ActionMessages er...
Method execute
public hr removeElement(String hashcode){ removeElementFromRegistry(hashcode); return (this); }
Removes an Element from the element.
public void add(Object obj){ throw new UnsupportedOperationException("add() is unsupported"); }
Unsupported ListIterator operation.
public boolean canSeeEntity(GlowEntity entity){ return knownEntities.contains(entity); }
Checks whether the player can see the given entity.
private void init(){ mainPanel=new JPanel(); mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS)); mainPanel.add(connectionPanel); propertiesPanel=ConnectionSynapsePropertiesPanel.createSynapsePropertiesPanel(this); mainPanel.add(propertiesPanel); eirPanel=SynapsePolarityAndRandomizerPanel.createP...
Initialize the connection panel.
public BurpCertificate cloneCertificate(BurpCertificate certificate,BurpCertificateBuilder burpCertificateBuilder){ cloneProperties(certificate,burpCertificateBuilder); setStatus("Cloning certificate..."); BurpCertificate burpCertificate; try { burpCertificate=burpCertificateBuilder.generateSelfSignedCertif...
Clone a certificate from one source certificate. New private key material is generated.
protected void updateOutput(){ AcelaNode tNode=AcelaAddress.getNodeFromSystemName(tSystemName,_memo); if (tNode == null) { log.error("Can't resolve Acela Signal with name '" + tSystemName + "', command ignored"); return; } int cmd; if (mLit) { switch (mAppearance) { case RED: cmd=1; break; c...
Handle a request to change state on layout
private void returnData(Object ret){ if (myHost != null) { myHost.returnData(ret); } }
Used to communicate a return object from a plugin tool to the main Whitebox user-interface.
public static API v(){ return v; }
Return the current runtime instance.
public Builder addAddress(Address address){ addresses.add(address); return this; }
adds a new address to the existing addresses of a existing user