code
stringlengths
10
174k
nl
stringlengths
3
129k
public boolean visitTopLevelInstruction(ElemTemplateElement elem){ return true; }
Visit an XSLT top-level instruction.
public boolean removeEntry(Entry e,int dataSetIndex){ if (e == null || dataSetIndex >= mDataSets.size()) return false; boolean removed=mDataSets.get(dataSetIndex).removeEntry(e.getXIndex()); if (removed) { float val=e.getVal(); mYValCount-=1; mYValueSum-=val; calcMinMax(mLastStart,mLastEnd); }...
Removes the given Entry object from the DataSet at the specified index.
public static String escape(String raw){ return escapeAndShorten(raw,-1); }
Simple HTML escaping. Escapes < & and > and leaves the rest as it is.
public boolean executeKeyEvent(KeyEvent event){ mTempRect.setEmpty(); if (!canScroll()) { if (isFocused()) { View currentFocused=findFocus(); if (currentFocused == this) currentFocused=null; View nextFocused=FocusFinder.getInstance().findNextFocus(this,currentFocused,View.FOCUS_DOWN); ...
You can call this function yourself to have the scroll view perform scrolling from a key event, just as if the event had been dispatched to it by the view hierarchy.
public String globalInfo(){ return " A SplitEvaluator that produces results for a classification " + "scheme on a nominal class attribute."; }
Returns a string describing this split evaluator
public static <T>T[] sort(T[] self){ Arrays.sort(self,new NumberAwareComparator<T>()); return self; }
Modifies this array so that its elements are in sorted order. The array items are assumed to be comparable.
public static void load(String args[],Frame frame){ try { Platforms.set(new DesktopPlatform()); if (JavaVersionNotice.upgradeRequired(VersionUtils.getJavaVersion())) { hideSplash(frame); JavaVersionNotice.showUpgradeRequiredDialog(); } System.out.println("FrostWire version " + FrostWireUti...
Creates an <tt>Initializer</tt> instance that constructs the necessary classes for the application. <p/> <p>Invoked by com.limegroup.gnutella.gui.Main by reflection.
public CompiledST defineTemplate(String templateName,String template){ if (templateName.charAt(0) != '/') templateName="/" + templateName; try { CompiledST impl=defineTemplate(templateName,new CommonToken(GroupParser.ID,templateName),null,template,null); return impl; } catch ( STException se) { } ...
for testing
public Response evaluateCompatibility(){ if (!(info.getSdkVersion() >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) && info.isRooted()) { return Response.INCOMPATIBLE; } else if (info.getSdkVersion() < android.os.Build.VERSION_CODES.JELLY_BEAN) { return Response.INCOMPATIBLE_OS; } else if ...
Returns true if the device is compatible to run the agent.
public boolean isDown(){ return ((flags & BUTTON_DOWN) != 0); }
Gets the down attribute of the ButtonRecord object
private static boolean contains(String value,int start,int length,String criteria1,String criteria2,String criteria3,String criteria4,String criteria5,String criteria6){ return contains(value,start,length,new String[]{criteria1,criteria2,criteria3,criteria4,criteria5,criteria6}); }
Shortcut method with 6 criteria
public static void closeQuietly(ResultSet rs){ if (rs == null) { return; } try { rs.close(); } catch ( SQLException ex) { } }
Helper method to quietly close resultsets.
public void go(OutputStream out) throws IOException { go(new JCardWriter(out,wrapInArray())); }
Writes the jCards to an output stream.
public void mutableAdd(double c,Vec x_t,final List<Double> qi){ if (c == 0) return; normGood=false; double y_t=c; final double k_tt=k.eval(0,0,Arrays.asList(x_t),qi); if (budgetStrategy == BudgetStrategy.PROJECTION) { if (K == null) { KExpanded=new DenseMatrix(16,16); K=new SubMatrix(KExpand...
Alters this point to contain the given input vector as well
public static String indent(String... text){ return tab + String.join(nl(),text).replaceAll("\\r?\\n",nl + tab); }
Indents one level after each new-line-character as defined by <code>nl()</code>. f multiple strings are specified, new-line characters will be added between them.
@Deprecated public NinePatchDrawable(NinePatch patch){ this(new NinePatchState(patch,new Rect()),null); }
Create drawable from existing nine-patch, not dealing with density.
public FDBigInteger leftShift(int shift){ if (shift == 0 || nWords == 0) { return this; } int wordcount=shift >> 5; int bitcount=shift & 0x1f; if (this.isImmutable) { if (bitcount == 0) { return new FDBigInteger(Arrays.copyOf(data,nWords),offset + wordcount); } else { int anticount=32...
Shifts this <code>FDBigInteger</code> to the left. The shift is performed in-place unless the <code>FDBigInteger</code> is immutable in which case a new instance of <code>FDBigInteger</code> is returned.
public TreeNode parseXMLDocument(String uri,InputStream is) throws JasperException { return parseXMLDocument(uri,new InputSource(is),false); }
Parse the specified XML document, and return a <code>TreeNode</code> that corresponds to the root node of the document tree.
private void sendPasswordRequirementsChanged(){ Intent changedIntent=new Intent(DeviceAdminReceiver.ACTION_PASSWORD_REQUIREMENTS_CHANGED); changedIntent.setComponent(getAdmin()); getActivity().sendBroadcast(changedIntent); }
Notify the admin receiver that something about the password has changed - in this context, a minimum password requirement policy. This has to be sent manually because the system server only sends broadcasts for changes to the actual password, not any of the constraints related it it. <p>May trigger a show/hide of the n...
public TimerControlButtonPanel(){ }
Make sure the RealTimeHandler gets set at some point.
public static void main(final String[] args){ DOMTestCase.doMain(nodegetownerdocument.class,args); }
Runs this test from the command line.
private void saveAccount(){ Log.d(TAG,"Saving account name... " + mChosenAccountName); SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(getActivity()); sp.edit().putString(ACCOUNT_KEY,mChosenAccountName).commit(); }
Save account in preferences for future usages
public static boolean contains(Object[] self,Object value){ for ( Object next : self) { if (DefaultTypeTransformation.compareEqual(value,next)) return true; } return false; }
Checks whether the array contains the given value.
public static void deleteSectionComment(final SQLProvider provider,final int moduleId,final int sectionId,final Integer commentId,final Integer userId) throws CouldntDeleteException { Preconditions.checkArgument(moduleId > 0,"Error: module id must be greater then zero"); Preconditions.checkArgument(sectionId >= 0,"...
This function deletes a section comment associated with the given section from the database.
void sendUdpData(String graphiteEvent){ Socket socket=null; try { socket=sendDataOverSocket(graphiteEvent); } catch ( IOException ex) { utils.logIssue("Error sending graphite event [" + graphiteEvent + "] to ["+ host+ ":"+ port+ "].",ex); } finally { closeSocket(socket); } }
Send data to Graphite server.
Item newMethod(final String owner,final String name,final String desc){ key3.set(METH,owner,name,desc); Item result=get(key3); if (result == null) { put122(METH,newClass(owner).index,newNameType(name,desc).index); result=new Item(index++,key3); put(result); } return result; }
Adds a method reference to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item.
public VisiblePredicate(){ super(VisualItem.VISIBLE); }
Create a new VisiblePredicate.
public static void sleep(long milliseconds){ try { Thread.sleep(milliseconds); } catch ( InterruptedException e) { Log.e(TAG,"Unable to sleep " + milliseconds,e); } }
Waits n milliseconds.
public void transformValues(TFloatFunction function){ for (int i=_pos; i-- > 0; ) { _data[i]=function.execute(_data[i]); } }
Transform each value in the list using the specified function.
public static String formatLimitQuery(String query,BasicSQL.OffsetInclusion offset,DBType dbType){ int fakeOffset; if (offset.equals(BasicSQL.OffsetInclusion.INCLUDE_OFFSET)) { fakeOffset=1; } else { fakeOffset=0; } return internalLimitQuery(query,1,fakeOffset,new ArrayList<Object>(),dbType); }
Creates a query string for a limit query, but does not set the varbinds. To use this, you will have to pass your varbinds through a limitQuery call. query with a limitQuery call. This decoupling of the query creating and the varbinds allows for the registration of limit queries. This method has NoOffset in the name be...
public ViewHolderFactoryResolver(){ this(0); }
Create with an offset of 0.
public DigestURL(final String url) throws MalformedURLException { super(url); this.hash=null; }
DigestURI from URI string
public void dragGestureChanged(DragSourceDragEvent dsde){ System.out.println("[Source] dragGestureChanged"); changeCursor(dsde.getDragSourceContext(),dsde.getUserAction() & dsde.getDropAction()); dropAction=dsde.getUserAction() & dsde.getDropAction(); System.out.println("dropAction = " + dropAction); }
as the operation changes
protected final void LONG_SHL(Instruction s,Operand result,Operand val1,Operand val2,boolean maskWith3f){ if (!val2.isIntConstant()) { Binary.mutate(s,LONG_SHL,result.asRegister(),val1,val2); EMIT(s); } else if (result.isRegister()) { int shift=val2.asIntConstant().value; Register lhsReg=result.a...
Expansion of LONG_SHL
public static float[] checkArrayElementsInRange(float[] value,float lower,float upper,String valueName){ checkNotNull(value,valueName + " must not be null"); for (int i=0; i < value.length; ++i) { float v=value[i]; if (Float.isNaN(v)) { throw new IllegalArgumentException(valueName + "[" + i+ "] must n...
Ensures that all elements in the argument floating point array are within the inclusive range <p>While this can be used to range check against +/- infinity, note that all NaN numbers will always be out of range.</p>
@Override public Object[] filter(Viewer viewer,Object parent,Object[] elements){ List<Object> out=new ArrayList<>(); for ( Object element : elements) { if (select(viewer,parent,element)) { out.add(element); } else { if (element instanceof InvocationSequenceData) { InvocationSequenceDat...
The filtering method which tries to push up the child elements if a parent element has to be filtered out.
public Object addDesignation(Object entity,String uri) throws RepositoryException { return addDesignations(entity,getValueFactory().createURI(uri)); }
Explicitly adds the type to the entity.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:30:52.191 -0500",hash_original_method="6C42916FD841C6EAFF0C495955BCFCAE",hash_generated_method="3CD52E527983D594DC6FD8A7ED8202B5") synchronized void maybeRemoveState(Activity activity,NfcActivityState state){ if (state.ndefMessage ==...
If the NfcActivityState is empty then remove it, and detach it from the Activity.
public int fontSize(){ return 0; }
Default font size to use is ok.
Map.Entry<K,V> doRemoveFirstEntry(){ for (; ; ) { Node<K,V> b=head.node; Node<K,V> n=b.next; if (n == null) return null; Node<K,V> f=n.next; if (n != b.next) continue; Object v=n.value; if (v == null) { n.helpDelete(b,f); continue; } if (!n.casValue(v,null)) ...
Removes first entry; returns its snapshot.
public void addDropItem(final Item item){ dropItemInstances.add(item); }
adds a specific item to the List of Items that will be dropped on dead with 100 % probability. this is always for that specific creature only.
OpenBook(PageFormat format,Printable painter){ mFormat=format; mPainter=painter; }
Create a Pageable with an unknown number of pages where every page shares the same format and Printable.
@Override public boolean matches(String path){ if (path == null) { return false; } for ( FileMatcher reject : rejectList) { if (reject.matches(path)) { return false; } } if (acceptList.length == 0) { return true; } for ( FileMatcher accept : acceptList) { if (accept.matches(pat...
a path matches this series only if: - it is not null - it does not match any in the reject list - it matches at least one in the accept list note this behavior is slightly different than the SocketMatcherSeries.match. here reject overrides accept; for sockets accept will override reject.
public final double doOperation(){ int numNodes=treeModel.getNodeCount(); double logHastingRatio=0; double chooseOperator=Math.random(); int K_int=(int)K.getParameterValue(0); int selectedI=-1; double[] logNumeratorProb=new double[numNodes]; int isOn=0; int I_selected=-1; while (isOn == 0) { I_sel...
change the parameter and return the log hastings ratio.
public void addObservations(int states[][]){ int rows=states.length; int columns=states[0].length; if (rows - k - (k - 1) <= 0) { return; } observations+=(rows - k - (k - 1)) * columns; int[] prevVal=new int[columns]; int[] nextVal=new int[columns]; for (int c=0; c < columns; c++) { prevVal[c]=0...
Add observations in to our estimates of the pdfs. This call suitable only for homogeneous agents, as all agents will contribute to single pdfs.
public byte[] readCountedString() throws WireParseException { require(1); int len=array[pos++] & 0xFF; return readByteArray(len); }
Reads a counted string from the stream. A counted string is a one byte value indicating string length, followed by bytes of data.
public void stop() throws CastException, TransientNetworkDisconnectionException, NoConnectionException { stop(null); }
Stops the playback of media/stream
public Topic(String name,ConsumerConnector consumerConnector,int numStreams){ this(name,consumerConnector,numStreams,new LinkedBlockingQueue<String>(MAX_BUFFER_SIZE)); }
Creates a new Topic object.
public GTextField(AbstractFormatter format){ super(format); this.setHorizontalAlignment(SwingConstants.RIGHT); }
Creates an instance of GTextField with a default format.
final static void assertPropertyNames(final Map<String,Object> propertySet){ if (propertySet == null) throw new IllegalArgumentException(); final Iterator<String> itr=propertySet.keySet().iterator(); while (itr.hasNext()) { final String col=itr.next(); NameChecker.assertColumnName(col); } }
Validates the column name productions
public <V2>JavaPairRDD<Tuple2<K,V>,V2> joinGeodeRegion(String regionPath){ return joinGeodeRegion(regionPath,rddf.defaultConnectionConf()); }
Return an JavaPairRDD containing all pairs of elements with matching keys in this RDD&lt;K, V> and the Geode `Region&lt;K, V2>`. Each pair of elements will be returned as a ((k, v), v2) tuple, where (k, v) is in this RDD and (k, v2) is in the Geode region.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-03-24 16:07:27.610 -0400",hash_original_method="73B8AD9875B828074FB8FD23336E0644",hash_generated_method="E233A70058E71C3276865825FB30D958") private List<ResolveInfo> findGlobalSearchActivities(){ Intent intent=new Intent(SearchManager.INTENT_...
Returns a sorted list of installed search providers as per the following heuristics: (a) System apps are given priority over non system apps. (b) Among system apps and non system apps, the relative ordering is defined by their declared priority.
public Help(Frame frame,String title,String helpHtml){ super(frame,title,false); try { jbInit(); info.setContentType("text/html"); info.setEditable(false); info.setBackground(AdempierePLAF.getFieldBackground_Inactive()); info.setText(helpHtml); } catch ( Exception ex) { log.log(Level.SEV...
Help System
public T allocate(){ T value=_freeRing.allocate(); if (value != null) { return value; } return _freeRingSoft.allocate(); }
Try to get an object from the free list. Returns null if the free list is empty.
public static Integer[] allPossiblePolynomials(){ List<Integer> result=new ArrayList<Integer>(); for (int i=0; i < FIELD_SIZE; i++) { try { generateLogTable(i); result.add(i); } catch ( RuntimeException e) { } } return result.toArray(new Integer[result.size()]); }
Returns a list of all polynomials that can be used to generate the field. This is never used in the code; it's just here for completeness.
public Message(String name,Object source,long when){ super(source); this.name=name; this.when=when; }
Create a message, with a timestamp.
public List<RichTranslation<IString,String>> decode(Sequence<IString> source,int sourceInputId,int threadId){ final InputProperties inputProps=inputPropertiesList != null && sourceInputId < inputPropertiesList.size() ? inputPropertiesList.get(sourceInputId) : new InputProperties(); final List<Sequence<IString>> tar...
Decode a tokenized input string. Returns an n-best list of translations as specified by the decoders <code>nbestListSize</code> parameter. NOTE: This call is threadsafe.
public void readState(DataInputStream stream) throws IOException { int len=mt.length; for (int x=0; x < len; x++) mt[x]=stream.readInt(); len=mag01.length; for (int x=0; x < len; x++) mag01[x]=stream.readInt(); mti=stream.readInt(); __nextNextGaussian=stream.readDouble(); __haveNextNextGaussian=stream...
Reads the entire state of the MersenneTwister RNG from the stream
public static ArrayList<Object> deleteItemSets(ArrayList<Object> itemSets,int minSupport,int maxSupport){ ArrayList<Object> newVector=new ArrayList<Object>(itemSets.size()); for (int i=0; i < itemSets.size(); i++) { LabeledItemSet current=(LabeledItemSet)itemSets.get(i); if ((current.m_ruleSupCounter >= min...
Deletes all item sets that don't have minimum support and have more than maximum support
private void lazyInit(){ if (tokenizer == null) { if (streamabilityViolationPolicy == XmlViolationPolicy.ALLOW) { this.saxTreeBuilder=new SAXTreeBuilder(); this.treeBuilder=this.saxTreeBuilder; this.saxStreamer=null; this.tokenizer=new Driver(treeBuilder,true); } else { this.sax...
This class wraps differnt tree builders depending on configuration. This method does the work of hiding this from the user of the class.
public static Patch<String> parseUnifiedDiff(List<String> diff){ boolean inPrelude=true; List<String[]> rawChunk=new ArrayList<String[]>(); Patch<String> patch=new Patch<String>(); int old_ln=0, new_ln=0; String tag; String rest; for ( String line : diff) { if (inPrelude) { if (line.startsWith(...
Parse the given text in unified format and creates the list of deltas for it.
private static int calculateNumberOfRows(int m,int k,int c){ int r=((m + 1 + k) / c) + 1; if (c * r >= (m + 1 + k+ c)) { r--; } return r; }
Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E).
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
public static boolean matches(CharSequence self,Pattern pattern){ return pattern.matcher(self).matches(); }
Tells whether or not a CharSequence matches the given compiled regular expression Pattern.
public static double tan(double x){ boolean negative=false; int quadrant=0; double xa=x; if (x < 0) { negative=true; xa=-xa; } if (xa == 0.0) { long bits=Double.doubleToRawLongBits(x); if (bits < 0) { return -0.0; } return 0.0; } if (xa != xa || xa == Double.POSITIVE_INFINI...
Tangent function.
@Override protected void createCandidates(Response response){ createRelayedCandidate(response); }
Creates new <tt>Candidate</tt>s determined by a specific STUN <tt>Response</tt>.
@SafeVarargs public static <T>Source<T> combineWithValues(Source<T> source,T... values){ return ntimesThen(values.length,Arbitrary.sequence(java.util.Arrays.asList(values)),source); }
Creates a Source that is guaranteed to produces the supplied values at least once. If a property is falsified by one of the supplied values then shrunk values will be selected from those specifically supplied only.
@SuppressLint("GetInstance") public ObfuscatingSecretKeyWrapper(Context context,int saltIndex,SaltGenerator saltGenerator,String presharedSecret) throws NoSuchPaddingException, NoSuchAlgorithmException { mContext=context.getApplicationContext(); mSaltIndex=saltIndex; mSaltGenerator=saltGenerator; mPresharedSecr...
Create a new instance of an Obfuscating SecretKey Wrapper.
public static void performSlice(Pair<Long,FrameBlock> in,IndexRange ixrange,int brlen,int bclen,ArrayList<Pair<Long,FrameBlock>> outlist) throws DMLRuntimeException { long index=in.getKey(); FrameBlock block=in.getValue(); long cellIndexTopRow=index; long cellIndexBottomRow=index + block.getNumRows() - 1; lon...
This function will get slice of the input frame block overlapping in overall slice(Range), slice has requested for.
protected int read(){ int curByte=0; try { curByte=in.read(); } catch ( IOException e) { status=STATUS_FORMAT_ERROR; } return curByte; }
Reads a single byte from the input stream.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:37.910 -0500",hash_original_method="7B881B99117D66C1BDF145A59ABEA2E4",hash_generated_method="6D4D21FFADBEBA8B3BCD864B371D97DD") public final SIPRequest createErrorAck(To responseToHeader) throws SipException, ParseException { SIPR...
Creates an ACK for non-2xx responses according to RFC3261 17.1.1.3
public static void main(String args[]){ List<String> files=new ArrayList<String>(); files.addAll(Arrays.asList(args)); System.out.println(); System.out.println("jflex:\n" + execJFlex(new ArrayList<String>(),files)); try { System.out.println("class:\n" + execClass("jflextest.Main",".",new ArrayList<String>...
for testing
public float loadFloat(){ if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); return 0; }
Loads a float from the memory location pointed to by the current instance.
@SuppressWarnings("rawtypes") public static Map<String,Object> encodeToMap(LoggingEvent loggingEvent,boolean includeLocationInfo){ Map<String,Object> logstashEvent=new LoggingEventMap(); String threadName=loggingEvent.getThreadName(); long timestamp=loggingEvent.getTimeStamp(); HashMap<String,Object> exceptionI...
Encodes a LoggingEvent into a HashMap using the logstash JSON format.
public void hideClings(){ for (int i=0; i < mClingMap.size(); i++) { mClingMap.valueAt(i).setVisibility(View.INVISIBLE); } }
Sets all the clings to be invisible.
public MaterialEditText underlineColor(int color){ mUnderlineColor=color; mEditText.getBackground().setColorFilter(mUnderlineColor,PorterDuff.Mode.SRC_ATOP); if (!mExpand) { mEditTextLayout.setBackgroundColor(mUnderlineColor); } return this; }
Set the underline color of editText
static void enableShutdownHooks(){ }
This is used by Runtime.addshutdownHook(). TODO: I don't THINK there's anything we need to do for this, but we should look it over more carefully. Perhaps we want to add something so that we will try to run the hooks in case of an abnormal exit (such a control-C)?
@Override public void commence(HttpServletRequest request,HttpServletResponse response,AuthenticationException arg2) throws IOException, ServletException { log.debug("Pre-authenticated entry point called. Rejecting access"); response.sendError(HttpServletResponse.SC_UNAUTHORIZED,"Access Denied"); }
Always returns a 401 error code to the client.
public SerializationException(final Throwable cause){ super(cause); }
Creates a new serialization exception.
private static double distance(double[] pointA,double[] pointB){ double distance=0.0; for (int i=0; i < pointA.length; i++) { double d=pointA[i] - pointB[i]; distance+=d * d; } return Math.sqrt(distance); }
Distance between two vectors.
@Benchmark public void escapedUnderscoreCoding(){ run(); }
Escaped underscore encoding, can encode any Java identifier.
public boolean isDataFlavorSupported(DataFlavor flavor){ for ( DataFlavor flavor2 : flavors) { if (flavor2.equals(flavor)) { return true; } } return false; }
Returns whether the requested flavor is supported by this Transferable.
protected void drawYLabels(Canvas c,float fixedPosition,float[] positions,float offset){ for (int i=0; i < mYAxis.mEntryCount; i++) { String text=mYAxis.getFormattedLabel(i); if (!mYAxis.isDrawTopYLabelEntryEnabled() && i >= mYAxis.mEntryCount - 1) return; c.drawText(text,fixedPosition,positions[i * 2...
draws the y-labels on the specified x-position
public static Object detectLinuxDefaultFileBrowser(Map<String,Object> fileBrowsers){ ArrayList<String> command=new ArrayList<String>(); command.add("xdg-mime"); command.add("query"); command.add("default"); command.add("inode/directory"); if (fileBrowsers == null) { fileBrowsers=new HashMap<String,Objec...
detects programs from $DESKTOP_SESSION
@Override public TaskBulkRep queryBulkResourceReps(List<URI> ids){ Iterator<Task> _dbIterator=_dbClient.queryIterativeObjects(getResourceClass(),ids); return new TaskBulkRep(BulkList.wrapping(_dbIterator,MapTask.getInstance())); }
Retrieve task representations based on input ids.
private void initialize(){ Log.d(TAG,"initialize()"); this.setOrientation(LinearLayout.HORIZONTAL); if (_icon == null) { _icon=new ImageView(this.getContext()); _icon.setLayoutParams(new LayoutParams(0,LayoutParams.MATCH_PARENT,ICON_WEIGHT)); _icon.setScaleType(ImageView.ScaleType.CENTER_INSIDE); ...
Initializes the Icon and TextEdit.
public EventFilter clone(){ EventFilter result=new EventFilter(); if (SelectClauses != null) { result.SelectClauses=new SimpleAttributeOperand[SelectClauses.length]; for (int i=0; i < SelectClauses.length; i++) result.SelectClauses[i]=SelectClauses[i].clone(); } result.WhereClause=WhereClause == nul...
Deep clone
public AreaRenderer(){ super(); this.endType=AreaRendererEndType.TAPER; setBaseLegendShape(new Rectangle2D.Double(-4.0,-4.0,8.0,8.0)); }
Creates a new renderer.
@Override public void injectedScore(String url,WebPage row) throws ScoringFilterException { for ( ScoringFilter filter : filters) { filter.injectedScore(url,row); } }
Calculate a new initial score, used when injecting new pages.
public DisposableArray(final int capacity){ super(capacity); }
Creates an ordered array with the specified capacity.
public void copy(Object src,Object dst){ cmdLine.copy(getProject().file(src),getProject().file(dst)); }
Removes the given file or directory.
@Transactional public RevisionPetition createRevisionPetition(RevisionPetition objection){ if (objection.getId() == null) objection=persist(objection); else objection=merge(objection); return objection; }
Create revision petition
@Deprecated public static void add(String name,double amount) throws UserDoesNotExistException, NoLoanPermittedException { try { add(name,BigDecimal.valueOf(amount)); } catch ( ArithmeticException e) { logger.log(Level.WARNING,"Failed to add " + amount + " to balance of "+ name+ ": "+ e.getMessage(),e); ...
Adds money to the balance of a user
public void addListener(UpdateListener listener){ if (listener == null) { throw new IllegalArgumentException("Null listener reference supplied"); } if (isDestroyed()) { throw new IllegalStateException("Statement is in destroyed state"); } statementListenerSet.addListener(listener); statementContext....
Add a listener to the statement.
public void destroy(ServletContext sc){ FACES_CONFIG_PROCESSOR_CHAIN.destroy(sc); initializedContexts.remove(sc); }
<p> This method will remove any information about the application. </p>
public long readLock(){ long s=state, next; return ((whead == wtail && (s & ABITS) < RFULL && U.compareAndSwapLong(this,STATE,s,next=s + RUNIT)) ? next : acquireRead(false,0L)); }
Non-exclusively acquires the lock, blocking if necessary until available.
public void execute(TransformerImpl transformer) throws TransformerException { if (transformer.currentTemplateRuleIsNull()) { transformer.getMsgMgr().error(this,XSLTErrorResources.ER_NO_APPLY_IMPORT_IN_FOR_EACH); } int sourceNode=transformer.getXPathContext().getCurrentNode(); if (DTM.NULL != sourceNode) { ...
Execute the xsl:apply-imports transformation.
public static String fileNameClean(String s){ char[] chars=s.toCharArray(); StringBuffer sb=new StringBuffer(); for (int i=0; i < chars.length; i++) { char c=chars[i]; if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9')|| (c == '_')) { sb.append(c); } else { if ...
Returns a "clean" version of the given filename in which spaces have been converted to dashes and all non-alphaneumeric chars are underscores.
protected POInfo initPO(Properties ctx){ POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName()); return poi; }
Load Meta Data
public PartialCorrelationPdf(int n,int k){ this.n=n; this.k=k; double gammaRatio=gammaRatio(n,k); this.constant=(1 / Math.pow(Math.PI,0.5)) * gammaRatio; this.outsideExp=(double)(n - k - 2) / 2.0; }
Constructs a new zero partial correlation distribution function with the given values for n and k.