code
stringlengths
10
174k
nl
stringlengths
3
129k
private void addAliasID(AliasID id,Alias alias){ if (id.isValid()) { try { switch (id.getType()) { case ESN: String esn=((Esn)id).getEsn(); if (esn != null) { if (esn.contains(WILDCARD)) { mESNWildcards.add(new WildcardID(esn)); Collections.sort(mESNWildcards); } ...
Adds the alias and alias identifier to the internal type mapping.
public void addWorldObject(Node node){ world_object_group.addChild(node); }
Add an object to the world object group.
public Node removeUncompletedCorrelationId(String id){ NodePlaceholder placeholder=uncompletedCorrelationIdsNodeMap.remove(id); if (placeholder != null) { return placeholder.getNode(); } return null; }
This method removes the uncompleted correlation id and its associated information.
public static void stopServer(){ try { Iterator iter=cache.getCacheServers().iterator(); if (iter.hasNext()) { CacheServer server=(CacheServer)iter.next(); server.stop(); } } catch ( Exception e) { fail("failed while stopServer()" + e); } }
Stops the cache server
public JSONTokener(Reader reader){ this.reader=reader.markSupported() ? reader : new BufferedReader(reader); this.eof=false; this.usePrevious=false; this.previous=0; this.index=0; this.character=1; this.line=1; }
Construct a JSONTokener from a Reader.
public AggregateApplicationBuilder headless(boolean headless){ this.headless=headless; return this; }
Configures the headless attribute of the build application.
public static boolean isTemplate(PageContext pc,PageSource ps,boolean defaultValue){ try { return !(ps.loadPage(pc,false) instanceof CIPage); } catch ( PageException e) { e.printStackTrace(); return defaultValue; } }
return if the PageSource represent a template (no component,no interface)
@Override public void annotationChanged(AnnotationChangeEvent event){ this.lastEvent=event; }
Receives notification of a change to an annotation.
public void runTest() throws Throwable { Document doc; NodeList elementList; Node employeeNode; Node childNode; NodeList childNodes; int nodeType; String childName; java.util.List actual=new java.util.ArrayList(); java.util.List expected=new java.util.ArrayList(); expected.add("em"); expected.add(...
Runs the test case.
private void parseParam(Node parent) throws JasperException { if (!reader.matches("<jsp:param")) { err.jspError(reader.mark(),"jsp.error.paramexpected"); } Attributes attrs=parseAttributes(); reader.skipSpaces(); Node paramActionNode=new Node.ParamAction(attrs,start,parent); parseEmptyBody(paramActionNo...
Param ::= '<jsp:param' S Attributes S? EmptyBody S?
private List<DiffEntry> calculateCommitDiffs(Git git,RevCommit first,RevCommit last) throws IOException, GitAPIException { AbstractTreeIterator oldTreeParser=prepareTreeParser(first); AbstractTreeIterator newTreeParser=prepareTreeParser(last); return git.diff().setOldTree(oldTreeParser).setNewTree(newTreeParser)....
Gets the diff between two commits.
public void addCertStore(CertStore store){ if (store == null) { return; } if (certStores == null) { certStores=new ArrayList<CertStore>(); } certStores.add(store); }
Adds a certificate store to the list of certificate stores that are used to find certificates and CRLs.
public boolean isCutOff(List<Action> result){ return 1 == result.size() && CutOffIndicatorAction.CUT_OFF.equals(result.get(0)); }
Returns <code>true</code> if the specified action list indicates a search reached it limit without finding a goal.
public void moveExecuteLogic(ActionMapping mappings,ActionForm form,HttpServletRequest request,HttpServletResponse response){ String idClasificador=request.getParameter("idClasificador"); moveCodeLogic(mappings,form,request,response,idClasificador); }
Accion para mover el elemento desde la pantalla de Clasificadores.
public void addScrollingListener(OnWheelScrollListener listener){ scrollingListeners.add(listener); }
Adds wheel scrolling listener
public boolean rename(String name){ if (name == null || name.length() <= 0) throw new NullPointerException("The passed name is invalid, have you checked its validity?"); else if (!isConnected()) { onError(OneSheeldError.DEVICE_NOT_CONNECTED); return false; } else if (isUpdatingFirmware()) { onEr...
Rename the board. Note: if the new name does not have "1Sheeld" in its name, it will not be visible in any future scans by the SDK.
@Override public ImmutableSet<Entry<K,V>> entrySet(){ return super.entrySet(); }
Returns an immutable set of the mappings in this map, sorted by the key ordering.
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); if (factors == null) { throw new NullPointerException(); } if (parents == null) { throw new IllegalStateException(); } }
Adds semantic checks to the default deserialization method. This method must have the standard signature for a readObject method, and the body of the method must begin with "s.defaultReadObject();". Other than that, any semantic checks can be specified and do not need to stay the same from version to version. A readObj...
public JavaCompletionProposal(String replacementString,int replacementOffset,int replacementLength,Image image,StyledString displayString,int relevance,boolean inJavadoc,JavaContentAssistInvocationContext invocationContext){ super(invocationContext); Assert.isNotNull(replacementString); Assert.isTrue(replacementO...
Creates a new completion proposal. All fields are initialized based on the provided information.
private static boolean isJUnitTestClass(final Class<?> c){ if (c.getSuperclass() != null && junit.framework.TestCase.class.equals(c.getSuperclass())) { return true; } else { for ( final Method method : c.getDeclaredMethods()) { if (method.getAnnotation(org.junit.Test.class) != null) { retu...
Determines if the given class implements a JUnit test
public static Font create(String lookup){ if (lookup.startsWith("native:")) { return createTrueTypeFont(lookup,lookup); } Object n=Display.impl.loadNativeFont(lookup); if (n == null) { return null; } return new Font(n); }
Creates a new font instance based on the platform specific string name of the font. This method isn't supported on some platforms.
public OtherName(DerValue derValue) throws IOException { DerInputStream in=derValue.toDerInputStream(); oid=in.getOID(); DerValue val=in.getDerValue(); nameValue=val.toByteArray(); gni=getGNI(oid,nameValue); if (gni != null) { name=gni.toString(); } else { name="Unrecognized ObjectIdentifier: " +...
Create the OtherName object from the passed encoded Der value.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:29:14.395 -0500",hash_original_method="4B57BC9609218FF4FD5DA8FDF96C43D9",hash_generated_method="3C0469096FC52EF9F5C968AFC3A90C3D") public float estimateY(float time){ return estimate(time,yCoeff); }
Gets an estimate of the Y position of the pointer at the specified time point.
static public String toHex(char c){ byte hi=(byte)(c >>> 8); byte lo=(byte)(c & 0xff); return toHex(hi) + toHex(lo); }
Return Hex String representation of char c
public final boolean owns(ConditionObject condition){ return condition.isOwnedBy(this); }
Queries whether the given ConditionObject uses this synchronizer as its lock.
public Date next(){ if (isValid(month,day + 1,year)) return new Date(month,day + 1,year); else if (isValid(month + 1,1,year)) return new Date(month + 1,1,year); else return new Date(1,1,year + 1); }
Returns the next date in the calendar.
public static <T>TStream<T> rateMeter(TStream<T> stream){ return stream.pipe(new RateMeter<T>()); }
Measure current tuple throughput and calculate one-, five-, and fifteen-minute exponentially-weighted moving averages.
private void classFileEpilogue(){ mv.visitMaxs(0,0); mv.visitEnd(); }
Tear down class file generation.
public static void ensureTempDirectoryExists() throws IOException { String tmpDirectoryPath=System.getProperty("java.io.tmpdir"); ensureDirectoryExists(tmpDirectoryPath); }
Ensures that the tmp directory in the java.io.tmpdir system property exists
public Builder updateExtension(Extension extension){ extensions.add(extension); return this; }
updates the given fields in the extension. If the User doesn't have the given extension fields, they will be added.
public static void deleteSharedPreferenceByPartialKey(Context context,String keyStartWith){ try { SharedPreferences settings=getSharedPreferenceManager(context); Map<String,?> keys=settings.getAll(); SharedPreferences.Editor editor=settings.edit(); for ( Map.Entry<String,?> entry : keys.entrySet())...
Elimina todas las Shared Preferences que empiecen con keyStartWith
public Analyzer add(String name,NondominatedPopulation result){ List<NondominatedPopulation> list=data.get(name); if (list == null) { list=new ArrayList<NondominatedPopulation>(); data.put(name,list); } list.add(result); return this; }
Adds a new sample with the specified name. If multiple samples are added using the same name, each sample is treated as an individual seed. Analyses can be performed on both the individual seeds and aggregates of the seeds.
private void showFeedback(String message){ if (myHost != null) { myHost.showFeedback(message); } else { System.out.println(message); } }
Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface.
public boolean isEditable(){ return m_textArea.isEditable(); }
Is Text Editable
protected String loadDocumentDetails(){ setC_Currency_ID(Doc.NO_CURRENCY); MMatchPO matchPO=(MMatchPO)getPO(); setDateDoc(matchPO.getDateTrx()); m_M_AttributeSetInstance_ID=matchPO.getM_AttributeSetInstance_ID(); setQty(matchPO.getQty()); m_C_OrderLine_ID=matchPO.getC_OrderLine_ID(); m_oLine=new MOrderLin...
Load Specific Document Details
@RequestMapping(value="/topics/{id}",method=RequestMethod.DELETE,produces=MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Void> deleteTopic(@PathVariable Long id){ log.debug("REST request to delete Topic : {}",id); topicRepository.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDelet...
DELETE /topics/:id -> delete the "id" topic.
public static FileChannel newFileChannel(Object stream,FileDescriptor fd,int mode){ return new FileChannelImpl(stream,fd,mode); }
Helps bridge between io and nio.
public BasePermissionCollectionRequestBuilder(final String requestUrl,final IOneDriveClient client,final List<Option> options){ super(requestUrl,client,options); }
The request builder for this collection of Item
@ReactMethod public void show(ReadableMap gameRequestContentMap,Promise promise){ if (getCurrentActivity() != null) { GameRequestDialog gameRequestDialog=new GameRequestDialog(getCurrentActivity()); GameRequestContent gameRequestContent=Utility.buildGameRequestContent(gameRequestContentMap); gameRequestDi...
Shows a GameRequestDialog to send a request.
Data(int version,Data old){ this.version=version; if (old != null) { this.x=old.x; this.y=old.y; } }
Create a copy of the data.
public void addHobby(Hobby hobby){ getHobbies().add(hobby); }
Adds a new hobby.
public CertificateExtensions(DerInputStream in) throws IOException { init(in); }
Create the object, decoding the values from the passed DER stream.
private void applyPattern(String pattern,boolean localized){ char zeroDigit=PATTERN_ZERO_DIGIT; char groupingSeparator=PATTERN_GROUPING_SEPARATOR; char decimalSeparator=PATTERN_DECIMAL_SEPARATOR; char percent=PATTERN_PERCENT; char perMill=PATTERN_PER_MILLE; char digit=PATTERN_DIGIT; char separator=PATTERN...
Does the real work of applying a pattern.
public void nextFocusElement(){ int selectedColumn=getActiveColumn(); int selectedRow=getActiveRow(); int nextColumn=selectedColumn + 1; int nextRow=selectedRow; if (selectedColumn == -1) { selectedColumn=0; } if (selectedRow == -1) { if (impl.getModel().getRowCount() > 0) { moveToStart(0,0)...
Navigate to previous active control or cell in table
private void putNamespaces(XMLStreamReader reader){ for (int i=0; i < reader.getNamespaceCount(); i++) { final String prefix=reader.getNamespacePrefix(i); if (prefix != null) { putNamespace(prefix,reader.getNamespaceURI(i)); } } }
Should be invoked on ELEMENT_START event
public CategoryDecoratorImpl(final ImageService imageService,final AttributableImageService categoryImageService,final CategoryService categoryService,final Category categoryEntity,final String httpServletContextPath,final I18NWebSupport i18NWebSupport){ this.categoryService=categoryService; this.categoryImageServi...
Construct entity decorator.
protected void copyValues(Instance instance,boolean instSrcCompat,Instances srcDataset,Instances destDataset){ RelationalLocator.copyRelationalValues(instance,instSrcCompat,srcDataset,m_InputRelAtts,destDataset,m_OutputRelAtts); StringLocator.copyStringValues(instance,instSrcCompat,srcDataset,m_InputStringAtts,getO...
Takes string/relational values referenced by an Instance and copies them from a source dataset to a destination dataset. The instance references are updated to be valid for the destination dataset. The instance may have the structure (i.e. number and attribute position) of either dataset (this affects where references ...
public void testSingleEvictOffHeap() throws Exception { CacheConfiguration<Integer,Object> ccfg=cacheConfiguration(grid(0).name()); ccfg.setName("testSingleEvictOffHeap"); ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_VALUES); ccfg.setSwapEnabled(false); LruEvictionPolicy plc=new LruEvictionPolicy(); plc.setMa...
Test single evict with OFFHEAP_VALUES mode.
public JPEG2000PictureSubDescriptorBO(KLVPacket.Header header,ByteProvider byteProvider,Map<Integer,MXFUID> localTagToUIDMap,IMFErrorLogger imfErrorLogger) throws IOException { super(header); long numBytesToRead=this.header.getVSize(); StructuralMetadata.populate(this,byteProvider,numBytesToRead,localTagToUIDMap)...
Instantiates a new JPEG2000 picture sub descriptor ByteObject.
public void cancel(){ cancel=true; }
Calling this method cancels the event
public ExecutionWindowRestRep update(URI id,ExecutionWindowUpdateParam input){ return client.put(ExecutionWindowRestRep.class,input,getIdUrl(),id); }
Updates the given execution window by ID. <p> API Call: <tt>PUT /catalog/execution-windows/{id}</tt>
@Override public void close(){ currentRow=null; rows=null; columns=null; rowId=-1; if (source != null) { source.close(); source=null; } }
Closes the result set and releases the resources.
public static void logResultsSeen(boolean wasPanelSeen,boolean wasTap){ RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchResultsSeen",wasPanelSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN,RESULTS_SEEN_BOUNDARY); logHistogramByGesture(wasPanelSeen,wasTap,"Search.ContextualSearchResultsSeenByGesture"); }
Logs whether search results were seen. Logs multiple histograms; with and without the original triggering gesture.
public String globalInfo(){ return "A simple instance filter that renames the relation, all attribute names " + "and all nominal (and string) attribute values. For exchanging sensitive " + "datasets. Currently doesn't like string or relational attributes."; }
Returns a string describing this filter
@Override public byte[] write(InternalLog log) throws IOException { final byte[] rowkey=RowkeyBuilder.buildRowkey(log); final Put p=new Put(rowkey); populateColumnValues(p,log); tbl.put(p); final List<byte[]> indexRowkeys=log.getIndexRowkeys(); if (indexRowkeys != null) { writeIndexes(rowkey,indexRowkey...
TODO need think about if multi-PUT is necessary, by checking if autoFlush works
@Override public void clear(){ initialize(); }
Resets the internal state, but note that size does NOT change, and also counters are NOT reset!
public static void logResult(ResultObject resultObject,PrintWriter localOut){ logResult(resultObject.toResultString(),localOut); }
Writes the result string from the given result object in the result file.
public Builder reconnectInterval(final int interval){ this.reconnectInterval=interval; return this; }
Time in milliseconds to wait between retries when attempting to reconnect to a dead host.
public void removeClient(SocketAddress address,ProxyClient sc){ if (address2Services.remove(address,sc)) { logger.info("Remove client {} to host {}.",sc,address); sc.close(); } }
Remove the client <code>sc</code> to proxy <code>address</code>.
public void unregisterOnSharedPreferenceChangeListener(SharedPreferences.OnSharedPreferenceChangeListener listener){ preferences.unregisterOnSharedPreferenceChangeListener(listener); }
Unregister SharedPreferences change listener
public Object jjtAccept(PartitionParserVisitor visitor,Object data){ return visitor.visit(this,data); }
Accept the visitor.
public List<String> unused(){ List<String> unUsed=new ArrayList<String>(); for ( String name : used.keySet()) { Boolean isUsed=used.get(name); if (!isUsed) unUsed.add(name); } return unUsed; }
Returns all unused macros.
public void fireAddingEdge(){ SessionEvent event=new SessionEvent(this.source,SessionEvent.ADDING_EDGE); fireSessionEvent(event); }
Fires an event indicating that an edge is about to be added.
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException { request.getSession().setAttribute("school","gdpa"); response.sendRedirect("servlet/SchoolServlet"); return; }
The doGet method of the servlet. <br> This method is called when a form has its tag value method equals to get.
public ByteStream(AbstractDriver driver,String name,byte minValue,byte maxValue,byte zeroValue,byte defaultValue,String stringPre,String stringPost,int presentation,int paintStyle,int indexMaxStream,Color colour,boolean summary){ super(driver,name,minValue,maxValue,zeroValue,defaultValue,stringPre,stringPost,presenta...
Construct a new GCspy stream of BYTE_TYPE
public ServiceSchemeException(String message){ super(message); }
Constructs a new exception with the specified detail message. The cause is not initialized.
public static void writePacketOutForPacketIn(IOFSwitch sw,OFPacketIn packetInMessage,OFPort egressPort){ OFPacketOut.Builder pob=sw.getOFFactory().buildPacketOut(); pob.setBufferId(packetInMessage.getBufferId()); pob.setInPort(packetInMessage.getVersion().compareTo(OFVersion.OF_12) < 0 ? packetInMessage.getInPort...
Writes an OFPacketOut message to a switch.
public boolean isGroupAddress() throws UnknownHostException { checkData(); return groupName; }
Determines if the address is a group address. This is also known as a workgroup name or group name.
static public void stepQueued(String stepId) throws WorkflowException { WorkflowService.completerStepQueued(stepId); }
Sets the step state to queued.
public static Calendar deserialize(final String strVal) throws ParseException { final boolean hasZ=strVal.indexOf('Z') != -1; String modifiedStrVal; final String zSuffix; if (hasZ) { zSuffix="Z"; modifiedStrVal=strVal.replace("Z","+0000"); } else { zSuffix=""; modifiedStrVal=strVal; } fin...
Deserializes an ISO-8601 formatted date.
public ResAllocsBuilder withNetworkMbps(double networkMbps){ this.networkMbps=networkMbps; return this; }
Limits the amount of bandwidth the task group can use to the number of megabits per second you pass in to this method.
@CanIgnoreReturnValue public static <T>T readBytes(InputStream input,ByteProcessor<T> processor) throws IOException { checkNotNull(input); checkNotNull(processor); byte[] buf=createBuffer(); int read; do { read=input.read(buf); } while (read != -1 && processor.processBytes(buf,0,read)); return proces...
Process the bytes of the given input stream using the given processor.
private long createDiscount(long customerKey,BigDecimal value,Long startTime,Long endTime,long supplierKey) throws Exception { Discount discount=new Discount(); Organization organization=dm.getReference(Organization.class,customerKey); List<OrganizationReference> sources=organization.getSources(); OrganizationR...
Helper method for discount creating.
public static boolean equalsAny(CharSequence cs,CharSequence[] strs){ boolean eq=false; if (cs == null) { eq=strs == null; } if (strs != null) { for (int i=0; i < strs.length; i++) { eq=eq || strs[i].equals(cs); } } return eq; }
Checks if the CharSequence equals any character in the given set of characters.
static void checkUnsignedShort(final int value,final String msg){ if (value < 0 || value > 65535) { throw new IllegalArgumentException(msg + " (must be an unsigned short): " + value); } }
Checks that the given value is an unsigned short.
public static void startFactoryServices(ServiceHost host,Map<Class<? extends Service>,Supplier<FactoryService>> factoryServicesMap){ checkNotNull(host,"host cannot be null"); checkNotNull(factoryServicesMap,"factoryServicesMap cannot be null"); Iterator<Map.Entry<Class<? extends Service>,Supplier<FactoryService>>...
Starts the factory services for the given list of services.
protected void waitForDownloadOrTimeout(long id) throws TimeoutException, InterruptedException { waitForDownloadOrTimeout_skipNotification(id); 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 boolean equals(Object rhs){ try { return equals((ShapeGraphicAttribute)rhs); } catch ( ClassCastException e) { return false; } }
Compares this <code>ShapeGraphicAttribute</code> to the specified <code>Object</code>.
public Checkpoints(Algorithm algorithm,File stateFile,int checkpointFrequency){ super(algorithm,checkpointFrequency,FrequencyType.EVALUATIONS); this.stateFile=stateFile; if (stateFile.exists() && (stateFile.length() != 0L)) { try { algorithm.setState(loadState()); } catch ( Exception e) { ...
Decorates an algorithm to periodically save checkpoints from which the algorithm can resume itself if unexpectedly terminated.
public SQLSyntaxErrorException(String reason){ super(reason,null,0); }
Creates an SQLSyntaxErrorException object. The Reason string is set to the given reason string, the SQLState string is set to null and the Error Code is set to 0.
protected List<JobDefinition> addDependenciesForSeeding(List<JobDefinition> jobs){ List<JobDefinition> list=new ArrayList<JobDefinition>(jobs.size()); for (int i=0; i < jobs.size(); i++) { JobDefinition job=jobs.get(i); Set<String> inputs=calculateInputClasses(job); Set<String> parents=calculateAncestor...
For each input job, identify all the others jobs we want to generate test cases first. The scheduler will use this information to first try to generate the test cases for the "dependency" jobs. <p> There can be different strategies to define a dependency: - ancestor, non-interface classes - classes used as input object...
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
public static NestedListContainer eliminateEmptyStructures(NestedListContainer nlc){ for (int i=nlc.size() - 1; i >= 0; i--) { NestedList nl=nlc.getNestedList(i); if (nl.getClass() == NestedListContainer.class) eliminateEmptyStructures((NestedListContainer)nl); if (nl.empty()) nlc.remove(nl); } ...
Removes all empty Structures from a NestedListContainer and all substructures.
private void passCompletion(Team offense,Team defense,PlayerWR selWR,int[] selWRStats,int yardsGain){ offense.getQB(0).statsPassComp++; offense.getQB(0).statsPassYards+=yardsGain; selWR.statsReceptions++; selWR.statsRecYards+=yardsGain; offense.teamPassYards+=yardsGain; if (gamePoss) { HomeQBStats[0]++;...
Pass completion stat tracking. used for team mostly.
@Nullable public GrCall enclosingCall(String name,GdslMembersHolderConsumer consumer){ final PsiElement place=consumer.getPlace(); if (place == null) return null; GrCall call=PsiTreeUtil.getParentOfType(place,GrCall.class,true); if (call == null) return null; while (call != null && !name.equals(getInvoked...
Returns enclosing method call of a given context's place
public void loadHamNSpam(Connection conn) throws java.sql.SQLException { PreparedStatement pstmt=null; ResultSet rs=null; try { pstmt=conn.prepareStatement(sqlQueries.getSqlString("selectHamTokens",true)); rs=pstmt.executeQuery(); Map<String,Integer> ham=getHamTokenCounts(); while (rs.next()) { ...
Loads the token frequencies from the database.
public List<List<double[]>> buildContourLines(double value){ this.assembleContourCells(value); this.traverseContourCells(); List<List<double[]>> result=new ArrayList<List<double[]>>(this.contourList); this.clearContourCells(); return result; }
Computes the contour lines at a specified threshold value. The returned list represents a collection of individual geographic polylines, which may or may not represent a closed loop. Each polyline is represented as a list of two-element arrays, with the X coordinate at index 0 and the Y coordinate at index 1. The domai...
private void updateStorageSystemsInProvider(StorageProvider provider,Map<URI,List<String>> providersToUpdate,StorageSystem storageSystemInDB){ _logger.debug("Entering {}",Thread.currentThread().getStackTrace()[1].getMethodName()); List<String> storageSystems=null; if (providersToUpdate.containsKey(provider.getId(...
Update the Provider => systems managed.
public void findBest(ArrayModifiableDBIDs candidates,DBIDArrayMIter it,DBIDVar out){ assert (candidates.size() > 0); int best=0; double min=reachability.doubleValue(it.seek(0)); for (it.advance(); it.valid(); it.advance()) { final double reach=reachability.doubleValue(it); if (reach < min) { min=r...
Find the minimum in the candidates array.
public void putMetadata(final URIMetadataNode entry) throws IOException { byte[] idb=entry.hash(); String id=ASCII.String(idb); try { long date=this.getLoadTime(id); if (date == -1) { putDocument(getDefaultConfiguration().metadata2solr(entry)); } else { if (date < entry.loaddate().getTime...
deprecated method to store document metadata, use Solr documents wherever possible
private static Class<?> loadVMClass(Resource toolsJar,Log log,JavaVendor vendor){ try { ClassLoader loader=ClassLoader.getSystemClassLoader(); String cls=vendor.getVirtualMachineClassName(); loader=new URLClassLoader(new URL[]{((FileResource)toolsJar).toURI().toURL()},loader); return loader.loadClass(...
If <b>ibm</b> is false, this private method will create a new URLClassLoader and attempt to load the com.sun.tools.attach.VirtualMachine class from the provided toolsJar file. <p> If <b>ibm</b> is true, this private method will ignore the toolsJar parameter and load the com.ibm.tools.attach.VirtualMachine class.
@Override public void eUnset(int featureID){ switch (featureID) { case SGraphPackage.ENTRY__KIND: setKind(KIND_EDEFAULT); return; } super.eUnset(featureID); }
<!-- begin-user-doc --> <!-- end-user-doc -->
private void updatePurchasedItem(String productId,int quantity){ if (quantity == 0) { mDb.delete(PURCHASED_ITEMS_TABLE_NAME,PURCHASED_PRODUCT_ID_COL + "=?",new String[]{productId}); return; } ContentValues values=new ContentValues(); values.put(PURCHASED_PRODUCT_ID_COL,productId); values.put(PURCHASED...
Updates the quantity of the given product to the given value. If the given value is zero, then the product is removed from the table.
@SuppressWarnings("unused") private void dumpDebug(byte[] data,String destFile){ }
Dump Generate Code
public double quantile(double y){ if (y == 0) { return 0; } else if (y == 1) { return 1; } else { try { return super.inverseCumulativeProbability(y); } catch ( MathException e) { return Double.NaN; } } }
quantile (inverse cumulative density function) of the distribution
public boolean isFinal(){ return false; }
Always returns 'false' since this state machine can never become final.
public static ANRequest.PutRequestBuilder put(String url){ return new ANRequest.PutRequestBuilder(url); }
Method to make PUT request
void addTransaction(Transaction t,boolean runSanityChecks){ unCacheTransactions(); if (transactions == null) { transactions=new ArrayList<Transaction>(); } t.setParent(this); if (runSanityChecks && transactions.size() == 0 && !t.isCoinBase()) throw new RuntimeException("Attempted to add a non-coinbase t...
Adds a transaction to this block, with or without checking the sanity of doing so
private static String pickRandomStatsFields(String[] fieldNames){ String fieldName; do { fieldName=fieldNames[TestUtil.nextInt(random(),0,fieldNames.length - 1)]; } while (fieldName.endsWith("_b") || fieldName.endsWith("_b1")); return fieldName; }
Picks a random field to use for Stats
static String composeNameForTrash(IgfsPath path,IgniteUuid id){ return id.toString() + TRASH_NAME_SEPARATOR + path.toString(); }
Creates short name of the file in TRASH directory. The name consists of the whole file path and its unique id. Upon file cleanup this name will be parsed to extract the path. Note that in contrast to common practice the composed name contains '/' character.