code
stringlengths
10
174k
nl
stringlengths
3
129k
@SafeVarargs public final AssertSubscriber<T> assertValuesWith(Consumer<T>... expectations){ if (!valuesStorage) { throw new IllegalStateException("Using assertNoValues() requires enabling values storage"); } final int expectedValueCount=expectations.length; if (expectedValueCount != values.size()) { th...
Assert the specified values have been received in the declared order. Values storage should be enabled to use this method.
public static void main(String[] argv){ runFilter(new Copy(),argv); }
Main method for testing this class.
public TxRequest64(XBeeAddress64 destination,int frameId,int[] payload){ this(destination,frameId,Option.UNICAST,payload); }
16 bit Tx Request. Keep in mind that if you programmed the destination address with AT commands, it is in Hex, so prepend int with 0x (e.g. 0x1234). Payload size is limited to 100 bytes, according to MaxStream documentation.
public LocalDateTime addToCopy(long value){ return iInstant.withLocalMillis(iField.add(iInstant.getLocalMillis(),value)); }
Adds to this field in a copy of this LocalDateTime. <p> The LocalDateTime attached to this property is unchanged by this call.
public final Constant asConstant(){ if (this instanceof ConstantNode) { return ((ConstantNode)this).getValue(); } else { return null; } }
Convert this value to a constant if it is a constant, otherwise return null.
public Criteria or(){ Criteria criteria=createCriteriaInternal(); oredCriteria.add(criteria); return criteria; }
This method was generated by MyBatis Generator. This method corresponds to the database table customer
public Vector3 cross(Vector3 that){ x=getY() * that.getZ() - getZ() * that.getY(); y=getZ() * that.getX() - getX() * that.getZ(); z=getX() * that.getY() - getY() * that.getX(); return this; }
Takes the cross product of two vectors
public ListNode mergeKLists(ListNode[] lists){ if (lists == null || lists.length == 0) { return null; } Queue<ListNode> pq=new PriorityQueue<>(lists.length,null); for ( ListNode n : lists) { if (n != null) { pq.add(n); } } ListNode dummy=new ListNode(0); ListNode tail=dummy; while (!p...
Heap. O(k) + O(n * log(k)) Time, O(k) Space. Keep track of all heads in a heap, so that we know the next value to be inserted in O(log(k)) time. Create a result list head, and poll from the queue to get the next value. Keep track of the list's tail with a pointer. Add the next of what we polled from queue, if it's not ...
public static String formatResult(Object result){ return formatResult(result,0); }
Takes in the result from MATLAB and turns it into an easily readable format.
public int ToSeconds(){ return hours * 3600 + minutes * 60 + seconds; }
Returns the seconds from midnight that this time object represents
public Boolean isEnabled(){ return enabled; }
Gets the value of the enabled property.
public Resource _getResource(String name){ Resource f=directory.getRealResource(name); if (f != null && f.exists() && f.isFile()) return f; return null; }
returns matching File Object or null if file not exust
public static java.lang.String toString(int i,int radix){ return null; }
Creates a string representation of the first argument in the radix specified by the second argument. If the radix is smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX, then the radix 10 is used instead. If the first argument is negative, the first element of the result is the ASCII minus character '-'...
protected void paintOrigin(Point2D llp,Graphics graphics,MapBean theMap){ paintOriginPoint(llp,graphics,theMap); paintOriginLabel(llp,graphics,theMap); }
Paints the origin point of the range rings and its label on the given Graphics.
public static List execute(ExecutablePool pool,String region,Object key,int interestType,InterestResultPolicy policy,boolean isDurable,boolean receiveUpdatesAsInvalidates,byte regionDataPolicy){ AbstractOp op=new RegisterInterestOpImpl(region,key,interestType,policy,isDurable,receiveUpdatesAsInvalidates,regionDataPol...
Does a region registerInterest on a server using connections from the given pool to communicate with the server.
public static boolean contains(boolean[] array,boolean valueToFind){ return indexOf(array,valueToFind) != INDEX_NOT_FOUND; }
<p>Checks if the value is in the given array.</p> <p>The method returns <code>false</code> if a <code>null</code> array is passed in.</p>
public boolean find(){ return regexMatcher.find(); }
Attempts to find the next subsequence of the input sequence that matches the pattern including Grok predicates.
private void checkFlows(){ if ((mMode == MODE_LOGIN) || (mMode == MODE_FORGOT_PASSWORD) || (mMode == MODE_FORGOT_PASSWORD_WAITING_VALIDATION)) { checkLoginFlows(); } else { checkRegistrationFlows(); } }
check if the current page is supported by the current implementation
void calculateLongestLine(){ Component c=getContainer(); font=c.getFont(); metrics=c.getFontMetrics(font); tabSize=getTabSize() * metrics.charWidth(' '); Element lines=getElement(); int n=lines.getElementCount(); for (int i=0; i < n; i++) { Element line=lines.getElement(i); float w=getLineWidth(i)...
Iterate over the lines represented by the child elements of the element this view represents, looking for the line that is the longest. The <em>longLine</em> variable is updated to represent the longest line contained. The <em>font</em> variable is updated to indicate the font used to calculate the longest line.
private void checkKeyPacket(byte[] keyPacket){ if (keyPacket.length < 3) { throw new IllegalArgumentException("keypacket must be at least " + "3 bytes long"); } int tag=keyPacket[0]; if ((tag & 128) != 128) { throw new IllegalArgumentException("keypacket tag is invalid: " + "bit 7 is not set"); } if...
We assume packets use the new format packet syntax, as specified in section 4 of RFC 2440. This method only checks if the packet contains a valid tag. The contents of the packet should be checked by the application.
public void flush() throws IOException { writer_.flush(); }
Flushes the writer.
private static File checkFile(File tsFile,String fileType) throws TypeScriptException { if (tsFile == null) { throw new TypeScriptException("[" + fileType + "] file cannot be null"); } if (!tsFile.exists()) { throw new TypeScriptException("Cannot find [" + fileType + "] file "+ FileUtils.getPath(tsFile));...
Check if the given tsserver, tsc, etc file is a valid file.
public static TestSuite suite() throws Exception { Class testClass=ClassLoader.getSystemClassLoader().loadClass("org.w3c.domts.level3.validation.alltests"); Constructor testConstructor=testClass.getConstructor(new Class[]{DOMTestDocumentBuilderFactory.class}); DOMTestDocumentBuilderFactory factory=new JAXPDOMTest...
Create a new instance of the test suite
public boolean isDeclaredOverride(){ return declaredOverride; }
<!-- begin-user-doc --> <!-- end-user-doc -->
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case UmplePackage.ANONYMOUS_DERIVED_ATTRIBUTE_1__LIST_1: return isList_1(); case UmplePackage.ANONYMOUS_DERIVED_ATTRIBUTE_1__NAME_1: return getName_1(); case UmplePackage.ANONYMOUS_DERIVED_ATTRIBUTE_1__TYPE_1: retur...
<!-- begin-user-doc --> <!-- end-user-doc -->
public static byte[] streamToBytes(InputStream in,int length) throws IOException { byte[] bytes=new byte[length]; int count; int pos=0; while (pos < length && ((count=in.read(bytes,pos,length - pos)) != -1)) { pos+=count; } if (pos != length) { throw new IOException("Expected " + length + " bytes, r...
Reads the contents of an InputStream into a byte[].
public BracePair(final IElementType leftBrace,final IElementType rightBrace,final boolean structural){ myLeftBrace=leftBrace; myRightBrace=rightBrace; myStructural=structural; }
Creates a new brace pair instance.
public static TrapCodeOperand NullPtr(){ return new TrapCodeOperand((byte)RuntimeEntrypoints.TRAP_NULL_POINTER); }
Create a trap code operand for a null pointer check
public static void releaseServiceObject(ServiceDiscovery discovery,Object svcObject){ io.vertx.servicediscovery.ServiceDiscovery.releaseServiceObject((io.vertx.servicediscovery.ServiceDiscovery)discovery.getDelegate(),svcObject); }
Release the service object retrieved using <code>get</code> methods from the service type interface. It searches for the reference associated with the given object and release it.
public static final double[][] timesTranspose(final double[] v1,final double[] v2){ final double[][] re=new double[v1.length][v2.length]; for (int j=0; j < v2.length; j++) { for (int i=0; i < v1.length; i++) { re[i][j]=v1[i] * v2[j]; } } return re; }
Linear algebraic matrix multiplication, v1 * v2^T
public HashPrintServiceAttributeSet(){ super(PrintServiceAttribute.class); }
Construct a new, empty hash print service attribute set.
public int hammingWeight(int n){ int res=0; while (n != 0) { res++; n&=n - 1; } return res; }
Pure bit manipulation "n &= n - 1" is used to delete the right "1" of n Stop when all 1s are deleted and n is zero
private static Instances NumToNom(Instances i) throws Exception { System.out.println("Type range of variables to make nominal, e.g. \"1,3-4,7\""); Scanner sc=new Scanner(System.in); String range=sc.next(); NumericToNominal convert=new NumericToNominal(); String[] options={"-R",range}; convert.setOptions(opt...
Converting attributes from Numeric to Nominal.
@Deactivate protected void deactivate(ComponentContext ctx){ }
Service Deactivation.
@DSSafe(DSCat.SAFE_OTHERS) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:56:46.624 -0500",hash_original_method="D1485373461621933BC43F45AD6A923E",hash_generated_method="0EFF8C92C50C1B5DB93451D6413713EA") @Override public void close(){ synchronized (lock) { if (isOpen()) { ...
This method closes this CharArrayReader. Once it is closed, you can no longer read from it. Only the first invocation of this method has any effect.
public DataSource<CloseableReference<CloseableImage>> fetchDecodedImage(ImageRequest imageRequest,Object callerContext){ return fetchDecodedImage(imageRequest,callerContext,ImageRequest.RequestLevel.FULL_FETCH); }
Submits a request for execution and returns a DataSource representing the pending decoded image(s). <p>The returned DataSource must be closed once the client has finished with it.
private MailItemFeed batchInsertMailItems(MailItemEntry... mailItems) throws ServiceException, IOException { LOGGER.log(Level.INFO,"Batch inserting " + Integer.toString(mailItems.length) + " mailItems"); MailItemFeed feed=new MailItemFeed(); for (int i=0; i < mailItems.length; i++) { BatchUtils.setBatchId(mai...
Inserts one or more MailItem entries in a single batch operation. Using batch insertion is helpful in reducing HTTP overhead.
private static void readJson() throws IOException { JsonFactory jsonFactory=new JsonFactory(); JsonParser jsonParser=jsonFactory.createParser("{\"message\":\"Hi\",\"place\":{\"name\":\"World!\"}}"); JsonToken jsonToken=jsonParser.nextToken(); while (jsonParser.hasCurrentToken()) { if (jsonToken == VALUE_STR...
Example to readJson using StreamingAPI
public boolean all_reachable(){ return soot.PhaseOptions.getBoolean(options,"all-reachable"); }
All Application Class Methods Reachable -- Assume all methods of application classes are reachable.. When this option is false, the call graph is built starting at a set of entry points, and only methods reachable from those entry points are processed. Unreachable methods will not have any call graph edges generated...
private void swap(T from,T to){ T p=(T)from.getPrevious(); T n=(T)from.getNext(); if (null != p) { to.setPrevious(p); p.setNext(to); } if (null != n) { to.setNext(n); n.setPrevious(to); } from.setNext(null); from.setPrevious(null); }
Replace from with to in the list.
public double testPing(String hostAddress,int port,int timeout){ InetAddress inetAddress=null; InetSocketAddress socketAddress=null; Socket socket=new Socket(); long timeToRespond=-1; long start, stop; try { inetAddress=InetAddress.getByName(hostAddress); socketAddress=new InetSocketAddress(inetAddr...
ping target host with port to check connectivity
public long endTime(){ return endTime; }
Returns time when snapshot ended <p/> Can be 0L if snapshot is still running
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 15:02:38.087 -0400",hash_original_method="772E48859B8D6014A94196EB87B496F8",hash_generated_method="08C77205267DC41FDD11DCA1C30BC7D4") char[] convertToHex(byte[] hash){ int i; byte j; byte fifteen=15; char[] hex=new char[32]; for...
This function takes a 16 byte binary md5-hash value and creates a 32 character (plus a terminating null character) hex-digit representation of binary data.
public boolean visitPredicate(ExpressionOwner owner,Expression pred){ boolean savedIsSame=m_isSameContext; m_isSameContext=false; pred.callVisitors(owner,this); m_isSameContext=savedIsSame; return false; }
Visit a predicate within a location path. Note that there isn't a proper unique component for predicates, and that the expression will be called also for whatever type Expression is.
@Override public boolean isSearchable(int column) throws SQLException { try { debugCodeCall("isSearchable",column); checkColumnIndex(column); return true; } catch ( Exception e) { throw logAndConvert(e); } }
Checks if this column is searchable. It always returns true.
public static void showToastShort(String message){ showToastShort(message,0); }
Show the toast.
private static int transpositions(final CharSequence first,final CharSequence second){ int transpositions=0; for (int i=0; i < first.length(); i++) { if (first.charAt(i) != second.charAt(i)) { transpositions++; } } return transpositions / 2; }
Calculates the number of transposition between two strings.
public String toString(){ return "[" + host + ":"+ port+ (ssf != null ? "," + ssf : "")+ (csf != null ? "," + csf : "")+ "]"; }
Return string representation for endpoint.
public InlineQueryResultVideo build(){ return new InlineQueryResultVideo(id,video_url,mime_type,thumb_url,video_width,video_height,title,caption,video_duration,description,reply_markup,input_message_content); }
Builds the InlineQueryResultVideo object
public boolean isChaResInUse(){ return chaResInUse; }
Gets the chaResInUse value for this ForgotPasswordWSBean.
public boolean validRule(Rule r){ if (!super.validRule(r)) { return false; } else if (r.rhs == null) { return false; } else if (r.rhs.size() < r.lhs.size()) { return false; } return true; }
For a grammar rule to be valid in a context sensitive grammar, all the restrictions of the parent grammar (unrestricted) must hold, and the number of RHS symbols must be equal or greater than the number of LHS symbols.
public synchronized void startListening(Context context){ if (!mListening) { mContext=context; IntentFilter filter=new IntentFilter(); filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); context.registerReceiver(this,filter); mListening=true; } }
This method starts listening for network connectivity state changes.
public String toString(){ return "'" + val.replace("'","''") + "'"; }
Returns the string representing the object.
public T datetime(String value){ return attr("datetime",value); }
Sets the <code>datetime</code> attribute on the last started tag that has not been closed.
public static boolean isAlwaysRevalidate(){ return alwaysRevalidate; }
By default lists don't revalidate on every change to avoid "jumpiness" when scrolling
boolean isSupportedFileSuffix(String fileSuffix){ return mFileSuffixList.contains(fileSuffix); }
Determines whether a given file suffix is supported.
@Inline public final void insert(Address addr){ if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(!addr.isZero()); checkTailInsert(1); uncheckedTailInsert(addr); }
Insert an address into the address queue.
public JSONObject put(String key,boolean value) throws JSONException { this.put(key,value ? Boolean.TRUE : Boolean.FALSE); return this; }
Put a key/boolean pair in the JSONObject.
public DummyEventReportingService(){ super(Long.MAX_VALUE,EventBTree.createTransient()); }
Construct with an empty set of events
public Set<String> addContent(IndependentDistribution distrib){ if (!paused) { curState.addToState(distrib); return update(); } else { log.info("system is paused, ignoring content " + distrib); return Collections.emptySet(); } }
Adds the content (expressed as a categorical table over variables) to the current dialogue state, and subsequently updates the dialogue state.
public DCertificatePolicies(JDialog parent){ super(parent); setTitle(res.getString("DCertificatePolicies.Title")); initComponents(); }
Creates a new DCertificatePolicies dialog.
public void removeChangeListener(ChangeListener l){ listenerList.remove(ChangeListener.class,l); }
Removes a <code>ChangeListener</code> from the progress bar.
public boolean epsilonEquals(GMatrix m1,double epsilon){ int i, j; double diff; if (nRow != m1.nRow || nCol != m1.nCol) { return false; } for (i=0; i < nRow; i++) { for (j=0; j < nCol; j++) { diff=values[i][j] - m1.values[i][j]; if ((diff < 0 ? -diff : diff) > epsilon) { return fal...
Returns true if the L-infinite distance between this matrix and matrix m1 is less than or equal to the epsilon parameter, otherwise returns false. The L-infinite distance is equal to MAX[i=0,1,2, . . .n ; j=0,1,2, . . .n ; abs(this.m(i,j) - m1.m(i,j)]
public HashMap<String,String> generateSwfByImages(List<String> images,String outputfile,int fps){ List<String> argvList=Arrays.asList(new String[]{getPathToSwfTools() + "png2swf" + execExt,"-s","insertstop","-o",outputfile,"-r",Integer.toString(fps),"-z"}); argvList.addAll(images); return ProcessHelper.executeScr...
Generates an SWF from the list of files.
public static Offset bottomRight(){ return new Offset(WorldWind.OFFSET_FRACTION,1.0,WorldWind.OFFSET_FRACTION,0.0); }
This factory method returns a new offset for anchoring a rectangle to its bottom-right corner.
public void updatePlayState(final boolean isPlaying){ if (mNotification == null || mNotificationManager == null) { return; } if (mNotificationTemplate != null) { mNotificationTemplate.setImageViewResource(R.id.notification_base_play,isPlaying ? R.drawable.btn_notification_playback_pause : R.drawable.btn_n...
Changes the playback controls in and out of a paused state
protected void appendAndPush(StylesheetHandler handler,ElemTemplateElement elem) throws SAXException { super.appendAndPush(handler,elem); elem.setDOMBackPointer(handler.getOriginatingNode()); handler.getStylesheet().setTemplate((ElemTemplate)elem); }
Must include; super doesn't suffice!
protected Map<Character,Integer> match_alphabet(String pattern){ Map<Character,Integer> s=new HashMap<Character,Integer>(); char[] char_pattern=pattern.toCharArray(); for ( char c : char_pattern) { s.put(c,0); } int i=0; for ( char c : char_pattern) { s.put(c,s.get(c) | (1 << (pattern.length() - i...
Initialise the alphabet for the Bitap algorithm.
public FuzzyConditionBuilder maxExpansions(Integer maxExpansions){ this.maxExpansions=maxExpansions; return this; }
Returns this builder with the specified maximum number of terms to match.
public void rotate(float rot,float x,float y,float z){ Matrix4f tmp=new Matrix4f(); tmp.loadRotate(rot,x,y,z); multiply(tmp); }
Modifies the current matrix by post-multiplying it with a rotation matrix of certain angle about a given axis
@Override public boolean isFigureSelected(Figure checkFigure){ return selectedFigures.contains(checkFigure); }
Test whether a given figure is selected.
public void testNewDocument(){ Document d; try { d=dbf.newDocumentBuilder().newDocument(); } catch ( Exception e) { throw new RuntimeException("Unexpected exception",e); } assertNotNull(d); assertNull(d.getDoctype()); assertNull(d.getDocumentElement()); assertNull(d.getNamespaceURI()); }
javax.xml.parsers.DocumentBuilder#getSchema() TBD getSchema() is not supported
public int length(){ return values.size(); }
Returns the number of values in this array.
public AttributeCertificateIssuer(AttCertIssuer issuer){ form=issuer.getIssuer(); }
Set the issuer directly with the ASN.1 structure.
public T caseActionFakeDefinition(ActionFakeDefinition object){ return null; }
Returns the result of interpreting the object as an instance of '<em>Action Fake Definition</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
public int maxIdleConnectionPoolSize(){ return maxIdleConnectionPoolSize; }
Max number of idle connections per URL for this driver.
public void invalidateHeaders(){ if (!mHandler.hasMessages(MSG_BUILD_HEADERS)) { mHandler.sendEmptyMessage(MSG_BUILD_HEADERS); } }
Call when you need to change the headers being displayed. Will result in onBuildHeaders() later being called to retrieve the new list.
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:27:57.921 -0500",hash_original_method="A4B1F2E867C9A510C601A243C52C492E",hash_generated_method="833AD7BCDDF03DA1695D3173C8995B22") protected boolean lineStart(TextView widget,...
Performs a line-start movement action. Moves the cursor or scrolls to the start of the line.
private void writeAttribute(java.lang.String namespace,java.lang.String attName,java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { if (namespace.equals("")) { xmlWriter.writeAttribute(attName,attValue); } else { registerPrefix(xmlWriter,namesp...
Util method to write an attribute without the ns prefix
public void onSuggestionsFetched(final String query,final List<KeywordSuggestionsResponseModel.Keywords> suggestions,final boolean replace){ if (mSuggestions == null) { mSuggestions=new ArrayList<KeywordSuggestionsResponseModel.Keywords>(); } if (replace) { mSuggestions.clear(); } mSuggestions.addAll(...
Add a new set of suggestions to this TextView
public void startActivities(){ startActivities(null); }
Start the task stack constructed by this builder.
public ExecutionTargetException(String message,ApplicationExceptionBean bean){ super(message,bean); }
Constructs a new exception with the specified detail message and bean for JAX-WS exception serialization.
public synchronized Tradestrategy findById(Integer id){ try { EntityManager entityManager=EntityManagerHelper.getEntityManager(); entityManager.getTransaction().begin(); Tradestrategy instance=entityManager.find(Tradestrategy.class,id); if (null != instance) { instance.getStrategy().getIndicator...
Method findById.
public final CC growX(){ hor.setGrow(ResizeConstraint.WEIGHT_100); return this; }
Grow weight for the component horizontally. It default to weight <code>100</code>. <p> For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
private void replace(final char[] revA,final char[] revB,final DiffBlock curA,final DiffBlock curB) throws UnsupportedEncodingException { String text=copy(revB,curB.getRevBStart(),curB.getRevBEnd()); DiffPart action=new DiffPart(DiffAction.REPLACE); action.setStart(version.length()); codecData.checkBlocksizeS(v...
Creates a replace operation.
public static HTMLPanelInfo attachToDom(HTMLPanel panel){ if (hiddenDiv == null) { hiddenDiv=Document.get().createDivElement(); UIObject.setVisible(hiddenDiv,false); RootPanel.getBodyElement().appendChild(hiddenDiv); } Element origParent=panel.getElement().getParentElement(); Element origSibling=pan...
Ensure that the given HTMLPanel will be attached to DOM. It must be ensured before the HTMLPanel children widgets are processed.
public void testPawnMoves() throws ChessParseError { String fen="1r2k3/P1pppp2/8/1pP3p1/1nPp2P1/n4p1P/1P2PP2/4KBNR w K b6 0 1"; Position pos=TextIO.readFEN(fen); assertEquals(fen,TextIO.toFEN(pos)); List<String> strMoves=getMoveList(pos,false); assertTrue(strMoves.contains("c5xb6")); assertTrue(strMoves.con...
Test of pseudoLegalMoves method, of class MoveGen. Pawn moves.
public void performBackup(ParcelFileDescriptor oldState,BackupDataOutput data,ParcelFileDescriptor newState){ performBackup_checked(oldState,data,newState,mFiles,mFiles); }
Based on oldState, determine which of the files from the application's data directory need to be backed up, write them to the data stream, and fill in newState with the state as it exists now.
public static String fmtTime(long ms){ return TIME.format(new Date(ms)); }
Format time for display.
public void reset(){ m_connection=null; m_isTarget=isTarget(); m_isTempDisconnected=false; m_driver=null; m_url=null; m_charDevisor=1; m_isSavepointReleaseable=true; m_lastSilentError=null; m_isDoNotInterrupt=false; m_tables=null; m_views=null; m_operators=null; m_functions=null; m_triggers=...
release all metadata and initialize parameters
@Override public boolean step(final IScope scope){ getSpecies().getExplorationAlgorithm().run(scope); scope.getGui().getStatus().informStatus("Batch over. " + runNumber + " runs, "+ runNumber * seeds.length + " simulations."); dispose(); GAMA.getGui().updateExperimentState(IGui.NOTREADY); return true; }
Method step()
protected void onStop(){ if (mActionBar != null) mActionBar.setShowHideAnimationEnabled(false); }
Called to tell you that you're stopping.
public WifiDirectPeerNetwork(){ }
Create a WifiDirectPeerNetwork with no remote network devices to talk to.
protected Map<String,List<StoragePool>> sortPoolsByVPlexStorageSystem(List<StoragePool> storagePools,String varrayId,String cluster){ Map<String,List<StoragePool>> vplexPoolMap=new HashMap<String,List<StoragePool>>(); Map<URI,List<StoragePool>> poolsBySystem=getPoolsBySystem(storagePools); for ( URI systemUri : ...
Determines if each pool is on storage system that is connected to a VPlex storage system that has connectivity to the passed varray. If so, the pool is mapped to that VPlex storage system.
public Distribution(double[][] table){ int i, j; m_perClassPerBag=table; m_perBag=new double[table.length]; m_perClass=new double[table[0].length]; for (i=0; i < table.length; i++) { for (j=0; j < table[i].length; j++) { m_perBag[i]+=table[i][j]; m_perClass[j]+=table[i][j]; totaL+=table[...
Creates and initializes a new distribution using the given array. WARNING: it just copies a reference to this array.
public double eval(double params[]){ return (Math.log(params[0]) / Math.log(params[1])); }
Evaluate the logarithm (to a specified base).
private void disable(){ if (fReconciler != null) { fReconciler.uninstall(); fReconciler=null; } if (fPresenter != null) { fPresenter.uninstall(); fPresenter=null; } }
Disable advanced highlighting.
public RgbFilter(final int red,final int green,final int blue){ this(red,green,blue,0,1); }
Creates a new filter.
private void checkInvariants(){ assert (wordsInUse == 0 || words[wordsInUse - 1] != 0); assert (wordsInUse >= 0 && wordsInUse <= words.length); assert (wordsInUse == words.length || words[wordsInUse] == 0); }
Every public method must preserve these invariants.
public static String shorten(String s,int length,String suffix){ length-=suffix.length(); if (s.length() > length) { for (int j=length; j >= 0; j--) { if (CharUtil.isWhitespace(s.charAt(j))) { length=j; break; } } String temp=s.substring(0,length); s=temp.concat(suffix); ...
Shorten string to given length.