code
stringlengths
10
174k
nl
stringlengths
3
129k
public String convertValueToText(Object value,boolean selected,boolean expanded,boolean leaf,int row,boolean hasFocus){ if (value != null) { String sValue=value.toString(); if (sValue != null) { return sValue; } } return ""; }
Called by the renderers to convert the specified value to text. This implementation returns <code>value.toString</code>, ignoring all other arguments. To control the conversion, subclass this method and use any of the arguments you need.
public NormalViewAction(final VisionWorld visionWorld){ super("Normal view"); if (visionWorld == null) { throw new IllegalArgumentException("visionWorld must not be null"); } putValue(SMALL_ICON,ResourceManager.getImageIcon("grid.png")); this.visionWorld=visionWorld; }
Create a new normal view action.
public static boolean putInt(Context context,String key,int value){ SharedPreferences settings=context.getSharedPreferences(PREFERENCE_NAME,Context.MODE_PRIVATE); SharedPreferences.Editor editor=settings.edit(); editor.putInt(key,value); return editor.commit(); }
put int preferences
private String consumeTokenString() throws JsonParserException { reusableBuffer.setLength(0); while (true) { char c=stringChar(); switch (c) { case '\"': return reusableBuffer.toString(); case '\\': int escape=advanceChar(); switch (escape) { case -1: throw createParseException(null,"EOF encounter...
Steps through to the end of the current string token (the unescaped double quote).
private void createForecastRunDetail(MPPForecastRunMaster master,MPPPeriod period){ MPPForecastRunDetail forecastRunDetail=new MPPForecastRunDetail(getCtx(),0,get_TrxName()); forecastRunDetail.setPP_ForecastRun_ID(m_run.get_ID()); forecastRunDetail.setPP_ForecastRunMaster_ID(master.getPP_ForecastRunMaster_ID()); ...
Create Forecast Detail based on sales history
public final int skipBytes(int n) throws IOException { int total=0; int cur=0; while ((total < n) && ((cur=(int)in.skip(n - total)) > 0)) { total+=cur; } return total; }
See the general contract of the <code>skipBytes</code> method of <code>DataInput</code>. <p> Bytes for this operation are read from the contained input stream.
@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
Returns a clone of the renderer.
public ParticleString2D(VerletPhysics2D physics,List<VerletParticle2D> plist,float strength){ this.physics=physics; particles=new ArrayList<VerletParticle2D>(plist); links=new ArrayList<VerletSpring2D>(particles.size() - 1); VerletParticle2D prev=null; for ( VerletParticle2D p : particles) { physics.addP...
Takes a list of already created particles connects them into a continuous string using springs.
protected static void execute(ReviewDb db,String sql) throws SQLException { try (Statement s=newStatement(db)){ s.execute(sql); } }
Execute an SQL statement.
public ErrorDialog(final String message){ this(); body.add(new Label(message)); }
Create a dialog box to show a single message string.
@Override protected void copyStatement(final RyaStatement rstmt,final Context context) throws IOException, InterruptedException { try { childDao.add(rstmt); cachedStatements++; } catch ( final RyaDAOException e) { throw new IOException("Error serializing RyaStatement",e); } if (cachedStatements >=...
Add a statement to an in-memory Accumulo instance, serialized as spo/pos/osp and any applicable secondary indexes, and flush the in-memory rows through to the output if enough statements have been cached.
protected int generateBinomial(int n,double p){ final double C1_3=0.33333333333333333; final double C5_8=0.62500000000000000; final double C1_6=0.16666666666666667; final int DMAX_KM=20; int bh, i, K, Km, nK; double f, rm, U, V, X, T, E; if (n != n_last || p != p_last) { n_last=n; p_last=p; pa...
* Binomial-Distribution - Acceptance Rejection/Inversion * * Acceptance Rejection method combined with Inversion for generating Binomial random numbers with parameters n (number of trials) and p (probability of success). For min(n*p,n*(1-p)) < 10 the Inversion method is applied: ...
public void initFromFile(String vectorFile) throws IOException { CloseableVectorStore vectorReaderDisk=VectorStoreReader.openVectorStore(vectorFile,flagConfig); Enumeration<ObjectVector> vectorEnumeration=vectorReaderDisk.getAllVectors(); logger.fine("Reading vectors from store on disk into memory cache ..."); ...
Initializes a vector store from disk.
public Collection<? extends Element> generateMultiple(Element parent,ElementMetadata<?,?> parentMetadata,ElementMetadata<?,?> metadata){ Preconditions.checkState(path.selectsElement(),"An attribute path cannot be used to generate elements."); Collection<? extends Element> elements=getFinalElements(path,parent); i...
Generate multiple elements based on this path. This only allows a single multiple cardinality element in the path, but that multiple cardinality element can be anywhere in the path. Once found we only follow single cardinality children after that point. cardinality along the path.
private double createEndTime(double minTime,double maxTime){ double r=Math.random(); return minTime + r * (maxTime - minTime); }
creates an uniformly distributed activity end time in the given time interval
public Image addImage(String location,Image image){ if (m_maxImageWidth > -1 || m_maxImageHeight > -1) { image=getScaledImage(image); image.getWidth(null); } imageCache.put(location,image); return image; }
Adds an image associated with a location string to this factory's cache. The image will be scaled as dictated by this current factory settings.
protected boolean beforeSave(boolean newRecord){ if (LINETYPE_SegmentValue.equals(getLineType())) { if (getCalculationType() != null) setCalculationType(null); if (getOper_1_ID() != 0) setOper_1_ID(0); if (getOper_2_ID() != 0) setOper_2_ID(0); } return true; }
Before Save
@Override public boolean init(String instance,String cfgFileName){ this.instancename=instance; File instanceCfgFile=new File(cfgFileName); if (instanceCfgFile.exists()) { try { this.localcfg=new SchemaConfiguration(instanceCfgFile); } catch ( IOException ex) { ConcurrentLog.config(this.ins...
Inits the connector with the remote field names and matches to yacy schema and other specific settings from config file. Every connector needs at least a query target (where to query) and some definition to convert the remote serch result to the internal result presentation (field mapping)
protected void resetStickyFooterSelection(){ if (mStickyFooterView instanceof LinearLayout) { for (int i=0; i < (mStickyFooterView).getChildCount(); i++) { (mStickyFooterView).getChildAt(i).setActivated(false); (mStickyFooterView).getChildAt(i).setSelected(false); } } }
simple helper method to reset the selection of the sticky footer
private double cdfSlow(int k){ if (k < 0) throw new IllegalArgumentException(); double sum=0.0; for (int r=0; r <= k; r++) sum+=pdf(r); return sum; }
Returns the cumulative distribution function.
public ViPRCatalogClient2 withLogin(String username,String password){ auth().login(username,password); return this; }
Performs an authentication login and returns the updated client.
public void processOffensive(Vertex input,Vertex speaker,Vertex target,Vertex conversation,Network network){ Vertex originalQuestion=null; Vertex originalQuestionInput=null; if (target != null) { originalQuestionInput=getLastInputInConversation(conversation,speaker,2); if (originalQuestionInput != null) {...
Process a offensive response. Remove the sentence.
protected boolean beforeSave(boolean newRecord){ if (getAD_Org_ID() != 0) setAD_Org_ID(0); return true; }
Before Save
public static boolean isWindows(){ return System.getProperty("os.name").contains("Windows"); }
True if this JVM is running on Windows.
public void render(Graphics g){ byte[] imageData=getRrdGraphInfo().getBytes(); ImageIcon image=new ImageIcon(imageData); image.paintIcon(null,g,0,0); }
Renders this graph onto graphing device
public HistoryEntry createHistoryEntry(){ HistoryEntryImpl historyEntry=new HistoryEntryImpl(); return historyEntry; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public WhereBuilder and(String columnName,String op,Object value){ appendCondition(whereItems.size() == 0 ? null : "AND",columnName,op,value); return this; }
add AND condition
private synchronized void removeEdge(final int src,final int tgt){ if (src == tgt) { throw new IllegalArgumentException(); } if (!W[src][tgt]) { throw new IllegalStateException("edge does not exist: src=" + src + ", tgt="+ tgt); } updateClosure(src,tgt,false); W[src][tgt]=false; outbound[src]--; ...
Package private method removes an edge and updates the path count matrix and the inbound and outbound edge counts for the source and target vertices. The described edge must exist.
private Map<String,UpdateRequestProcessorChain> loadUpdateProcessorChains(){ Map<String,UpdateRequestProcessorChain> map=new HashMap<>(); UpdateRequestProcessorChain def=initPlugins(map,UpdateRequestProcessorChain.class,UpdateRequestProcessorChain.class.getName()); if (def == null) { def=map.get(null); } ...
Load the request processors
public void attach(ViewGroup.LayoutParams layoutParams){ if (systemOverlay) { try { getWindowManager().addView(this,layoutParams); } catch ( SecurityException e) { throw new SecurityException("Your application must have SYSTEM_ALERT_WINDOW " + "permission to create a system window."); } ...
Attaches it to the content view with specified LayoutParams.
public void paintProgressBarBackground(SynthContext context,Graphics g,int x,int y,int w,int h,int orientation){ paintProgressBarBackground(context,g,x,y,w,h); }
Paints the background of a progress bar. This implementation invokes the method of the same name without the orientation.
protected boolean hasOutstandingChanges(){ return (fieldValue.hasChanged() || fieldName.hasChanged() || fProduct_ID.hasChanged()|| fBPartner_ID.hasChanged()); }
Does the parameter panel have outstanding changes that have not been used in a query?
boolean skipObject() throws IOException { int ch=read(); int len; switch (ch) { case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07: case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case ...
Skips over the next object and all its children.
@Override public boolean equals(Object other){ return sameClassAs(other) && equalsTo(getClass().cast(other)); }
Returns true if <code>o</code> is equal to this.
public static void rectangle(double x,double y,double halfWidth,double halfHeight){ if (halfWidth < 0) throw new IllegalArgumentException("half width must be nonnegative"); if (halfHeight < 0) throw new IllegalArgumentException("half height must be nonnegative"); double xs=scaleX(x); double ys=scaleY(y); ...
Draw a rectangle of given half width and half height, centered on (x, y).
public RedshiftDataSource(){ }
Create new instance.
public void addHeaderView(View v){ addHeaderView(v,null,true); }
Add a fixed view to appear at the top of the grid. If addHeaderView is called more than once, the views will appear in the order they were added. Views added using this call can take focus if they want. <p> NOTE: Call this before calling setAdapter. This is so HeaderGridView can wrap the supplied cursor with one that w...
public int enumerate(Thread[] threads,boolean recurse){ return enumerateGeneric(threads,recurse,0,true); }
Copies an array with all Threads which are children of the receiver into the array <code>threads</code> passed as parameter. Children Threads of subgroups are recursively copied as well if parameter <code>recurse</code> is <code>true</code>. If the array passed as parameter is too small no exception is thrown - the ext...
public boolean preGenerate(RealisticBiomeBase biome,World world,Random rand,int chunkX,int chunkY,OpenSimplexNoise simplex,CellNoise cell,float strength,float river,boolean hasPlacedVillageBlocks){ if (this.checkRiver) { if (river > this.maxRiver || river < this.minRiver) { return false; } } return ...
Performs pre-generation checks to determine if the deco is allowed to generate.
@SuppressWarnings("unchecked") public boolean containsKey(Object key){ Segment<K,V> s; HashEntry<K,V>[] tab; int h=hash(key.hashCode()); long u=(((h >>> segmentShift) & segmentMask) << SSHIFT) + SBASE; if ((s=(Segment<K,V>)UNSAFE.getObjectVolatile(segments,u)) != null && (tab=s.table) != null) { for (Hash...
Tests if the specified object is a key in this table.
protected void decodeBufferPrefix(PushbackInputStream inStream,OutputStream outStream) throws IOException { int c; StringBuffer q=new StringBuffer(32); String r; boolean sawNewLine; sawNewLine=true; while (true) { c=inStream.read(); if (c == -1) { throw new CEFormatException("UUDecoder: No beg...
For uuencoded buffers, the data begins with a line of the form: begin MODE FILENAME This line always starts in column 1.
protected Node copyInto(Node n){ GenericElementNS ge=(GenericElementNS)super.copyInto(n); ge.nodeName=nodeName; return n; }
Copy the fields of the current node into the given node.
protected void updateNgCommand(ILaunchConfiguration configuration){ String command=IExternalToolConstants.EMPTY_STRING; try { command=configuration.getAttribute(AngularCLILaunchConstants.OPERATION,IExternalToolConstants.EMPTY_STRING); } catch ( CoreException ce) { AngularCLIPlugin.logError(ce,"Error whi...
Updates the working directory widgets to match the state of the given launch configuration.
public static GraphNode serializableInstance(){ return new SessionNodeWrapper(SessionNode.serializableInstance()); }
Generates a simple exemplar of this class to test serialization.
private Range<Integer> expandToBreakableRegions(Range<Integer> iRange){ int loTok=iRange.lowerEndpoint(); int hiTok=iRange.upperEndpoint() - 1; if (!partialFormatRanges.contains(loTok) || !partialFormatRanges.contains(hiTok)) { return EMPTY_RANGE; } loTok=partialFormatRanges.rangeContaining(loTok).lowerEn...
Expand a token range to start and end on acceptable boundaries for re-formatting.
private void initMetadata(SwcLibrary swcLibrary,LinkerConfiguration linkerConfiguration){ String[] configMetaData=linkerConfiguration.getMetadataToKeep(); if (configMetaData == null) { return; } if (configMetaData.length > 0) { swcLibrary.addMetadata(Arrays.asList(configMetaData)); } }
init metadata from -keep-as3-metadata option
public Object clone(){ return new LdapName(unparsed,rdns,0,rdns.size()); }
Generates a new copy of this name. Subsequent changes to the components of this name will not affect the new copy, and vice versa.
protected SurfaceData initAcceleratedSurface(){ SurfaceData sData; try { X11GraphicsConfig gc=(X11GraphicsConfig)vImg.getGraphicsConfig(); ColorModel cm=gc.getColorModel(); long drawable=0; if (context instanceof Long) { drawable=((Long)context).longValue(); } sData=X11SurfaceData.crea...
Create a pixmap-based SurfaceData object
public hr addElement(String hashcode,Element element){ addElementToRegistry(hashcode,element); return (this); }
Adds an Element to the element.
@Override public void layersChanged(){ }
Method layersChanged()
public boolean retainEntries(TIntDoubleProcedure procedure){ boolean modified=false; byte[] states=_states; int[] keys=_set; double[] values=_values; for (int i=keys.length; i-- > 0; ) { if (states[i] == FULL && !procedure.execute(keys[i],values[i])) { removeAt(i); modified=true; } } r...
Retains only those entries in the map for which the procedure returns a true value.
public String globalInfo(){ return "Learns a simple linear regression model. " + "Picks the attribute that results in the lowest squared error. " + "Can only deal with numeric attributes."; }
Returns a string describing this classifier
private void parseUnit(Element unitNode,Vector<Entity> list){ NodeList nl=unitNode.getChildNodes(); for (int i=0; i < nl.getLength(); i++) { Node currNode=nl.item(i); if (currNode.getParentNode() != unitNode) { continue; } int nodeType=currNode.getNodeType(); if (nodeType == Node.ELEMENT_N...
Parse a Unit tag. Unit tags will contain a list of Entity tags.
private View fillFromSelection(int selectedTop,int childrenTop,int childrenBottom){ int fadingEdgeLength=getVerticalFadingEdgeLength(); final int selectedPosition=mSelectedPosition; View sel; final int topSelectionPixel=getTopSelectionPixel(childrenTop,fadingEdgeLength,selectedPosition); final int bottomSelec...
Fills the grid based on positioning the new selection at a specific location. The selection may be moved so that it does not intersect the faded edges. The grid is then filled upwards and downwards from there.
@Override int calculateEndBottomBound(float yAxisDelta){ return calculateEndTopBound(yAxisDelta) + getView().getHeight(); }
Calculates the resulting Y coordinate of the view's bottom bound based on the resulting Y coordinate of the view's top bound and the view's height
public boolean distributedJoins(){ return distributedJoins; }
Check if distributed joins are enabled for this query.
public void test_plainLiterals(){ final Literal a=new LiteralImpl("bigdata"); assertEquals(a,roundTrip_tuned(a)); }
Test round trip of some plain literals.
protected void checkSAXVersion(Hashtable h){ if (null == h) h=new Hashtable(); final String SAX_VERSION1_CLASS="org.xml.sax.Parser"; final String SAX_VERSION1_METHOD="parse"; final String SAX_VERSION2_CLASS="org.xml.sax.XMLReader"; final String SAX_VERSION2_METHOD="parse"; final String SAX_VERSION2BETA_CL...
Report version info from SAX interfaces. Currently distinguishes between SAX 2, SAX 2.0beta2, SAX1, and not found.
public static DiffObject autoMerge(){ return new DiffObject(true); }
Create a DiffObject that represents the auto-merge for a merge patch set.
public double slope(){ return beta; }
Returns the slope &beta; of the best of the best-fit line <em>y</em> = &alpha; + &beta; <em>x</em>.
private boolean isPunctuation(final char c){ return ((c == '.') || (c == ',') || (c == '!')|| (c == '?')); }
Evaluates if the passed char is one of . , ! or ? .
public Component createAuthComponent(ActionListener al){ return createLoginComponent(al,null,null,null); }
This method creates a component which can authenticate. You will receive either the authentication key or an Exception object within the ActionListener callback method.
public static void print(StackMapTable smt,PrintWriter writer){ try { new Printer(smt.get(),writer).parse(); } catch ( BadBytecode e) { writer.println(e.getMessage()); } }
Prints the stack table map.
Date toDate(Calendar calendar){ return calendar.getTime(); }
Convert a Calendar to a java.util.Date
public boolean isLoggable(LogRecord record){ if (record.getLevel() == Level.SEVERE || record.getLevel() == Level.WARNING) return true; String loggerName=record.getLoggerName(); if (loggerName != null) { if (loggerName.startsWith("sun.") || loggerName.startsWith("java.awt.") || loggerName.startsWith("javax."...
Loggable - Don't log core java classes
@Override public void copyArea(int x,int y,int width,int height,int dx,int dy){ }
Not implemented
public CoNLLColumnFormatReader(String corpus,String section,String columnFile,String predicateArgumentViewName,TextAnnotationBuilder textAnnotationBuilder) throws Exception { super(CorpusReaderConfigurator.buildResourceManager(corpus)); this.section=section; this.predicateArgumentViewName=predicateArgumentViewNam...
Initialize the reader.
public static synchronized void releaseOut(){ outCnt--; if (outCnt == 0) System.setOut(sysOut); }
Releases standard out. If there are no more acquired standard outs, then it is reset to its original value.
@Override public String addEmrStep(String clusterId,StepConfig emrStepConfig,AwsParamsDto awsParamsDto) throws Exception { List<StepConfig> steps=new ArrayList<>(); steps.add(emrStepConfig); AddJobFlowStepsRequest jobFlowStepRequest=new AddJobFlowStepsRequest(clusterId,steps); List<String> emrStepIds=emrOperati...
Add an EMR Step. This method adds the step to EMR cluster based on the input.
private <T extends DataObject>void queryAndPrintRecord(URI id,Class<T> clazz,DbCliOperation operationType) throws Exception { T object=queryObject(id,clazz); if (object == null) { System.out.println("id: " + id + " [ Deleted ]"); return; } BeanInfo bInfo; try { bInfo=Introspector.getBeanInfo(clazz...
Query for a record with the given id and type, and print the contents in human readable format if query URI list, use queryAndPrintRecords(ids, clazz) method instead.
public static XYDataset extractRowFromHeatMapDataset(HeatMapDataset dataset,int row,Comparable seriesName){ XYSeries series=new XYSeries(seriesName); int cols=dataset.getXSampleCount(); for (int c=0; c < cols; c++) { series.add(dataset.getXValue(c),dataset.getZValue(c,row)); } XYSeriesCollection result=ne...
Returns a dataset containing one series that holds a copy of the (x, z) data from one row (y-index) of the specified dataset.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:56.269 -0500",hash_original_method="601EF7D9B28B5898301EBC35141803DA",hash_generated_method="413F0C46D488B56F71E26B18C416D817") public final Key unwrap(byte[] wrappedKey,String wrappedKeyAlgorithm,int wrappedKeyType) throws InvalidK...
Unwraps a key using this cipher instance.
public String toString(){ return image; }
Returns the image.
public OpenDataException(){ super(); }
An OpenDataException with no detail message.
private int hashCodeImpl(){ int result=0; for ( Map.Entry<String,Object> e : memberValues.entrySet()) { result+=(127 * e.getKey().hashCode()) ^ memberValueHashCode(e.getValue()); } return result; }
Implementation of dynamicProxy.hashCode()
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:39.997 -0500",hash_original_method="8766DB09D651E2B3541ACB0418FFA365",hash_generated_method="D09555F2947D75B2837EAF1A3FB8DD71") public Builder penaltyDialog(){ return enable(PENALTY_DIALOG); }
Show an annoying dialog to the developer on detected violations, rate-limited to be only a little annoying.
public boolean validate(List<String> warnings){ return true; }
This plugin is always valid - no properties are required
public void enterBus(Path nextPath){ if (startBusStop != null && endBusStop != null) { if (location.equals(endBusStop)) { state=STATE_WALKING_ELSEWHERE; latestBusStop=location.clone(); } else { state=STATE_DECIDED_TO_ENTER_A_BUS; this.nextPath=nextPath; } return; } if (!cb...
Notifies the node at the bus stop that a bus is there. Nodes inside busses are also notified.
public PossibleGraphicalChangeFinder(Graph pag,Collection<Collection<Node>> separations){ if (pag == null) { throw new NullPointerException("The given pag must not be null."); } if (separations == null) { throw new NullPointerException("The given separation sets must not be null."); } this.pag=pag; ...
Constructs the finder given the undirectedPaths that must be blocked.
@Override public IBinder onBind(Intent arg0){ return mBinder; }
Provides a binder object that clients can use to perform operations on the queue of uploads, excepting the addition of new files. Implemented to perform cancellation, pause and resume of existing uploads.
public Enumeration<String> keys(){ return (registryList.elements()); }
Get the keys of this element.
public static boolean isGatewayMesh(String gateway){ if (gateway == null) { return false; } else { String[] gateways=gateway.split("\\."); if (gateways[0].equals("2") || gateways[0].equals("3") || gateways[0].equals("4")|| gateways[0].equals("5") && gateways[1].equals("255") && gateways[2].equals("255"...
Check whether the gateway is belong to mesh device
public static double expm1(double value){ if (USE_JDK_MATH) { return STRICT_MATH ? StrictMath.expm1(value) : Math.expm1(value); } if (Math.abs(value) < EXP_LO_DISTANCE_TO_ZERO) { int i=(int)(value * EXP_LO_INDEXING); double delta=value - i * (1.0 / EXP_LO_INDEXING); return expLoPosTab[i + EXP_LO_T...
Much more accurate than exp(value)-1, for values close to zero.
private ResultPoint correctTopRightRectangular(ResultPoint bottomLeft,ResultPoint bottomRight,ResultPoint topLeft,ResultPoint topRight,int dimensionTop,int dimensionRight){ float corr=distance(bottomLeft,bottomRight) / (float)dimensionTop; int norm=distance(topLeft,topRight); float cos=(topRight.getX() - topLeft....
Calculates the position of the white top right module using the output of the rectangle detector for a rectangular matrix
public VersionNumber(String version){ parts=new ArrayList<Integer>(); int start=0; for (int i=0; i < version.length(); i++) { char c=version.charAt(i); if (c == '.') { addNumber(version,start,i); start=i + 1; } } addNumber(version,start,version.length()); }
Creates a new version number.
public void requestUpdateFromLayout(){ XNetMessage msg=XNetMessage.getFeedbackRequestMsg(baseaddress,(nibble == 0x00)); msg.setElement(1,baseaddress); msg.setParity(); synchronized (this) { statusRequested=true; } tc.sendXNetMessage(msg,null); }
request an update on status by sending an XPressNet message
public ClearCacheRequest(Cache cache,Runnable callback){ super(Method.GET,null,null); mCache=cache; mCallback=callback; }
Creates a synthetic request for clearing the cache.
public LongParameter(OptionID optionID,long defaultValue){ super(optionID,Long.valueOf(defaultValue)); }
Constructs a long parameter with the given optionID and default value.
public void test1(){ final GridLayoutManager layoutManager=new GridLayoutManager(2,3,new Insets(0,0,0,0),0,0); final JPanel panel=new JPanel(layoutManager); final JTextField field1=new JTextField(); field1.setPreferredSize(new Dimension(10,30)); final JTextField field2=new JTextField(); field2.setPreferredS...
control(min size 10) control(same) control(same)
public static MPayment createARReceipt(Properties ctx,MInvoice invoice,String tenderType,BigDecimal amount,String trxName) throws OperationException { return createPayment(ctx,invoice,MDocType.DOCBASETYPE_ARReceipt,tenderType,amount,invoice.get_TrxName()); }
Create AR Receipt
private void checkXmlForCMTDataSourceBackedByImplementationClass(String configuration,DataSourceFixture dataSourceFixture,String className) throws Exception { String id=getDataSourceId(dataSourceFixture); String providedDataSourceId=id + "Provided"; String providedDataSourceJndiName=dataSourceFixture.jndiLocation...
Check XML for CMT datasource.
public BinomialMinPQ(Comparator<Key> C,Key[] a){ comp=C; for ( Key k : a) insert(k); }
Initializes a priority queue with given keys using the given Comparator Worst case is O(n*log(n))
public InputStream openInputStream() throws IOException { close(); TempBuffer head=_head; _head=null; _tail=null; return new TempInputStream(head); }
Opens a read stream to the buffer.
public RangeBuilder addUnboundedTo(String key,long to){ ranges.add(new Range(key,null,to)); return this; }
Add a new range with no lower bound.
public void reset(){ isFilling=false; length=0; sequenceExtensionPosition=0; }
Resets the buffer, clearing any data that it holds.
public int clear(){ return --count; }
This is used to clear the references to the session. A reference is cleared when it is closed from the manager. The reference is disposed of when this returns zero or a negative number indicating all references are gone.
public NoSuchFieldError(String s){ super(s); }
Constructs a <code>NoSuchFieldError</code> with the specified detail message.
public void initWithImage(Bitmap image){ CGSize imageSize=CGSize.make(image.getWidth(),image.getHeight()); CGSize realSize=CGSize.make(image.getWidth(),image.getHeight()); int width=toPow2((int)imageSize.width); int height=toPow2((int)imageSize.height); boolean needDownScale=false; float factor=1; while (...
Initializes a texture from a UIImage object
public boolean isParseReportRequested(){ return m_isParseReportRequested; }
Whether parseReport is requested
public void subdivide(Segment s0,Segment s1){ Linear l0=null, l1=null; if (s0 instanceof Linear) l0=(Linear)s0; if (s1 instanceof Linear) l1=(Linear)s1; subdivide(l0,l1); }
Subdivides this Linear segment into two segments at t = 0.5. can be done with getSegment but this is more efficent.