code
stringlengths
10
174k
nl
stringlengths
3
129k
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
private void addFileToZip(ZipArchiveOutputStream z_out,String path,String base) throws IOException { File f=new File(path); String entryName=base + f.getName(); ZipArchiveEntry zipEntry=new ZipArchiveEntry(f,entryName); z_out.putArchiveEntry(zipEntry); if (f.isFile()) { FileInputStream fInputStream=null; ...
Creates a zip entry for the path specified with a name built from the base passed in and the file/directory name. If the path is a directory, a recursive call is made such that the full directory is added to the zip.
public void close(){ myDebugger.getEventQueue().endDocument(); if (TRACE) { trace("</trace>"); } }
Called at end
protected void fireTreeNodesInserted(Object source,Object[] path,int[] childIndices,Object[] children){ Object[] listeners=listenerList.getListenerList(); TreeModelEvent e=null; for (int i=listeners.length - 2; i >= 0; i-=2) { if (listeners[i] == TreeModelListener.class) { if (e == null) e=new Tre...
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
private boolean tryDisableEvents(IgniteEx ignite){ if (!listenVisor.values().contains(true)) { listenVisor.clear(); ignite.events().disableLocal(VISOR_TASK_EVTS); } return ignite.allEventsUserRecordable(VISOR_TASK_EVTS); }
Check if collect events may be disable.
@Override public boolean eventGeneratable(String eventName){ if (eventName.equals("instance")) { if (!m_listeneeTypes.contains(eventName)) { return false; } for ( Object listenee : m_listenees.values()) { if (listenee instanceof EventConstraints && !((EventConstraints)listenee).eventGenerat...
Returns true if, at the current time, the named event could be generated.
void invalidate(){ for (int i=0; i < mCursors.size(); i++) { swapCursor(i,null,null); } }
Deactivates all previously bound cursors and unregisters their observers, prepares views for new data bindings
private boolean isMineshafterPresent(){ try { Class.forName("mineshafter.MineServer"); return true; } catch ( Exception e) { return false; } }
Check if mineshafter is present. If it is, we need to bypass it to send POST requests
public void dropActionChanged(DragSourceDragEvent dsde){ ((DragSourceListener)a).dropActionChanged(dsde); ((DragSourceListener)b).dropActionChanged(dsde); }
Handles the <code>DragSourceDragEvent</code> by invoking <code>dropActionChanged</code> on listener-a and listener-b.
public String toString(){ return this.essenceContainerDataBO.toString(); }
A method that returns a string representation of an EssenceContainerData object
private static void verifyLog(ByteArrayOutputStream bout,String mustContain){ byte[] bytes=bout.toByteArray(); if (bytes.length == 0) { TestLibrary.bomb("log data length is zero"); } else if ((mustContain != null) && (bout.toString().indexOf(mustContain) < 0)) { TestLibrary.bomb("log output did not con...
Ensure that a log has some output and that it contains a certain string
@RequestMapping(value="/weights",method=RequestMethod.POST,produces=MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<Weight> create(@Valid @RequestBody Weight weight) throws URISyntaxException { log.debug("REST request to save Weight : {}",weight); if (weight.getId() != null) { return ResponseEnti...
POST /weights -> Create a new weight.
private void writeObject(ObjectOutputStream s) throws IOException { s.defaultWriteObject(); s.writeInt(getStyle()); }
Serializes this caret. This is overridden to write the style of the caret.
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
void paintSkin(Graphics g,int dx,int dy,int dw,int dh,State state,boolean borderFill){ if (XPStyle.getXP() == null) { return; } if (borderFill && "borderfill".equals(getTypeEnumName(component,part,state,Prop.BGTYPE))) { return; } skinPainter.paint(null,g,dx,dy,dw,dh,this,state); }
Paint a skin at a defined position and size
DatastoreBackupInfo(Entity backupEntity){ backupName=(String)checkNotNull(backupEntity.getProperty("name"),"name"); @SuppressWarnings("unchecked") List<String> rawKinds=(List<String>)checkNotNull(backupEntity.getProperty("kinds"),"kinds"); Date rawStartTime=(Date)checkNotNull(backupEntity.getProperty("start_time"...
DatastoreBackupInfo instances should only be obtained via DatastoreBackupService.
public void onReadRemoteRssi(String address,int rssi,int status){ if (DBG) Log.d(TAG,"onReadRemoteRssi() - Device=" + address + " rssi="+ rssi+ " status="+ status); if (!address.equals(mDevice.getAddress())) { return; } try { mCallback.onReadRemoteRssi(BluetoothGatt.this,rssi,status); } catch ( Ex...
Remote device RSSI has been read
private void markDirty(){ if (!dirty) { dirty=true; formPage.getManagedForm().dirtyStateChanged(); } }
Checks if we are in dirty state.
final public void disable_tracing(){ }
Disable tracing.
protected void postorder(TreeNode<E> root){ if (root == null) return; postorder(root.left); postorder(root.right); System.out.print(root.element + " "); }
Postorder traversal from a subtree
int checkIfAssigned(String webappId){ if (webappId == null) { return INVALID_ACTIVITY_INDEX; } for (int i=mActivityList.size() - 1; i >= 0; i--) { if (webappId.equals(mActivityList.get(i).mWebappId)) { return mActivityList.get(i).mActivityIndex; } } return INVALID_ACTIVITY_INDEX; }
Checks if the webapp with the given ID has been assigned to an Activity already.
private <T>List<T> runLimitedParallel(final List<Callable<T>> tasks,long timeout,final TimeUnit unit,final int maxParallel) throws ExecutionException, InterruptedException, TimeoutException { long nanos=timeout=unit.toNanos(timeout); final long begin=System.nanoTime(); final Iterator<Callable<T>> titr=tasks.itera...
Executes tasks with limited parallelism.
private CollectorUtil(){ instanceNotAllowed(getClass()); }
Utility classes should not be instantiated.
default Eval<T> toEvalAlways(){ return Eval.always(this); }
Return the value of this object, evaluated always.
private PostgreSQLNodeLoader(){ }
Do not instantiate this class.
public AccessibleJTreeNode(JTree t,TreePath p,Accessible ap){ tree=t; path=p; accessibleParent=ap; treeModel=t.getModel(); obj=p.getLastPathComponent(); if (treeModel != null) { isLeaf=treeModel.isLeaf(obj); } }
Constructs an AccessibleJTreeNode
private LoginStatus pullRemoteChanges(){ Log.d(getClass().getSimpleName(),"pullRemoteChanges()"); LoginStatus status=null; try { List<DBNote> localNotes=dbHelper.getNotes(); Map<Long,Long> localIDmap=new HashMap<>(); for ( DBNote note : localNotes) { localIDmap.put(note.getRemoteId(),note.get...
Pull remote Changes: update or create each remote note (if local pendant has no changes) and remove remotely deleted notes.
public static boolean canSendSms(Context context){ Uri smsUri=Uri.parse("smsto:12345"); Intent smsIntent=new Intent(Intent.ACTION_SENDTO,smsUri); PackageManager smspackageManager=context.getPackageManager(); List<ResolveInfo> smsresolveInfos=smspackageManager.queryIntentActivities(smsIntent,0); if (smsresolve...
Checks if the device can send SMS messages.
public Bundler putLong(String key,long value){ bundle.putLong(key,value); return this; }
Inserts a long value into the mapping of this Bundle, replacing any existing value for the given key.
private SSLEngineResult.HandshakeStatus doTasks(){ Runnable runnable; while ((runnable=sslEngine.getDelegatedTask()) != null) { runnable.run(); } return sslEngine.getHandshakeStatus(); }
Do all the outstanding handshake tasks in the current Thread.
public static double blackFormula(final PlainVanillaPayoff payoff,@Real final double strike,@Real final double forward,@StdDev final double stddev,@DiscountFactor final double discount){ return blackFormula(payoff,strike,forward,stddev,discount,0.0); }
Black 1976 formula
public void removeOldData(EventBean[] oldData){ if (rootView.getRevisionProcessor() != null) { rootView.getRevisionProcessor().removeOldData(oldData,indexRepository); } else { for ( EventTable table : indexRepository.getTables()) { table.remove(oldData); } } }
Called by tail view to indicate that the data window view exired events that must be removed from index tables.
public Graph search(){ long time1=System.currentTimeMillis(); if (initialGraph != null) { graph=new EdgeListGraph(initialGraph); graph.reorientAllWith(Endpoint.TAIL); } else if (graph == null) { graph=new EdgeListGraph(getIndependenceTest().getVariables()); } else { graph=new EdgeListGraph(g...
Runs PC starting with a fully connected graph over all of the variables in the domain of the independence test.
public URLRasterLocation(double latitude,double longitude,int xOffset,int yOffset,String name,URL iconURL){ super(latitude,longitude,xOffset,yOffset,name,getIconRaster(latitude,longitude,xOffset,yOffset,iconURL)); if (location instanceof OMRaster) { setHorizontalLabelBuffer((((OMRaster)location).getWidth() / 2)...
Create a URLRasterLocation at a lat/lon location with a screen x/y offset.
public static Transform makeScale(float x,float y){ return makeScale(x,y,1); }
Creates a new scale transform.
public int executeQuery(String jpql){ this.bot.log(this,"JPQL",Level.FINE,jpql); int rowCount=0; synchronized (this.bot.memory()) { try { this.entityManager.getTransaction().begin(); rowCount=this.entityManager.createQuery(jpql).executeUpdate(); this.entityManager.getTransaction().commit(); ...
Execute and commit the update query.
public void endElement(XmlNamespace namespace,String name) throws IOException { Element element=currentElement(); assert namespace == null || element.nsUri.equals(namespace.uri); assert element.name.equals(name); endElement(); }
Ends the current element. It is expected to be on top of the stack.
@NonNull public static String checkNotEmpty(String str,@Nullable Object errorMessage){ checkNotNull(str,errorMessage); checkArgument(!TextUtils.isEmpty(str),errorMessage); return str; }
Ensures that a string is not null or empty.
protected ScriptDocValues.Strings docFieldStrings(String field){ return (ScriptDocValues.Strings)doc().get(field); }
Returns field data strings access for the provided field.
long references(){ return references; }
Returns the number of open command references for the session.
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 fillLangs(final Map<String,Object> dataModel){ dataModel.putAll(langPropsService.getAll(Latkes.getLocale())); }
Fills the all language labels.
private Item newString(final String value){ key2.set(STR,value,null,null); Item result=get(key2); if (result == null) { pool.put12(STR,newUTF8(value)); result=new Item(index++,key2); put(result); } return result; }
Adds a string to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item.
private static void assertMp4WebvttSubtitleEquals(Subtitle sub,Cue... expectedCues){ assertEquals(1,sub.getEventTimeCount()); assertEquals(0,sub.getEventTime(0)); List<Cue> subtitleCues=sub.getCues(0); assertEquals(expectedCues.length,subtitleCues.size()); for (int i=0; i < subtitleCues.size(); i++) { Lis...
Asserts that the Subtitle's cues (which are all part of the event at t=0) are equal to the expected Cues.
protected void finalize(){ if (cmmProfile != null) { CMSManager.getModule().freeProfile(cmmProfile); } else if (profileActivator != null) { ProfileDeferralMgr.unregisterDeferral(profileActivator); } }
Frees the resources associated with an ICC_Profile object.
@POST @Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @CheckPermission(roles={Role.TENANT_ADMIN}) @Path("/{id}/ip-interfaces") public IpInterfaceRestRep createIpInterface(@PathParam("id") URI id,IpInterfaceCreateParam createParam) throw...
Creates a new ip interface for a host.
public static void refreshPlayerList(JList<String> playerList,Client client,boolean displayTeam){ ((DefaultListModel<String>)playerList.getModel()).removeAllElements(); for ( IPlayer player : client.getGame().getPlayersVector()) { StringBuffer playerDisplay=new StringBuffer(player.getName()); if (displayTe...
Refreshes the player list component with information from the game object.
NodeID destNodeID(){ return (NodeID)nodeSelector.getSelectedItem(); }
Get NodeID from the GUI
private static RemoteCandidate parseCandidate(Attribute attribute,IceMediaStream stream){ String value=null; try { value=attribute.getValue(); } catch ( Throwable t) { } StringTokenizer tokenizer=new StringTokenizer(value); String foundation=tokenizer.nextToken(); int componentID=Integer.parseInt(to...
Parses the <tt>attribute</tt>.
public String globalInfo(){ return "Generates the matrix output in LaTeX-syntax."; }
Returns a string describing the matrix.
public byte[] scramble(byte[] serverRandom){ byte[] result=new byte[serverRandom.length]; byte mask=nextByte(100); for (int i=0; i < serverRandom.length; i++) { result[i]=(byte)(serverRandom[i] ^ (nextByte() & mask)); } return result; }
This is the clash 7 key generator. Generates the nonce used to form the RC4 key.
public Document read(char[] text) throws DocumentException, IOException, XmlPullParserException { getXPPParser().setInput(text); return parseDocument(); }
<p> Reads a Document from the given array of characters </p>
public void validateBusinessObjectDataDdl(BusinessObjectDataDdlRequest request,String expectedDdl,BusinessObjectDataDdl actualBusinessObjectDataDdl){ assertNotNull(actualBusinessObjectDataDdl); assertEquals(request.getNamespace(),actualBusinessObjectDataDdl.getNamespace()); assertEquals(request.getBusinessObjectD...
Validates business object data ddl object instance against specified arguments and expected (hard coded) test values.
private void restoreFromKeypress(final KeyEvent keyEvent,final int keyNumber){ if (keyEvent.isAltDown()) { final int arrayIndex=(keyNumber > 0 ? keyNumber : MAX_RECENT_MESSAGES) - 1; if (arrayIndex < recentMessages.size()) { displayMessage(recentMessages.get(arrayIndex)); } keyEvent.consume(); ...
Restores message from the key event.
public boolean verifySignature(byte[] message,BigInteger r,BigInteger s){ byte[] mRev=new byte[message.length]; for (int i=0; i != mRev.length; i++) { mRev[i]=message[mRev.length - 1 - i]; } BigInteger m=new BigInteger(1,mRev); GOST3410Parameters params=key.getParameters(); BigInteger zero=BigInteger.va...
return true if the value r and s represent a GOST3410 signature for the passed in message for standard GOST3410 the message should be a GOST3411 hash of the real message to be verified.
public XmlDom(Element element){ this.root=element; }
Instantiates a new xml dom.
@Override protected void emit_invoke_compiledmethod(CompiledMethod cm){ Offset methodOffset=cm.getOsrJTOCoffset(); boolean takeThis=!cm.method.isStatic(); MethodReference ref=cm.method.getMemberRef().asMethodReference(); genParameterRegisterLoad(ref,takeThis); asm.generateJTOCcall(methodOffset); genResultRe...
OSR routine to emit code to invoke a compiled method (with known jtoc offset). Treat it like a resolved invoke static, but take care of this object in the case.<p> I have not thought about GCMaps for invoke_compiledmethod.<p> TODO: Figure out what the above GCMaps comment means and fix it!
final public static List<int[]> generateWidePoly(int lw,int len,int[] xpts,int[] ypts,int[] altx,boolean connect){ ArrayList<int[]> ret_val=new ArrayList<int[]>(len * 4); int off1=0, off2=0; int[] x=null, y=null, a_x=null; float slope; int end=(connect) ? len : len - 1; if (len <= 1) return new ArrayList<...
Generates a polygon or polyline with positive width lw. <p> Returns ArrayList of x-y array pairs of coordinates of polygon segments. the parameter altx must either be null, or an alternate array of points to draw. <p>
public void addInvokestatic(CtClass clazz,String name,String desc){ addInvokestatic(constPool.addClassInfo(clazz),name,desc); }
Appends INVOKESTATIC.
public LabeledOMPoly(double[] llPoints,int units,int lType){ super(llPoints,units,lType); }
Create an LabeledOMPoly from a list of float lat/lon pairs.
public void runTest() throws Throwable { Document doc; NodeList addressList; Node testNode; NamedNodeMap attributes; Attr streetAttr; String name; doc=(Document)load("staff",false); addressList=doc.getElementsByTagName("address"); testNode=addressList.item(1); attributes=testNode.getAttributes(); ...
Runs the test case.
public boolean isReadOnly(){ return ((DataTableModel)getModel()).isReadOnly(); }
returns whether the model is read-only
private boolean contains(int cubeY){ int index=binarySearch(cubeY); return index < cubes.size() && cubes.get(index).getY() == cubeY; }
Check if the target cube is stored here
public EventHistory(Event c){ super(c); if (c.getTechnicalProduct() != null) { this.technicalProductObjKey=Long.valueOf(c.getTechnicalProduct().getKey()); } }
Constructs EventHistory from an Event domain object
protected DrmEvent(int uniqueId,int type,String message){ mUniqueId=uniqueId; mType=type; if (null != message) { mMessage=message; } }
Creates a <code>DrmEvent</code> object with the specified parameters.
public JSONObject append(String key,Object value) throws JSONException { testValidity(value); Object o=opt(key); if (o == null) { put(key,new JSONArray().put(value)); } else if (o instanceof JSONArray) { put(key,((JSONArray)o).put(value)); } else { throw new JSONException("JSONObject[" + key +...
Append values to the array under a key. If the key does not exist in the JSONObject, then the key is put in the JSONObject with its value being a JSONArray containing the value parameter. If the key was already associated with a JSONArray, then the value parameter is appended to it.
public Element create(String prefix,Document doc){ return new SVGOMLineElement(prefix,(AbstractDocument)doc); }
Creates an instance of the associated element type.
public static void catchupEventStream(Context context){ if (VectorApp.isAppInBackground()) { Log.d(LOG_TAG,"catchupEventStream"); sendEventStreamAction(context,EventStreamService.StreamAction.CATCHUP); } }
Trigger a event stream catchup i.e. there is only sync/ call.
@Override protected EClass eStaticClass(){ return TypesPackage.Literals.PACKAGE; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException { MobileEnv.dump(request); MobileSessionCtx wsc=MobileSessionCtx.get(request); WWindowStatus ws=WWindowStatus.get(request); if (wsc == null || ws == null) { if (wsc == null) MobileUtil.create...
Process the HTTP Post request
protected Light createNewSpecificLight(String systemName,String userName){ if (isInsteon(systemName)) { return new SpecificInsteonLight(systemName,tc,userName); } else { return new SpecificX10Light(systemName,tc,userName); } }
Create light of a specific type for the interface
public void clear(){ histogram.clear(); }
Clears all recorded durations.
public void run() throws InterpreterException, IOException { init(); runCode(); }
Runs the interpreter behaviour specified by command line. The default behaviour is to execute the input code. Note that you must shutdown the CommCore of this Interpreter manually after calling this method.
public void mouseMoved(MouseEvent e){ if (AWTEventMonitor.mouseMotionListener_private != null) { AWTEventMonitor.mouseMotionListener_private.mouseMoved(e); } }
Called when the mouse is moved.
private Clustering<Model> generateDefaultClustering(){ final Database db=ResultUtil.findDatabase(hier); Clustering<Model> c=null; try { ByLabelHierarchicalClustering split=new ByLabelHierarchicalClustering(); c=split.run(db); } catch ( NoSupportedDataTypeException e) { c=new TrivialAllInOne().run(...
Generate a default (fallback) clustering.
public void put(String fieldName,String v){ if (v == null) { putNull(fieldName); } else { _put(fieldName,textNode(v)); } }
Method for setting value of a field to specified String value.
static public JComboBox<String> jComboBoxFromList(List<DecoderFile> l){ return new JComboBox<String>(jComboBoxModelFromList(l)); }
Return a JComboBox made with the titles from a list of DecoderFile entries
public JsonParser createJsonParser(byte[] data) throws IOException, JsonParseException { IOContext ctxt=_createContext(data,true); if (_inputDecorator != null) { InputStream in=_inputDecorator.decorate(ctxt,data,0,data.length); if (in != null) { return _createJsonParser(in,ctxt); } } return _c...
Method for constructing parser for parsing the contents of given byte array.
public RepositoryExpression atRevision(String revId){ return withOption("revision",revId); }
A helper method for adding a "revision" option with the given value.
protected VisionWorldModelListenerSupport(){ listenerList=new EventListenerList(); }
Create a new vision world model listener support class meant to be subclassed. The subclass should call <code>setSource(this)</code> before calling any of the <code>fireX</code> methods.
private static final void usage(){ System.err.println("usage: java MST -v <levels> [-p] [-m] [-h]"); System.err.println(" -v the number of vertices in the graph"); System.err.println(" -p (print the result>)"); System.err.println(" -m (print informative messages)"); System.err.println(" -h (this m...
The usage routine which describes the program options.
public void addIssuerSerial(String X509IssuerName,int X509SerialNumber){ this.add(new XMLX509IssuerSerial(this.doc,X509IssuerName,X509SerialNumber)); }
Method addIssuerSerial
public void save() throws IOException { }
Saves the templates to the preferences.
public String write(Map<String,String> outputProperties){ StringWriter sw=new StringWriter(); try { write(sw,outputProperties); } catch ( TransformerException e) { throw new RuntimeException(e); } return sw.toString(); }
Writes the xCal document to a string.
public void updateGui(final boolean connected,final boolean suspended){ m_gotoAction.setEnabled(connected && suspended); }
Updates the GUI depending on the state of the debugger.
public Object runSafely(Catbert.FastStack stack) throws Exception { SeriesInfo si=getSeriesInfo(stack); return si == null ? "" : si.getNetwork(); }
Returns the name of the network the specified SeriesInfo airs on
public static short toShortValue(Object o) throws PageException { if (o instanceof Short) return ((Short)o).shortValue(); if (o instanceof Character) return (short)(((Character)o).charValue()); else if (o instanceof Boolean) return (short)((((Boolean)o).booleanValue()) ? 1 : 0); else if (o instanceof Nu...
cast a Object to a short value (primitive value type)
public void test_allocCommitFreeCommitWithHistory(){ Journal store=(Journal)getStore(4); try { RWStrategy bs=(RWStrategy)store.getBufferStrategy(); final long addr=bs.write(randomData(78)); store.commit(); bs.delete(addr); assertTrue(bs.isCommitted(addr)); store.commit(); assertTrue(bs.i...
In order to see deferred recycling we need to make two commits (with modifications) after the retention period has expired. To be able to check for the address release, we must ensure that the same address cannot be re-allocated, so a different size allocation is requested.
public static int[] toIntArray(Float[] array){ int[] result=new int[array.length]; for (int i=0; i < array.length; i++) { result[i]=array[i].intValue(); } return result; }
Coverts given floats array to array of ints.
private void sort(Trie node,List<FeatureFunction> models){ if (node != null) { if (node.hasRules()) { RuleCollection rules=node.getRuleCollection(); LOG.debug("Sorting node {}",Arrays.toString(rules.getSourceSide())); rules.getSortedRules(models); if (LOG.isDebugEnabled()) { String...
Recursively sorts the grammar using the provided feature functions. <p> This method first sorts the rules stored at the provided node, then recursively calls itself on the child nodes of the provided node.
private void remove(Element element){ if (this.last == element) { this.last=element.prev; } element.prev.next=element.next; element.next.prev=element.prev; element.obj=null; this.size--; }
Removes the element from the list. Element must not be root.
public void handleRegionCreateEvent(SystemMemberRegionEvent event){ String memberId=event.getMemberId(); SystemMemberJmx systemMemberJmx=(SystemMemberJmx)findCacheOrAppVmById(memberId); if (systemMemberJmx != null) { systemMemberJmx.handleRegionCreate(event); } }
Finds the member as per details in the given event object and passes on this event for handling the region creation.
public void addYears(final int years){ setMillis(getChronology().years().add(getMillis(),years)); }
Add a number of years to the date.
public boolean isSystemTimeNotLockedToExternalReference(){ return mMessage.get(SYSTEM_TIME_NOT_LOCKED_TO_EXTERNAL_REFERENCE); }
System Time not locked to external time reference indicator
public boolean isValidName(String name){ return name != null && VALID_ACCOUNT_NAME.matcher(name).matches(); }
Validate name, if it doesn't contain illegal characters
public Vertex search(Vertex source,Vertex variable){ for (int index=this.contextStack.size() - 1; index >= 0; index--) { Vertex context=variable.getNetwork().findById(this.contextStack.get(index)); if ((context != null) && (!context.hasRelationship(Primitive.VARIABLE)) && (variable.matches(context,new HashMap...
Self API Return the first element on the stack matching the variable.
public void endElement(String name) throws IOException { if (name == null) { throw new NullPointerException(MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID,"name")); } dontEscape=false; if (closeStart) { boolean isEmptyElement=HtmlUtils.isEmptyElement(name); if (...
<p>Write the end of an element. This method will first close any open element created by a call to <code>startElement()</code>.
public Object runSafely(Catbert.FastStack stack) throws Exception { boolean b=evalBool(stack.pop()); Agent a=(Agent)stack.pop(); if (Permissions.hasPermission(Permissions.PERMISSION_RECORDINGSCHEDULE,stack.getUIMgr()) && Permissions.hasPermission(Permissions.PERMISSION_CONVERSION,stack.getUIMgr())) Carny.getIns...
Sets whether or not SageTV should delete the original file after doing an automatic conversion for this Favorite
@Override public int read() throws IOException { if (this.closed) { throw new IOException("Attempted read from closed stream."); } if (this.pos >= this.contentLength) { return -1; } this.pos++; return this.wrappedStream.read(); }
Read the next byte from the stream
private File findFirstFile(Context context,Cursor cs){ long first=cs.getLong(cs.getColumnIndex(DatabaseManager.ROLL_COLUMN_FIRST_SERIAL)); int numimages=cs.getInt(cs.getColumnIndex(DatabaseManager.ROLL_COLUMN_NUM_IMAGES)); for (long i=first; i < (first + numimages); i++) { String filename=String.format("%08d....
Find the first (readable) file belonging to the roll that the cursor points to.