code
stringlengths
10
174k
nl
stringlengths
3
129k
static String cleanString(String s){ return s.replaceAll("[^a-zA-Z ]","").toLowerCase(); }
Helper to process strings into their "cleaned" form, ignoring punctuation and capitalization.
public UploadExample(UploadObject sample){ oredCriteria=new ArrayList<Criteria>(); Criteria criteria=this.or(); if (sample.getProjectId() != null) { criteria.andProjectIdEqualTo(sample.getProjectId()); } if (sample.getContent() != null) { criteria.andContentEqualTo(sample.getContent()); } if (samp...
This method was generated by MyBatis Generator. This method corresponds to the database table upload
public void requestThrottleSetup(LocoAddress address,boolean control){ DCCppThrottle throttle; if (log.isDebugEnabled()) { log.debug("Requesting Throttle: " + address); } if (throttles.containsKey(address)) { notifyThrottleKnown(throttles.get(address),address); } else { if (tc.getCommandStation()...
Request a new throttle object be created for the address, and let the throttle listeners know about it.
static void recordStartedBy(String packageName,Intent intent){ if (intent == null) { recordStartedBy(DocumentMetricIds.STARTED_BY_UNKNOWN); return; } int intentSource=DocumentMetricIds.STARTED_BY_UNKNOWN; IntentHandler.ExternalAppId appId=IntentHandler.determineExternalIntentSource(packageName,intent); ...
Records UMA about the Intent fired to create a DocumentActivity.
static List<GeoPoint> filterPoints(final List<? extends GeoPoint> input){ final List<GeoPoint> noIdenticalPoints=new ArrayList<>(input.size()); int startIndex=-1; final GeoPoint comparePoint=input.get(0); for (int i=0; i < input.size() - 1; i++) { final GeoPoint thePoint=input.get(getLegalIndex(-i - 1,input...
Filter duplicate points.
protected void addNamePropertyDescriptor(Object object){ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),getResourceLocator(),getString("_UI_NamedElement_name_feature"),getString("_UI_PropertyDescriptor_description","_UI_NamedElement_name_fe...
This adds a property descriptor for the Name feature. <!-- begin-user-doc --> <!-- end-user-doc -->
@Override protected Instances process(Instances instances) throws Exception { Instances result; Instance instOld; Instance instNew; int i; int n; double[] values; int numAttNew; int numAttOld; if (!isFirstBatchDone()) { computeThresholds(instances); } result=getOutputFormat(); numAttOld=inst...
Processes the given data (may change the provided dataset) and returns the modified version. This method is called in batchFinished(). This implementation only calls process(Instance) for each instance in the given dataset.
public static BinaryHeapInputStream create(byte[] data,int pos){ assert pos < data.length; BinaryHeapInputStream stream=new BinaryHeapInputStream(data); stream.pos=pos; return stream; }
Create stream with pointer set at the given position.
public SetSubtitle(int playerId,int subtitle,boolean enable){ super(); addParameterToRequest("playerid",playerId); addParameterToRequest("subtitle",subtitle); addParameterToRequest("enable",enable); }
Set the subtitle displayed by the player
private void addSymbolsDeclaredLater(HashSet<String> prevDeclared,NodeRepresentation nodeRepArg,boolean includeGoal){ NodeRepresentation assumpRepNode=nodeRepArg; while (assumpRepNode.parentNode != null) { assumpRepNode=assumpRepNode.parentNode; } int idx=0; while ((idx < this.assumeReps.size()) && (this....
Adds to `prevDeclared' all top-level NEW symbols that occur after the position of NodeRepresentation `nodeRepArg' or its ancestor in assumpReps. And, if includeGoal = true, to all bound symbols in the goal. It can be called only when `nodeRepArg' is in this.assumeReps, is a descendant of a node in this.assumeReps, or i...
public void paint(Graphics g,Shape allocation){ Rectangle a=(Rectangle)allocation; painter.paint(g,a.x,a.y,a.width,a.height,this); super.paint(g,a); }
Renders using the given rendering surface and area on that surface. This is implemented to delegate to the css box painter to paint the border and background prior to the interior.
private String validateInputs(){ String pomPath=pathEntry.getText(); if (Strings.isNullOrEmpty(pomPath)) { return "GraphML file cannot be empty"; } File pathFile=new File(pomPath); if (!pathFile.exists()) { return "GraphML file doesn't exist"; } return null; }
Determine if the page has been filled in correctly.
public static Map<String,String> mergeProps(Map<String,String> defaultProps,Map<String,String> overrideProps){ Map<String,String> mergedProps=new HashMap<String,String>(defaultProps); for ( Map.Entry<String,String> entry : overrideProps.entrySet()) { mergedProps.put(entry.getKey(),entry.getValue()); } retu...
Merge properties
public Shape paintLayer(Graphics g,int offs0,int offs1,Shape bounds,JTextComponent c,View view){ Color color=getColor(); if (color == null) { g.setColor(c.getSelectionColor()); } else { g.setColor(color); } boolean firstIsDot=false; boolean secondIsDot=false; if (c.isEditable()) { int dot=c.g...
Paints a portion of a highlight.
public void loadLayoutBlocks(Element layoutblocks){ LayoutBlockManager tm=InstanceManager.getDefault(LayoutBlockManager.class); if (layoutblocks.getAttribute("blockrouting") != null) { if (layoutblocks.getAttribute("blockrouting").getValue().equals("yes")) { tm.enableAdvancedRouting(true); } } if ...
Utility method to load the individual LayoutBlock objects. If there's no additional info needed for a specific layoutblock type, invoke this with the parent of the set of layoutblock elements.
public static String convertSourceCodeIntoUtf8(RecordingInputStream recis,String charset) throws IOException { ByteArrayOutputStream baos=null; try { if (!charset.equalsIgnoreCase(DEFAULT_CHARSET)) { Charset utf8charset=Charset.forName(DEFAULT_CHARSET); Charset incomingCharset=Charset.forName(charse...
This method converts the sourceCode into UTF-8 charset to ensure the charset compatibility with the source and the charset used for the persistence.
public void addCladeSiteModel(SiteModel siteModel,TaxonList taxonList,boolean includeStem) throws Tree.MissingTaxonException { Logger.getLogger("dr.evomodel").info("SiteModel added for clade."); cladeSiteModels.add(new Clade(siteModel,taxonList,includeStem)); addModel(siteModel); commonAncestorsKnown=true; }
Add an additional siteModel for a clade in the tree.
protected void rotateRight(BalancedBinaryNode<K,V> p){ BalancedBinaryNode<K,V> l=p.left; p.left=l.right; if (l.right != null) l.right.parent=p; l.parent=p.parent; if (p.parent == null) root=l; else if (p.parent.right == p) p.parent.right=l; else p.parent.left=l; l.right=p; p.parent=l; }
From CLR
public void parse(Node node) throws SAXException { contentHandler.setDocumentLocator(this); Node current=node; Node next; for (; ; ) { current.visit(this); if ((next=current.getFirstChild()) != null) { current=next; continue; } for (; ; ) { current.revisit(this); if (curr...
Causes SAX events for the tree rooted at the argument to be emitted. <code>startDocument()</code> and <code>endDocument()</code> are only emitted for a <code>Document</code> node.
private static Result showDialog(Stage owner,MessageType type,String msg,boolean applyToAll){ MessageBox dlg=new MessageBox(owner,type,msg,applyToAll); dlg.showModal(); return dlg.res; }
Show message in modal dialog.
public PacketMOUSE(int x,int y){ super(PT_MOUSE); byte flags=0; flags|=MS_ABSOLUTE; appendPayload(flags); appendPayload((short)x); appendPayload((short)y); }
A MOUSE packets sets the mouse position in XBMC
@Override public void onComplete(Void result){ assert activeStreams.size() == 0; closeFuture.set(null); }
Occurs when the client has initiated the connection closure.
default String name(){ return getClass().getSimpleName(); }
The name of the event. This is the key that will be used to determine which listeners might be interested. <p> The default name of any event is the simple class name.
public static <K,V>Map<K,V> of(K k1,V v1,K k2,V v2,K k3,V v3,K k4,V v4){ Map map=of(); map.put(k1,v1); map.put(k2,v2); map.put(k3,v3); map.put(k4,v4); return map; }
Returns map containing the given entries.
public void update(Graphics a,JComponent b){ for (int i=0; i < uis.size(); i++) { ((ComponentUI)(uis.elementAt(i))).update(a,b); } }
Invokes the <code>update</code> method on each UI handled by this object.
LambdaFormBuffer replaceParameterByCopy(int pos,int valuePos){ assert (pos != valuePos); replaceName(pos,names[valuePos]); noteDuplicate(pos,valuePos); return this; }
Replace a parameter by another parameter or expression already in the form.
public void startWatching(String fileName){ synchronized (mObservedChildren) { if (!mObservedChildren.containsKey(fileName)) { mObservedChildren.put(fileName,Boolean.valueOf(false)); } } if (new File(mPath).exists()) { startWatching(); Log_OC.d(TAG,"Started watching parent folder " + mPath + "...
Adds a child file to the list of files observed by the folder observer.
String modifyToolTipText(String start,VariableValue variable){ log.trace("modifyToolTipText: {}",variable.label()); start=addCvDescription(start,variable.getCvDescription(),variable.getMask()); if (_cvModel.getProgrammer() != null && !_cvModel.getProgrammer().getCanRead()) { start=addTextHTMLaware(start," (Ha...
Takes default tool tip text, e.g. from the decoder element, and modifies it as needed. <p> Intended to handle e.g. adding CV numbers to variables.
public void toggleSelection(int position){ if (selectedItems.get(position,false)) { selectedItems.delete(position); } else { selectedItems.put(position,true); } notifyItemChanged(position); }
Toggle the selection status of the item at a given position
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.
private void validateStoragePolicyCreateRequest(StoragePolicyCreateRequest request){ Assert.notNull(request,"A storage policy create request must be specified."); storagePolicyHelper.validateStoragePolicyKey(request.getStoragePolicyKey()); validateStoragePolicyRule(request.getStoragePolicyRule()); validateStora...
Validates the storage policy create request. This method also trims the request parameters.
private void validatePortals(){ for ( final IRPZone zone : this) { for ( final Portal portal : ((StendhalRPZone)zone).getPortals()) { validatePortal(portal); } } }
Checks for unpaired portals.
public void addTextProperty(String propertyName,TextNode node){ if (node instanceof TextLayoutFormatNode) { if (FXG_LINKACTIVEFORMAT_PROPERTY_ELEMENT.equals(propertyName)) { if (linkActiveFormat == null) { linkActiveFormat=(TextLayoutFormatNode)node; linkActiveFormat.setParent(this); ...
A tcy node can also have special child property nodes that represent complex property values that cannot be set via a simple attribute.
private void updateAction(){ int numSelected=networkPanel.getSelectedModelElements().size(); if (numSelected > 0) { setEnabled(true); } else { setEnabled(false); } }
Set action text based on number of selected neurons.
public ErrorMessage(ErrorMessage other){ if (other.isSetHeader()) { this.header=new AsyncMessageHeader(other.header); } if (other.isSetError()) { this.error=new SyncError(other.error); } if (other.isSetType()) { this.type=other.type; } }
Performs a deep copy on <i>other</i>.
public final AlertDialog initiateScan(){ return initiateScan(ALL_CODE_TYPES); }
Initiates a scan for all known barcode types.
@Override public Lesson findById(Long lessonId){ Lesson lesson=this.lessonRepository.findById(lessonId).orElseThrow(null); return lesson; }
Find a lesson by its id, if not found then throw a <code>LessonNotFoundException</code>
private static Sync.Type type(Sync<? extends Synced> sync){ if (sync.object instanceof Review) { return REVIEW; } else if (sync.object instanceof User) { return USER; } else if (sync.object instanceof Restaurant) { return RESTAURANT; } return null; }
Get the type of object that was acted on.
public BrowserRows(BrowseTable table){ this.table=table; }
Build With table *** Build Of Class
@Override public void eUnset(int featureID){ switch (featureID) { case TypesPackage.DECLARED_TYPE_WITH_ACCESS_MODIFIER__DECLARED_TYPE_ACCESS_MODIFIER: setDeclaredTypeAccessModifier(DECLARED_TYPE_ACCESS_MODIFIER_EDEFAULT); return; case TypesPackage.DECLARED_TYPE_WITH_ACCESS_MODIFIER__DECLARED_PROVIDED_BY_RUNTIME: ...
<!-- begin-user-doc --> <!-- end-user-doc -->
public void testReplaceValuesRandomAccess(){ Multimap<String,Integer> multimap=create(); multimap.put("foo",1); multimap.put("foo",3); assertTrue(multimap.replaceValues("foo",Arrays.asList(2,4)) instanceof RandomAccess); assertTrue(multimap.replaceValues("bar",Arrays.asList(2,4)) instanceof RandomAccess); }
Confirm that replaceValues() returns a List that implements RandomAccess, even though get() doesn't.
public static boolean isDtoWith(Method method){ if (method.isAnnotationPresent(DelegateTo.class)) { return false; } String methodName=method.getName(); return methodName.startsWith("with") && method.getParameterTypes().length == 1; }
Check is specified method is DTO with.
private static FitnessAndQuality fitnessAndQualityParsed(String mimeType,Collection<ParseResults> parsedRanges){ int bestFitness=-1; float bestFitQ=0; ParseResults target=parseMediaRange(mimeType); for ( ParseResults range : parsedRanges) { if ((target.type.equals(range.type) || range.type.equals("*") || t...
Find the best match for a given mimeType against a list of media_ranges that have already been parsed by MimeParse.parseMediaRange(). Returns a tuple of the fitness value and the value of the 'q' quality parameter of the best match, or (-1, 0) if no match was found. Just as for quality_parsed(), 'parsed_ranges' must be...
public static char[] toPrimitive(final Character[] array){ if (array == null) { return null; } else if (array.length == 0) { return ArrayUtils.EMPTY_CHAR_ARRAY; } final char[] result=new char[array.length]; for (int i=0; i < array.length; i++) { result[i]=array[i].charValue(); } return resu...
<p>Converts an array of object Characters to primitives.</p> <p>This method returns <code>null</code> for a <code>null</code> input array.</p>
@Override public ImmutableSetMultimap<K,V> build(){ if (keyComparator != null) { Multimap<K,V> sortedCopy=MultimapBuilder.linkedHashKeys().linkedHashSetValues().<K,V>build(); List<Map.Entry<K,Collection<V>>> entries=Ordering.from(keyComparator).<K>onKeys().immutableSortedCopy(builderMultimap.asMap().entrySet(...
Returns a newly-created immutable set multimap.
private String readLine() throws IOException { String line=null; int newLineMatchByteCount; boolean isLastFilePart=no == 1; int i=currentLastBytePos; while (i > -1) { if (!isLastFilePart && i < avoidNewlineSplitBufferSize) { createLeftOver(); break; } if ((newLineMatchByteCount=getNewL...
Reads a line.
public void preSuggest(){ currentMetric.inc(); }
Called before suggest
@Override public int hashCode(){ return super.hashCode(); }
Returns a hash code for this object.
public static void main(String[] args){ TestRunner.run(InvocableEndpointTest.class); }
<!-- begin-user-doc --> <!-- end-user-doc -->
@Override public void addBatch(String sql) throws SQLException { try { debugCodeCall("addBatch",sql); throw DbException.get(ErrorCode.METHOD_NOT_ALLOWED_FOR_PREPARED_STATEMENT); } catch ( Exception e) { throw logAndConvert(e); } }
Calling this method is not legal on a PreparedStatement.
private static void splitAdd(final double a[],final double b[],final double ans[]){ ans[0]=a[0] + b[0]; ans[1]=a[1] + b[1]; resplit(ans); }
Add two numbers in split form.
protected static void printUsage(){ System.out.println("Generate the control flow graph of a Java method, represented as a DOT graph."); System.out.println("Parameters: <inputfile> <outputdir> [-method <name>] [-class <name>] [-pdf]"); System.out.println(" -pdf: Also generate the PDF by invoking 'dot'."); ...
Print usage information.
public void removeOnNavigationPositionListener(){ this.navigationPositionListener=null; }
Remove OnNavigationPositionListener()
public final void testMinLengthWithContextParameter(){ assertNotNull(Validators.minLength(getContext(),1)); }
Tests the functionality of the minLength-method, which expects a context as a parameter.
public T image(String url,boolean memCache,boolean fileCache){ return image(url,memCache,fileCache,0,0); }
Set the image of an ImageView.
@Override public ExampleSet performPrediction(ExampleSet origExampleSet,Attribute predictedLabel) throws OperatorException { if (predictedLabel.isNominal()) { final String attributePrefix="BaggingModelPrediction"; final int numLabels=predictedLabel.getMapping().size(); final Attribute[] specialAttributes=...
Iterates over all models and averages confidences.
public State(PlotRenderingInfo info){ super(info); this.lowerCoordinates=new java.util.ArrayList(); this.upperCoordinates=new java.util.ArrayList(); }
Creates a new state instance.
public Object nextMeta() throws JSONException { char c; char q; do { c=next(); } while (Character.isWhitespace(c)); switch (c) { case 0: throw syntaxError("Misshaped meta tag"); case '<': return XML.LT; case '>': return XML.GT; case '/': return XML.SLASH; case '=': return XML.EQ; case '!': return XML...
Returns the next XML meta token. This is used for skipping over <!...> and <?...?> structures.
private final void createUsageVariables() throws AdeException { String dataObjectName=getAnalysisGroup() + "." + getName()+ ".m_prevIntervalTimelineMap"; Object tmp=Ade.getAde().getDataStore().models().getModelDataObject(dataObjectName); instantiateTimelineAndAlreadySeen(dataObjectName,tmp); dataObjectName=getA...
Creates variables used by this class for tracking last seen messages. m_prevIntervalTimelineMap contains the previous timeline (milliseconds from epoch time) for each message ID. m_alreadySeen contains the message IDs of those messages that were seen previously.
private String createString(String f){ StringBuilder sb=new StringBuilder(); switch (resType) { case CUresourcetype.CU_RESOURCE_TYPE_ARRAY: sb.append("hArray=" + array_hArray + f); break; case CUresourcetype.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY: sb.append("hMipmappedArray=" + mipmap_hMipmappedArray + f); break; cas...
Creates and returns a string representation of this object, using the given separator for the fields
public ShapeRenderer(){ }
Creates a new ShapeRenderer with default base size of 10 pixels.
public CAMatrix drawBoxAt(int x,int y,int w,int state){ for (int i=y - w / 2; i < y + w / 2; i++) { for (int j=x - w / 2; j < x + w / 2; j++) { if (j >= 0 && j < width && i >= 0 && i < height) { int idx=j + i * width; swap[idx]=matrix[idx]=state; } } } return this; }
Sets all matrix cells in a square around the given x,y coordinates to the requested state.
public boolean isWorkerThreadNameSupported(){ return workerThreadNameSupported; }
Checks if is worker thread name supported.
public boolean isValid(List<S2Point> vertices){ int n=vertices.size(); for (int i=0; i < n; ++i) { if (!S2.isUnitLength(vertices.get(i))) { log.info("Vertex " + i + " is not unit length"); return false; } } for (int i=1; i < n; ++i) { if (vertices.get(i - 1).equals(vertices.get(i)) || ve...
Return true if the given vertices form a valid polyline.
public float readFloat(){ return scanner.nextFloat(); }
Read and return the next float.
public void mouseEntered(MouseEvent e){ ((MouseListener)a).mouseEntered(e); ((MouseListener)b).mouseEntered(e); }
Handles the mouseEntered event by invoking the mouseEntered methods on listener-a and listener-b.
public final void applyForceToCenter(Vec2 force){ if (m_type != BodyType.DYNAMIC) { return; } if (isAwake() == false) { setAwake(true); } m_force.x+=force.x; m_force.y+=force.y; }
Apply a force to the center of mass. This wakes up the body.
public static <T>boolean equals(final Collection<T> c1,final Collection<T> c2){ if (c1 == null || c2 == null) { return c1 == c2; } if (c1.size() != c2.size()) { return false; } if (c1 == c2) { return true; } if (!c1.containsAll(c2)) { return false; } return c2.containsAll(c1); }
true if for each a in c1, a exists in c2, and if for each b in c2, b exist in c1 and c1 and c2 are the same size. Note that (a,a,b) (a,b,b) are equal.
public static double intersectRayLine(Vector2dc origin,Vector2dc dir,Vector2dc point,Vector2dc normal,double epsilon){ return intersectRayLine(origin.x(),origin.y(),dir.x(),dir.y(),point.x(),point.y(),normal.x(),normal.y(),epsilon); }
Test whether the ray with given <code>origin</code> and direction <code>dir</code> intersects the line containing the given <code>point</code> and having the given <code>normal</code>, and return the value of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> of the intersection point. <p> This m...
@Interruptible public static void fullyBootedVM(){ Selected.Plan.get().fullyBooted(); }
Notify the MM that the host VM is now fully booted.
public DoubleMatrix1D like1D(int size){ return new SparseDoubleMatrix1D(size); }
Construct and returns a new 1-d matrix <i>of the corresponding dynamic type</i>, entirelly independent of the receiver. For example, if the receiver is an instance of type <tt>DenseDoubleMatrix2D</tt> the new matrix must be of type <tt>DenseDoubleMatrix1D</tt>, if the receiver is an instance of type <tt>SparseDoubleMat...
private void readDefinition(InH3Amp inAmp){ int id=(int)readUnsigned(); String name=readString(); int type=(int)readUnsigned(); int fields=(int)readUnsigned(); FieldInfoH3[] fieldInfo=new FieldInfoH3[fields]; for (int i=0; i < fields; i++) { fieldInfo[i]=readFieldInfo(); } ClassInfoH3 info=new Class...
Define object
void scramble(){ initialSize=getSize(); int a[]=new int[initialSize.height / 2]; double f=initialSize.width / (double)a.length; for (int i=a.length; --i >= 0; ) { a[i]=(int)(i * f); } for (int i=a.length; --i >= 0; ) { int j=(int)(i * Math.random()); int t=a[i]; a[i]=a[j]; a[j]=t; } ...
Fill the array with random numbers from 0..n-1.
@Override public void execute(StepInstance stepInstance,String temporaryFileDirectory){ Set<RawProtein<CDDRawMatch>> rawMatches=rawMatchDAO.getProteinsByIdRange(stepInstance.getBottomProtein(),stepInstance.getTopProtein(),signatureLibraryRelease); Map<String,RawProtein<CDDRawMatch>> proteinIdToRawProteinMap=new Has...
This method is called to execute the action that the StepInstance must perform. <p/> If an error occurs that cannot be immediately recovered from, the implementation of this method MUST throw a suitable Exception, as the call to execute is performed within a transaction with the reply to the JMSBroker. <p/> Implementat...
public Provider<WorkingSetManagerBrokerImpl> provideWorkingSetManagerBrokerImpl(){ return Access.contributedProvider(WorkingSetManagerBrokerImpl.class); }
Binds the broker implementation for the working set managers in a singleton scope.
private void populate(ParameterTable matrix,ParameterList signature,int index){ ParameterList column=table.get(index); int width=signature.size(); int height=column.size(); for (int i=0; i < height; i++) { for (int j=0; j < width; j++) { ParameterList list=matrix.get(j); Parameter parameter=sign...
This is the final leg of building a permutation where a signature is given to permutate on the last column. Once finished the matrix will have a new row of parameters added which represents a new set of permutations to create signatures from.
@NotNull @ObjectiveCName("findUsersCommandWithQuery:") public Command<UserVM[]> findUsers(String query){ return null; }
Find Users
public static int executeUpdate(String sql,boolean ignoreError,String trxName,int timeOut){ return executeUpdate(sql,null,ignoreError,trxName,timeOut); }
Execute Update. saves "DBExecuteError" in Log
private static void waitUntilTreeItemHasItem(SWTBot bot,final SWTBotTreeItem tree,final String nodeText){ if (!waitUntilTreeHasItemImpl(bot,tree.widget,nodeText)) { bot.sleep(1000); tree.doubleClick(); bot.waitUntil(new TreeCollapsedCondition(tree.widget)); bot.sleep(1000); tree.expand(); bot....
Blocks the caller until the tree item has the given item text.
public JSONTokener(InputStream inputStream) throws JSONException { this(new InputStreamReader(inputStream)); }
Construct a JSONTokener from an InputStream.
public String minNumTipText(){ return "The minimum total weight of the instances in a leaf."; }
Returns the tip text for this property
public void copyFrom(ReturnPathType other){ this.type=other.type; }
Make this dataflow fact an exact copy of the other one.
public synchronized List<Vertex> findAllQuery(String jpql){ return findAllQuery(jpql,1000); }
Return all vertices matching the JPQL query.
public static HttpServletRequest buildMockHttpServletRequestObject(SignableSAMLObject samlObject,boolean doCompress,String relayStateParameter,String sigAlg,String signature,StringBuffer sbRequestUrl) throws MarshallingException, IOException { logger.info("buildMockHttpServletRequestObject. "); HttpServletRequest r...
Build a mock HttpServletRequest with given expected parameters.
@Override public boolean verifyPublicKey(PGPPublicKey keyToVerify,PGPPublicKey keyToVerifyWith){ try { return PGPEncryptionUtil.verifyPublicKey(keyToVerify,keyToVerifyWith); } catch ( Exception e) { throw new RuntimeException(e); } }
Verifies that a public key is signed with another public key
private void readData() throws IOException { while (!isClosed) { int code=is.read(); switch (code) { case ' ': case '\t': case '\n': case '\r': break; case 'C': { int channel=(is.read() << 8) + is.read(); inputReady[channel]=true; return; } case 'E': { int channel=(is.read() << 8) ...
Reads data until a channel packet 'C' or error 'E' is received.
public double normalizeLatitude(double lat){ if (lat > NORTH_LIMIT) { lat=NORTH_LIMIT; } else if (lat < SOUTH_LIMIT) { lat=SOUTH_LIMIT; } return lat; }
Sets radian latitude to something sane. This is an abstract function since some projections don't deal well with extreme latitudes.
public Shape greatCircleLineShape(){ GeneralPath path=null; if (llpts != null && llpts.length >= 4 && llpts.length % 2 == 0) { double y1=llpts[0]; double x1=llpts[1]; path=new GeneralPath(GeneralPath.WIND_EVEN_ODD,llpts.length / 2); boolean firstCoords=true; for (int i=2; i < llpts.length; i+=2)...
Create a java.awt.Shape object of coordinates connected by great circle lines.
final public boolean checkCacheClosing(DistributionManager dm){ GemFireCacheImpl cache=GemFireCacheImpl.getInstance(); return (cache == null || cache.getCancelCriterion().isCancelInProgress()); }
check to see if the cache is closing
public AbstractGraph(List<V> vertices,List<Edge> edges){ for (int i=0; i < vertices.size(); i++) { addVertex(vertices.get(i)); } createAdjacencyLists(edges,vertices.size()); }
Construct a graph from vertices and edges stored in lists
public void onEvent(Event e){ log.info("Cmd=" + e.getTarget().getId()); if (cmbDocType.equals(e.getTarget())) { form.postQueryEvent(); return; } validate(); }
Action Listener
public static URL resolvePropertiesUrl(String resource,Locale locale){ if (UtilValidate.isEmpty(resource)) { throw new IllegalArgumentException("resource cannot be null or empty"); } String resourceName=createResourceName(resource,locale,false); if (propertiesNotFound.contains(resourceName)) { return nu...
Resolve a properties file URL. <p>This method uses the following strategy:<br /> <ul> <li>Locate the XML file specified in <code>resource (MyProps.xml)</code></li> <li>Locate the file that starts with the name specified in <code>resource</code> and ends with the locale's string and <code>.xml (MyProps_en.xml)</code></l...
@Override public ServerHandshakeBuilder onWebsocketHandshakeReceivedAsServer(WebSocket conn,Draft draft,ClientHandshake request) throws InvalidDataException { return new HandshakeImpl1Server(); }
This default implementation does not do anything. Go ahead and overwrite it.
public final int yylength(){ return zzMarkedPos - zzStartRead; }
Returns the length of the matched text region.
public boolean editCellAt(int row,int column,java.util.EventObject e){ if (!super.editCellAt(row,column,e)) return false; Object ed=getCellEditor(); if (ed instanceof VEditor) ((Component)ed).requestFocus(); else if (ed instanceof VCellEditor) { ed=((VCellEditor)ed).getEditor(); ((Component)ed).req...
Transfer focus explicitly to editor due to editors with multiple components
public static int lowerBound(final List<Date> dates,final Date value){ int len=dates.size(); int from=0; int half; int middle; while (len > 0) { half=len >> 1; middle=from; middle=middle + half; if (value.compareTo(dates.get(middle)) == 1) { from=middle; from++; len=len - hal...
This method is equivalent to std:lower_bound function Returns an index pointing to the first element in the ordered collection is equal or greater than passed value
public boolean isAmbient(){ return this.ambient; }
Makes potion effect produce more, translucent, particles.
public void select(boolean flag){ isSelected=flag; if (!isSelected) { mark=0; } }
Determine selectable status.
protected void waitForDownloadOrTimeout(long id,long poll,long timeoutMillis) throws TimeoutException, InterruptedException { doWaitForDownloadsOrTimeout(new Query().setFilterById(id),poll,timeoutMillis); waitForReceiverNotifications(1); }
Helper to wait for a particular download to finish, or else a timeout to occur Also guarantees a notification has been posted for the download.
public JasperException(Throwable exception){ super(exception); }
Creates a JasperException with the embedded exception