code
stringlengths
10
174k
nl
stringlengths
3
129k
protected SIPClientTransaction(SIPTransactionStack newSIPStack,MessageChannel newChannelToUse){ super(newSIPStack,newChannelToUse); setBranch(Utils.getInstance().generateBranchId()); this.messageProcessor=newChannelToUse.messageProcessor; this.setEncapsulatedChannel(newChannelToUse); this.notifyOnRetransmit=f...
Creates a new client transaction.
public void testBug22359() throws Exception { if (versionMeetsMinimum(5,0)) { Statement timeoutStmt=null; try { timeoutStmt=this.conn.createStatement(); timeoutStmt.setQueryTimeout(2); long begin=System.currentTimeMillis(); try { timeoutStmt.execute("SELECT SLEEP(30)"); ...
Tests fix for BUG#22359 - Driver was using millis for Statement.setQueryTimeout() when spec says argument is seconds.
public List<String> copy(){ return new ArrayList<String>(warnings); }
Creates a copy of this warnings list.
public static boolean isExternalStorageWriteable(){ String state=Environment.getExternalStorageState(); return Environment.MEDIA_MOUNTED.equals(state); }
Returns true if the external storage is writable.
public static void main(String[] args) throws IOException { int terms=500; int docs=1000; int dimension=1200; int iterations=100; Random random=new Random(); float[][] cooccurences=randomInit(terms,docs,random); float[][] coocTrans=transpose(cooccurences); float[][] docVecs=randomInit(docs,dimension,ran...
Experiment that initializes a random term matrix, doc matrix, and coocurrence matrix, and reflectively trains them from each other.
static Element createParentElement(Path path,Element rootElement) throws ParseException { Preconditions.checkNotNull(path,"path"); Preconditions.checkNotNull(rootElement,"rootElement"); List<MetadataKey<?>> steps=path.getSteps(); if (steps.isEmpty()) { return null; } Element parent=rootElement; for (i...
Travels along the path, creating any elements that don't exist until it gets to the second-to-last key along the path.
public VcfFormatStringAnnotator(AbstractDerivedFormatAnnotation annotation){ assert annotation != null && annotation.getType().getClassType() == String.class; mAnnotation=annotation; }
Create an FORMAT annotation that outputs a string value.
private static double distance(double x1,double y1,double x2,double y2){ return Math.sqrt((y2 - y1) * (y2 - y1) + (x2 - x1) * (x2 - x1)); }
Calculates the distance between two given points in the plane.
public boolean isProxied(){ return (!(null == proxyHostName || 0 >= proxyPortNumber)); }
Returns <tt>true</tt> if the connection is established via a proxy, <tt>false</tt> otherwise.
public static void packKey(MemoryStoreData storeData){ storeData.rawKey=packKey(storeData.storageDescription,storeData.persistitKey); }
rawKey = join(uuidBytes, persistitKey.getEncodedBytes())
public DeleteAction(@Nullable JComponent target){ this(target,ID); }
Creates a new instance which acts on the specified component.
@Override public int nextInt(){ return (int)nextLong(); }
Return the next int in the sequence.
public static ImageEncoder newInstance(String format,float quality){ ImageEncoder imageEncoder=newInstance(format); imageEncoder.setQuality(quality); return imageEncoder; }
Used to retrieve an ImageEncoder for a specific image format.
public final void prepareNonBlocking(){ prepare(1); }
Prepare for processing where pop operations on the deques will never block.
@Override public void onPageScrolled(int position,float positionOffset,int positionOffsetPixels){ }
This method will be invoked when the current page is scrolled, either as part of a programmatically initiated smooth scroll or a user initiated touch scroll.
private boolean isWidgetNewlyCreated(){ long currentFolder=mPreferences.getLong(STATE_CURRENT_FOLDER,ChromeBrowserProviderClient.INVALID_BOOKMARK_ID); return currentFolder == ChromeBrowserProviderClient.INVALID_BOOKMARK_ID; }
This method relies on the fact that STATE_CURRENT_FOLDER pref is not yet set when onCreate is called for a newly created widget.
public void resolve(){ if (zone_letter == 'Z') { mgrs="Latitude limit exceeded"; } else { StringBuffer sb=new StringBuffer(Integer.toString(zone_number)).append(zone_letter).append(get100kID(easting,northing,zone_number)); StringBuffer seasting=new StringBuffer(Integer.toString((int)easting)); Stri...
Create the mgrs string based on the internal MGRS parameter settings, using the accuracy set in the MGRSPoint.
@Override public boolean scrollBackward(Selector obj,boolean isVertical,int steps) throws UiObjectNotFoundException { UiScrollable scrollable=new UiScrollable(obj.toUiSelector()); if (isVertical) scrollable.setAsVerticalList(); else scrollable.setAsHorizontalList(); return scrollable.scrollBackward(steps); }...
Performs a backward scroll. If the swipe direction is set to vertical, then the swipes will be performed from top to bottom. If the swipe direction is set to horizontal, then the swipes will be performed from left to right. Make sure to take into account devices configured with right-to-left languages like Arabic and H...
protected void clearEvents(){ sCInterface.clearEvents(); }
This method resets the incoming events (time events included).
public void startAutoScroll(int duration,int position){ this.mScrollPeriod=duration; this.mCurrentPosition=position; this.mAutoScroll=true; if (mImageList != null && !mImageList.isEmpty()) { setImageUrl(mImageList.get(mCurrentPosition)); } mHandler.removeCallbacks(mScrollRunnable); mHandler.postDelaye...
Auto Scroll
public String name(){ return theName; }
Returns the name of this element type.
public boolean isHistoricalDataRunning(Contract contract){ for ( Tradestrategy item : m_historyDataRequests.values()) { if (contract.equals(item.getContract())) { return true; } } return false; }
Method isHistoricalDataRunning.
@RequestProcessing(value="/admin/add-product",method=HTTPRequestMethod.POST) @Before(adviceClass={StopwatchStartAdvice.class,MallAdminCheck.class}) @After(adviceClass=StopwatchEndAdvice.class) public void addProduct(final HTTPRequestContext context,final HttpServletRequest request,final HttpServletResponse response) th...
Adds a product.
public PointsParser(){ pointsHandler=DefaultPointsHandler.INSTANCE; }
Creates a new PointsParser.
private String detectCharset(byte[] content,Integer offset){ log.debug("detectCharset: offset=" + offset); if (offset > content.length) return null; UniversalDetector detector=new UniversalDetector(null); detector.handleData(content,offset,content.length - offset > detectBuffer ? detectBuffer : content.length...
Detecting real content encoding
private ZyLayoutCreator(){ }
You are not supposed to instantiate this class.
public double nextDouble(){ return nextDouble(this.freedom); }
Returns a random number from the distribution.
@SuppressWarnings({"StringConcatenationInsideStringBufferAppend"}) public static String print(QueryPlanIndex[] indexSpecs){ StringBuilder buffer=new StringBuilder(); buffer.append("QueryPlanIndex[]\n"); String delimiter=""; for (int i=0; i < indexSpecs.length; i++) { buffer.append(delimiter); buffer.app...
Print index specifications in readable format.
public Bundler putIntArray(String key,int[] value){ bundle.putIntArray(key,value); return this; }
Inserts an int array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:20.469 -0500",hash_original_method="81B760547C7425A938D45D7063876C66",hash_generated_method="C859D3C5D2A0DB54DDA65A6979CC60D1") public SIPServerTransaction createServerTransaction(MessageChannel encapsulatedMessageChannel){ if (un...
Creates a server transaction that encapsulates a MessageChannel. Useful for implementations that want to subclass the standard
public void deleteFeaturizers(Set<String> disabledFeaturizers){ System.err.println("Featurizers to disable: " + disabledFeaturizers); Set<String> foundFeaturizers=new HashSet<String>(); List<Featurizer<TK,FV>> filteredFeaturizers=new ArrayList<>(); for ( Featurizer<TK,FV> f : featurizers) { String classNam...
Remove feature templates give a <code>Set</code> of class names.
public String saveLocalizedValues(){ setLocalizeVisible(false); if (selectedService == null) { return OUTCOME_ERROR; } saveLocalizedValues=true; if (selectedService != null) { String locale=getUserFromSession().getLocale(); selectedService.setName(LocaleUtils.get(localization.getNames(),locale)); ...
Save the localized values for the selected service in the database.
public void applyForce(float forceX,float forceY,float pointX,float pointY,boolean wake){ tmp.set(forceX,forceY); tmp2.set(pointX,pointY); body.applyForce(tmp,tmp2); }
Apply a force at a world point. If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity. This wakes up the body.
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case RegularExpressionPackage.SIMPLE_QUANTIFIER__QUANTIFIER: return getQuantifier(); } return super.eGet(featureID,resolve,coreType); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public MP3Player(PlayerCallback playerCallback,int audioBufferCapacityMs,int decodeBufferCapacityMs){ super(playerCallback,audioBufferCapacityMs,decodeBufferCapacityMs); }
Creates a new player.
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.
@Override protected EClass eStaticClass(){ return GamlPackage.Literals.IF; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public static boolean equals(DocSet a,DocSet b){ DocIterator iter1=a.iterator(); DocIterator iter2=b.iterator(); for (; ; ) { boolean n1=iter1.hasNext(); boolean n2=iter2.hasNext(); if (n1 != n2) { return false; } if (!n1) return true; int d1=iter1.nextDoc(); int d2=iter2.nex...
Iterates DocSets to test for equality - slow and for testing purposes only.
public static IXMLReader fileReader(String filename) throws FileNotFoundException, IOException { StdXMLReader r=new StdXMLReader(new FileInputStream(filename)); r.setSystemID(filename); for (int i=0; i < r.readers.size(); i++) { StackedReader sr=(StackedReader)r.readers.elementAt(i); sr.systemId=r.current...
Creates a new reader using a file as input.
public XObject execute(XPathContext xctxt,boolean destructiveOK) throws javax.xml.transform.TransformerException { org.apache.xml.utils.PrefixResolver xprefixResolver=xctxt.getNamespaceContext(); XObject result; if (m_fixUpWasCalled) { if (m_isGlobal) result=xctxt.getVarStack().getGlobalVariable(xctxt,m_i...
Dereference the variable, and return the reference value. Note that lazy evaluation will occur. If a variable within scope is not found, a warning will be sent to the error listener, and an empty nodeset will be returned.
private void $$$setupUI$$$(){ settingsPane=new JPanel(); settingsPane.setLayout(new GridLayoutManager(4,1,new Insets(0,0,0,0),-1,-1)); final JPanel panel1=new JPanel(); panel1.setLayout(new GridLayoutManager(4,1,new Insets(0,0,0,0),-1,-1)); settingsPane.add(panel1,new GridConstraints(3,0,1,1,GridConstraints.A...
Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code!
public CEventTableMenu(final JTable table,final CDebugPerspectiveModel model,final List<ITraceEvent> traces){ graphModel=model.getGraphModel(); addOpenFunction(SwingUtilities.getWindowAncestor(table),traces); add(new JMenuItem(CActionProxy.proxy(new CSetBreakpointsAction(model,traces)))); addSeparator(); add(...
Creates a new menu object.
public final double kappa(){ double[] sumRows=new double[m_ConfusionMatrix.length]; double[] sumColumns=new double[m_ConfusionMatrix.length]; double sumOfWeights=0; for (int i=0; i < m_ConfusionMatrix.length; i++) { for (int j=0; j < m_ConfusionMatrix.length; j++) { sumRows[i]+=m_ConfusionMatrix[i][j]...
Returns value of kappa statistic if class is nominal.
public static Map<String,String> parseCsKeyValue(String str){ Map<String,String> properties=new HashMap<String,String>(); String[] tokens=null; if (str != null) { tokens=str.trim().split(","); } for ( String token : tokens) { if (!token.isEmpty()) { String[] parts=token.split("=",2); if (...
Parse a comma separated string of key-value pairs into a {property -> value} Map. e.g. string format: "foo1=bar1,foo2=bar2,foo3=bar3..."
private View makeAndAddView(int position,int y,boolean flow,int childrenLeft,boolean selected){ View child; if (!mDataChanged) { child=mRecycler.getActiveView(position); if (child != null) { setupChild(child,position,y,flow,childrenLeft,selected,true); return child; } } child=obtainView(...
Obtain the view and add it to our list of children. The view can be made fresh, converted from an unused view, or used as is if it was in the recycle bin.
@SuppressWarnings("UnusedDeclaration") public boolean isEnabled(int type){ return events.isEnabled(type); }
Check if event is enabled.
protected boolean accept(E object) throws X { if (!initialized) { synchronized (this) { if (!initialized) { includeSet=addSecondSet(arg2,makeSet()); initialized=true; } } } if (inIncludeSet(object)) { if (distinct) { removeFromIncludeSet(object); } return true; ...
Returns <tt>true</tt> if the object is in the set of elements of the second argument.
public TransformerConfigurationException(Throwable e){ super(e); }
Create a new <code>TransformerConfigurationException</code> with a given <code>Exception</code> base cause of the error.
private void showMissingPermissionError(){ PermissionUtils.PermissionDeniedDialog.newInstance(true).show(getSupportFragmentManager(),"dialog"); }
Displays a dialog with error message explaining that the location permission is missing.
protected Probe(String name,long start){ this.name=name; this.start=start; }
Create a new probe with the start time from another probe.
public void render(Graphics g){ if (generator != null) { if ((needToRegenerate && generator.needGenerateToRender()) || !isVisible()) { Debug.message("grid","OMGrid: need to generate or is not visible!"); return; } } super.render(g); }
Render the OMGraphics created to represent the grid data.
@Override public boolean contains(Object object){ return indexOf(object,0) != -1; }
Searches this vector for the specified object.
public void sub(NamedRangeSet other){ List<NamedRange> newRanges=new ArrayList<NamedRange>(); OUTER_LOOP: for ( NamedRange range : ranges) { NamedRange thisRange=new NamedRange(range.start,range.end,range.name); for ( NamedRange otherRange : other.ranges) { if (otherRange.start <= thisRange.star...
Assumptions: ranges are disjoint, non-contiguous, and ordered. Names of ranges are not necessarily preserved.
public void flush(){ }
Flush the stream.
public WeakAlarm(String name,AlarmListener listener,long delta){ super(name,listener,delta); }
Creates a named alarm and schedules its wakeup.
private boolean isOnClassIgnoreList(String name){ return isOnList(classIgnoreList,name); }
Internal helper method to determine if a class name is on the list of classes to ignore.
protected String escape(String s){ StringBuffer result; int i; char c; if ((s.indexOf('\"') > -1) || (s.indexOf('\\') > -1) || (s.indexOf('\b') > -1)|| (s.indexOf('\f') > -1)|| (s.indexOf('\n') > -1)|| (s.indexOf('\r') > -1)|| (s.indexOf('\t') > -1)) { result=new StringBuffer(); for (i=0; i < s.length()...
Escapes ", /, \b, \f, \n, \r, \t.
public SmaliClassDetailLoader(ZipFile apkFile){ this(apkFile,true); }
Create a loader that loads everything (including instructions) from an APK file
public MemoryCircuitBreaker(ByteSizeValue limit,double overheadConstant,ESLogger logger){ this(limit,overheadConstant,null,logger); }
Create a circuit breaker that will break if the number of estimated bytes grows above the limit. All estimations will be multiplied by the given overheadConstant. This breaker starts with 0 bytes used.
@Override public String toString(){ StringBuilder retval=new StringBuilder(80); retval.append(Integer.toHexString(hashCode())); retval.append("["); retval.append("SSLEngine[hostname="); String host=getPeerHost(); retval.append((host == null) ? "null" : host); retval.append(" port="); retval.append(Integ...
Returns a printable representation of this end of the connection.
public static <T>T checkNotNull(T reference,Object errorMessage){ return com.google.common.base.Preconditions.checkNotNull(reference,errorMessage); }
Ensures that an object reference passed as a parameter to the calling method is not null.
public AddNodesResponse AddNodes(AddNodesRequest req) throws ServiceFaultException, ServiceResultException { return (AddNodesResponse)channel.serviceRequest(req); }
Synchronous AddNodes service request.
public void destroy(){ super.destroy(); }
Destruction of the servlet. <br>
@Inline static void compilePutfieldBarrierExtent(Assembler asm,GPR offset,int locationMetadata,BaselineCompilerImpl compiler){ putfieldStoreBarrierHelper(asm,compiler,offset,locationMetadata,Entrypoints.extentFieldWriteBarrierMethod); }
Generate code to perform a putfield barrier for a unboxed Extent field. On entry the stack holds: object, value.
public static String cutSuffix(String string,String suffix){ if (string.endsWith(suffix)) { string=string.substring(0,string.length() - suffix.length()); } return string; }
Cuts sufix if exists.
public void writeByte(int b) throws IOException { out.write(b); written++; }
Writes out a <code>byte</code> to the underlying output stream
public static void printErrorUndefined(String propName){ System.err.println("JVM property " + propName + " should be defined "+ "(use -D"+ propName+ "=...)"); }
Prints a message about undefined JVM property to standard error.
TransferHandler.DropLocation dropLocationForPoint(Point p){ return null; }
Calculates a custom drop location for this type of component, representing where a drop at the given point should insert data. <code>null</code> is returned if this component doesn't calculate custom drop locations. In this case, <code>TransferHandler</code> will provide a default <code>DropLocation</code> containing j...
public int copyLinesFrom(MProject project){ if (isProcessed() || project == null) return 0; int count=0; MProjectLine[] fromLines=project.getLines(); for (int i=0; i < fromLines.length; i++) { if ((fromLines[i].getC_ProjectPhase_ID() != 0) || (fromLines[i].getC_ProjectTask_ID() != 0)) continue; MP...
Copy Lines From other Project
@Override public void run(){ amIActive=true; String inputHeader=null; String streamsHeader=""; String outputHeader=null; int row, col, x, y; int progress=0; double myPointer, neighbourPointer; int i; int[] dX=new int[]{1,1,1,0,-1,-1,-1,0}; int[] dY=new int[]{-1,0,1,1,1,0,-1,-1}; double[] inflowing...
Used to execute this plugin tool.
public void mapTreeViewerColumn(Enum<?> key,TreeViewerColumn column){ treeViewerColumnMap.put(key,column); }
Maps a column with the enumeration key. The implementing classes should map each column they create to the enum that represents that column. Later on the column can be retrieved with the enum key if needed.
public CLocalNodeCommentWrapper(final INaviViewNode node){ m_node=node; }
Creates a new wrapper object.
public ImageSource tilingEnabled(){ return tiling(true); }
Enable tiling of the image. This does not apply to preview images which are always loaded as a single bitmap., and tiling cannot be disabled when displaying a region of the source image.
private double calcLevelAlphaDetail(double alpha,int level){ return alpha / Math.pow(2.0,level - 1); }
Utility method to calculate level alpha detail
public EliminacionSerieVO abrirEliminacion(String idEliminacion,boolean mostrarResumenUinstalacion){ EliminacionSerieVO eliminacion=getEliminacion(idEliminacion); getConditionChecker().configureEliminacion(eliminacion); if (eliminacion != null && mostrarResumenUinstalacion) { addResumenUinstEliminacionVO(elim...
Pone una eliminacion a disposicion del usuario que solicita su apertura de manera que unicamente dicho usuario puede realizar acciones sobre la eliminacion
public void processingInstruction(String target,String data) throws org.xml.sax.SAXException { append(m_doc.createProcessingInstruction(target,data)); }
Receive notification of a processing instruction. <p>The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.</p> <p>A SAX parser should never report an XML declaration (XML 1.0, section 2.8) or a text declarati...
public V cloneValue(V v){ return v; }
Clones V object. By default assumes immutable object (i.e. a copy is not made). If object is mutable, override this method
private int explosion(X_M_ProductionPlan pp,MProduct product,BigDecimal qty,int line) throws Exception { MPPProductBOM bom=MPPProductBOM.getDefault(product,get_TrxName()); if (bom == null) { raiseError("Do not exist default BOM for this product :" + product.getValue() + "-"+ product.getName(),""); } MPPProd...
Explosion the Production Plan
public String evaluate(Kernel kernel,Instances data) throws Exception { long startTime; long endTime; int i; int n; m_Result=new StringBuffer(); startTime=System.currentTimeMillis(); kernel.buildKernel(data); endTime=System.currentTimeMillis(); m_Result.append("\n=== Model ===\n\n"); if (Utils.joinO...
Evaluates the Kernel with the given commandline options and returns the evaluation string.
public XObject executeRelativePathPattern(XPathContext xctxt,StepPattern prevStep) throws javax.xml.transform.TransformerException { XObject score=NodeTest.SCORE_NONE; int context=xctxt.getCurrentNode(); DTM dtm=xctxt.getDTM(context); if (null != dtm) { int predContext=xctxt.getCurrentNode(); DTMAxisTra...
Execute the match pattern step relative to another step.
private void removeNonArraysFieldsIfNewSettingsContainsFieldAsArray(Map<String,String> settings){ List<String> prefixesToRemove=new ArrayList<>(); for ( final Map.Entry<String,String> entry : settings.entrySet()) { final Matcher matcher=ARRAY_PATTERN.matcher(entry.getKey()); if (matcher.matches()) { ...
Removes non array values from the existing map, if settings contains an array value instead Example: Existing map contains: {key:value} New map contains: {key:[value1,value2]} (which has been flattened to {}key.0:value1,key.1:value2}) This ensure that that the 'key' field gets removed from the map in order to override ...
public DragClicked(GraphPanel component){ this.component=component; }
creates a new instance of the DragClicked listener
@Override public UpdateResponse deleteById(String id) throws SolrServerException, IOException { UpdateResponse ur=null; if (this.solr0 != null) ur=this.solr0.deleteById(id); if (this.solr1 != null) ur=this.solr1.deleteById(id); return ur; }
Deletes a single document by unique ID
@Override public boolean performFinish(){ if (dataSource.isProvided()) { UIUtils.showMessageBox(getShell(),"Read-only connection","This connection was provided by system administrator.\nIts settings can not be changed.",SWT.ICON_ERROR); return false; } if (!CommonUtils.isEmpty(dataSource.getLockPasswordHa...
This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using wizard as execution context.
@Timed @ExceptionMetered @GET @Produces(APPLICATION_JSON) public Iterable<String> secretListing(@Auth AutomationClient automationClient,@QueryParam("idx") Integer idx,@QueryParam("num") Integer num,@DefaultValue("true") @QueryParam("newestFirst") boolean newestFirst){ if (idx != null && num != null) { if (idx < 0...
Retrieve listing of secret names. If "idx" and "num" are both provided, retrieve "num" names starting at "idx" from a list of secret names ordered by creation date, with order depending on "newestFirst" (which defaults to "true")
private static void validateTextField(ServiceField field,String value){ if (StringUtils.isNotBlank(value)) { try { validateRegex(field.getName(),value,field.getValidation().getRegEx()); } catch ( Exception e) { throw APIException.badRequests.serviceFieldNonText(field.getName()); } if (...
Validates a text field.
public static ConditionOperand CMPL_EQUAL(){ return new ConditionOperand(CMPL_EQUAL); }
Create the condition code operand for CMPL_EQUAL
public void fireBlockDownloaded(){ for ( ViewSystem viewSystem : super.getViewSystem()) { viewSystem.blockDownloaded(); } if (getModel() != null) { List<WalletData> perWalletModelDataList=getModel().getPerWalletModelDataList(); if (perWalletModelDataList != null) { for ( WalletData loopPer...
Method called by downloadListener whenever a block is downloaded.
public PcdRunner(GraphWrapper graphWrapper,Parameters params,KnowledgeBoxModel knowledgeBoxModel){ super(graphWrapper.getGraph(),params,knowledgeBoxModel); }
Constucts a wrapper for the given EdgeListGraph.
public DefaultRetryPolicy(int initialTimeoutMs,int maxNumRetries,float backoffMultiplier){ mCurrentTimeoutMs=initialTimeoutMs; mMaxNumRetries=maxNumRetries; mBackoffMultiplier=backoffMultiplier; }
Constructs a new retry policy.
private void doWork(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException { response.setDateHeader("Expires",0); response.setHeader("Cache-Control","no-cache"); response.setHeader("Pragma","no-cache"); response.setContentType("text/html; charset=UTF-8"); String code=Req...
Private methods
public ChildViewCache(final View parentView){ if (parentView == null) { throw new IllegalArgumentException("parentView cannot be null"); } this.parentView=parentView; }
Constructs a new ChildViewCache instance.
public void test_ConstructorLAttributedCharacterIteratorII(){ try { new AttributedString(new testAttributedCharacterIterator(),0,0); } catch ( Exception e) { fail("Unexpected exception " + e.toString()); } try { new AttributedString(new testAttributedCharacterIterator(),-1,0); fail("Expected I...
java.text.AttributedString#AttributedString(AttributedCharacterIterator, int, int) Test of method java.text.AttributedString#AttributedString(AttributedCharacterIterator, int, int). Case 1: Try to consruct AttributedString. Case 2: Try to consruct AttributedString using incorrect beginIndex. Case 3: Try to consruct Att...
@Override public boolean allocateBwForContainer(Container container,long bw){ deallocateBwForContainer(container); if (getAvailableVmBw() >= bw) { setAvailableVmBw(getAvailableVmBw() - bw); getContainerBwTable().put(container.getUid(),bw); container.setCurrentAllocatedBw(getAllocatedBwForContainer(conta...
Allocate BW for the container
public Seq<C> takeWhile(Predicate<C> condition){ Objects.requireNonNull(condition); Itr itr=new Itr(); MutableSeq<C> seq=Seqs.newMutableSeq(); while (itr.hasNext()) { C candidate=itr.next(); if (!condition.test(candidate)) { break; } seq.appendInPlace(candidate); } return seq; }
Get elements at the front of this range which satisfy the condition.
public CFilterAction(){ super("",new ImageIcon(CMain.class.getResource("data/funnel.png"))); }
Creates a new filter action object.
private boolean readFile(final File fl) throws IOException, FileNotFoundException { boolean success=false; BufferedReader reader=null; try { reader=new BufferedReader(new InputStreamReader(new FileInputStream(fl))); int line=1; String readLine=null; while (reader.ready() && (readLine=reader.readLi...
Reads traces from a text file, one line at a time.
static boolean isAlpha(int ch){ return ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')); }
Test if a character is a US-ASCII alpha (A-Z,a-z).
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
protected boolean isRetrieveResources(){ AVList params=(AVList)this.getValue(AVKey.CONSTRUCTION_PARAMETERS); if (params == null) return false; Boolean b=(Boolean)params.getValue(AVKey.RETRIEVE_PROPERTIES_FROM_SERVICE); return b != null && b; }
Returns a boolean value indicating if this Layer should retrieve any non-tile resources, either online or in the local filesystem, and initialize itself using those resources.