code
stringlengths
10
174k
nl
stringlengths
3
129k
public boolean isRunning(){ return running; }
Convenience method to determine whether a Nutch server is running.
public JPanel doLocale(){ JPanel panel=new JPanel(); panel.setLayout(new FlowLayout()); panel.add(localeBox); Runnable r=null; new Thread(r).start(); return panel; }
Create and return a JPanel for configuring default local. <P> Most of the action is handled in a separate thread, which replaces the contents of a JComboBox when the list of Locales is available.
public void writeToObject(Object data){ getTable().commitEditing(); Property[] properties=getProperties(); for (int i=0, c=properties.length; i < c; i++) { properties[i].writeToObject(data); } }
Writes the PropertySheet to the given object. If any, it commits pending edit before proceeding with properties.
public DNetscapeCaPolicyUrl(JDialog parent,byte[] value) throws IOException { super(parent); setTitle(res.getString("DNetscapeCaPolicyUrl.Title")); initComponents(); prepopulateWithValue(value); }
Creates a new DNetscapeCaPolicyUrl dialog.
public static void e(String tag,String msg){ if (sLevel > LEVEL_ERROR) { return; } Log.e(tag,msg); }
Send an ERROR log message
final public MutableString replace(final char c,final CharSequence s){ final int length=length(); char[] a=array; int i, j, l, newLength=length; if (s.length() == 0) throw new IllegalArgumentException("You cannot use the empty string as a replacement"); i=length; boolean found=false; while (i-- != 0) ...
Replaces each occurrence of a character with a corresponding character sequence. <P>Each occurrences of the character <code>c</code> in this mutable string will be replaced by <code>s</code>. Note that <code>s</code> must be nonempty. <P>This method will try <em>at most</em> one reallocation.
public ConfigureCoerceiveParsingDialog_NB(CoerciveParsing coerciveParsing){ this.coerciveParsing=coerciveParsing; initComponents(); final IterateModel numberOfTagsIterator=coerciveParsing.getNumberOfTagsIterator(); configureIterateModel_NB2.setStartAt(String.valueOf(numberOfTagsIterator.getStartAt())); config...
Creates new form ConfigureCoerceiveParsingDialog_NB
public boolean containsNode(N a){ return nodes.containsKey(a); }
Returns <tt>true</tt> if <tt>a</tt> is a node in the graph, or <tt>false</tt> otherwise.
public String prompt(String message,String defVal){ if (userAgent != null) { return userAgent.showPrompt(message,defVal); } return null; }
Displays an input dialog box, given the default value.
@NotNull public PsiQuery childrenNamed(@NotNull final Class<? extends PsiNamedElement> clazz,@NotNull final String name){ final List<PsiElement> result=new ArrayList<PsiElement>(); for ( final PsiElement element : myPsiElements) { for ( final PsiNamedElement child : PsiTreeUtil.findChildrenOfType(element,cl...
Filter children by name and class
public static Angle greatCircleAzimuth(LatLon p1,LatLon p2){ if ((p1 == null) || (p2 == null)) { throw new IllegalArgumentException("Lat Lon Is Null"); } double lat1=p1.getLatitude().radians; double lon1=p1.getLongitude().radians; double lat2=p2.getLatitude().radians; double lon2=p2.getLongitude().radia...
Computes the azimuth angle (clockwise from North) that points from the first location to the second location. This angle can be used as the starting azimuth for a great circle arc that begins at the first location, and passes through the second location.
private void loadModules(final CoreLoadingComponent loading){ final List<HeroicModule> modules=new ArrayList<>(); for ( final HeroicModule builtin : BUILTIN_MODULES) { modules.add(builtin); } modules.addAll(this.modules); for ( final HeroicModule module : modules) { module.setup(loading).run(); } ...
Load modules from the specified modules configuration file and wire up those components with early injection.
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:29:27.926 -0500",hash_original_method="50D1D865E8418E3E5575CE85EA5530DD",hash_generated_method="C19551BC9F6E3816DC99167E25922AE8") public ViewPropertyAnimator rotationYBy(float value){ animatePropertyBy(ROTAT...
This method will cause the View's <code>rotationY</code> property to be animated by the specified value. Animations already running on the property will be canceled.
LayerDrawable(Drawable[] layers,LayerState state){ this(state,null); int length=layers.length; ChildDrawable[] r=new ChildDrawable[length]; for (int i=0; i < length; i++) { r[i]=new ChildDrawable(); r[i].mDrawable=layers[i]; layers[i].setCallback(this); mLayerState.mChildrenChangingConfiguration...
Create a new layer drawable with the specified list of layers and the specified constant state.
public boolean validationRefreshEnabled(){ if (coordinator != null) { return Boolean.valueOf(ControllerUtils.getPropertyValueFromCoordinator(coordinator,VALIDATION_REFRESH_CHECK_PROPERTY)); } else { log.error("Bean wiring error: Coordinator not set, therefore validation will default to false."); } retu...
Check to see if we should perform refresh sys of provider. Usually this is only done when you are running automated suites where the provider may be out of sync with outside-of-controller operations.
public static void assertArrayEqual(byte[] expected,byte[] actual,String errorMessage){ if (verbose) { log("assertArrayEqual(" + arrayToString(expected) + ", "+ arrayToString(actual)+ ", "+ errorMessage+ ")"); } if (expected.length != actual.length) { TestUtils.assertBool(false); } for (int index=0; i...
Asserts that the given byte arrays are equal
private int measureHeight(int measureSpec){ int result=0; int specMode=MeasureSpec.getMode(measureSpec); int specSize=MeasureSpec.getSize(measureSpec); if (specMode == MeasureSpec.EXACTLY) { result=specSize; } else { result=TOAST_HEIGHT; if (specMode == MeasureSpec.AT_MOST) { result=Math.mi...
Determines the height of this view
public boolean equals(Object o){ if (o == null) { return false; } if (o instanceof PlaceMark) { PlaceMark po=(PlaceMark)o; return (po.col == col) && (po.player == player) && (po.row == row); } return false; }
Determine equality based on structure.
@Override public boolean hasMoreElements(){ return hasNext(); }
Enumeration version of hasNext()
public static MetricId join(MetricId... parts){ final StringBuilder nameBuilder=new StringBuilder(); final Map<String,String> tags=new HashMap<String,String>(); boolean first=true; for ( MetricId part : parts) { final String name=part.getKey(); if (name != null && !name.isEmpty()) { if (first) { ...
Join the specified set of metric names.
public synchronized void removeImageListener(ImageListener cl){ m_imageListeners.remove(cl); }
Remove an image listener
public boolean removePattern(CharacterPattern pattern){ synchronized (bytePatterns) { return bytePatterns.remove(pattern); } }
Removes one pattern from the list of patterns in this InputDecoder
private static View findTouchTargetView(float[] eventCoords,ViewGroup viewGroup){ int childrenCount=viewGroup.getChildCount(); for (int i=childrenCount - 1; i >= 0; i--) { View child=viewGroup.getChildAt(i); PointF childPoint=mTempPoint; if (isTransformedTouchPointInView(eventCoords[0],eventCoords[1],vi...
Returns the touch target View that is either viewGroup or one if its descendants. This is a recursive DFS since view the entire tree must be parsed until the target is found. If the search does not backtrack, it is possible to follow a branch that cannot be a target (because of pointerEvents). For example, if both C an...
void printValue(long value){ Log.write(value); }
Print the given value
@AroundInvoke public Object ensureIsNotServiceProvider(InvocationContext context) throws Exception { Object result=null; if (configService.isServiceProvider()) { UnsupportedOperationException e=new UnsupportedOperationException("It is forbidden to perform this operation if a OSCM acts as a SAML service provider...
Checks if OSCM acts as a SAML service provider. If so, an UnsupportedOperationException will be thrown.
@Override public void buildEvaluator(Instances data) throws Exception { getCapabilities().testWithFail(data); m_trainInstances=data; m_classIndex=m_trainInstances.classIndex(); m_numAttribs=m_trainInstances.numAttributes(); if (m_IRClassValS != null && m_IRClassValS.length() > 0) { try { m_IRClassVa...
Generates a attribute evaluator. Has to initialize all fields of the evaluator that are not being set via options.
@Override public ReferenceContainer<ReferenceType> remove(final byte[] termHash) throws IOException { removeDelayed(); ReferenceContainer<ReferenceType> c1=null; try { c1=this.array.get(termHash); } catch ( final SpaceExceededException e2) { ConcurrentLog.logException(e2); } if (c1 != null) { ...
deleting a container affects the containers in RAM and all the BLOB files the deleted containers are merged and returned as result of the method
protected Object invoke(Method method,Object arg1,Object arg2){ return invoke(method,new Object[]{arg1,arg2}); }
Invokes a method on the wrapped object.
static <T>T wait(Task<T> task) throws ParseException { try { task.waitForCompletion(); if (task.isFaulted()) { Exception error=task.getError(); if (error instanceof ParseException) { throw (ParseException)error; } if (error instanceof AggregateException) { throw new Par...
Converts a task execution into a synchronous action.
public void loadChatFile(URL file,String format,String encoding,boolean processUnderstanding,boolean pin){ try { loadChatFile(Utils.openStream(file),format,encoding,MAX_FILE_SIZE,processUnderstanding,pin); } catch ( Exception exception) { throw new BotException(exception); } }
Process the log file from a URL.
public void guardarUnidadDocumentalEnFSExecuteLogic(ActionMapping mappings,ActionForm form,HttpServletRequest request,HttpServletResponse response){ List rangos=null; ActionErrors errores=null; boolean isSubtipoCaja=false; ServiceRepository services=ServiceRepository.getInstance(ServiceClient.create(getAppUser(...
Guarda las modificaciones realizadas sobre la informacion de cabecera de una unidad documental tras haber realizado una edicion
public boolean isPaused(){ return paused; }
Returns true is the system is paused, and false otherwise
public String composeFullRelativePath(String path){ Configuration configuration=AppBeans.get(Configuration.NAME); GlobalConfig globalConfig=configuration.getConfig(GlobalConfig.class); String webAppPrefix="/".concat(globalConfig.getWebContextName().intern()); return path.startsWith("/") ? webAppPrefix.concat(pa...
Basically this method prepends webapp's prefix to the path
@Override public boolean equals(Object obj){ if (obj == this) { return true; } if (obj instanceof CustomXYToolTipGenerator) { CustomXYToolTipGenerator generator=(CustomXYToolTipGenerator)obj; boolean result=true; for (int series=0; series < getListCount(); series++) { for (int item=0; item <...
Tests if this object is equal to another.
public boolean canAdvanceToNextBasicBlock(){ return currentMatch == null || currentMatch.allowTrailingEdges(); }
Determine if it is possible to continue matching in a successor basic block.
public Thread(){ }
Allocates a new Thread object. Threads created this way must have overridden their run() method to actually do anything.
public void close(){ flush(); this.systemAgent.setCacheCollector(null); }
Closes this <code>CacheCollector</code> so it no longer processes snapshot fragments.
public LogisticRegressionDCD(double C){ this(C,100); }
Creates a new Logistic Regression learner that does no more than 100 training iterations.
public void addTransactions(final Collection<Transaction> transactions){ transactions.forEach(null); }
Adds new transactions to this block.
@Override public void process(V tuple){ if (baseValue != 0) { double cval=tuple.doubleValue() - baseValue; change.emit(getValue(cval)); percent.emit((cval / baseValue) * 100); } }
Process each key, compute change or percent, and emit it.
private Colors(){ }
This class should not be constructed.
@Override public int compareTo(ByteArrayWrapper other){ int compareTo=UnsafeComparer.INSTANCE.compareTo(dictionaryKey,other.dictionaryKey); if (compareTo == 0) { for (int i=0; i < noDictionaryKeys.length; i++) { compareTo=UnsafeComparer.INSTANCE.compareTo(noDictionaryKeys[i],other.noDictionaryKeys[i]); ...
Compare method for ByteArrayWrapper class this will used to compare Two ByteArrayWrapper data object, basically it will compare two byte array
public static byte[] toByteArray(URI uri) throws IOException { return IOUtils.toByteArray(uri.toURL()); }
Get the contents of a <code>URI</code> as a <code>byte[]</code>.
private static String fixStringLength(String inString,int length,boolean right){ if (inString.length() < length) { while (inString.length() < length) { inString=(right ? inString.concat(" ") : " ".concat(inString)); } } else if (inString.length() > length) { inString=inString.substring(0,length...
Pads a string to a specified length, inserting spaces as required. If the string is too long, characters are removed (from the right).
private static Counter<String> loadWeights(String wtsInitialFile,boolean uniformStartWeights,boolean randomizeStartWeights,TranslationModel<IString,String> translationModel){ Counter<String> weights=IOTools.readWeights(wtsInitialFile); if (weights == null) weights=new ClassicCounter<>(); if (uniformStartWeights...
Configure weights stored on file.
private void updateProgress(int progress){ if (myHost != null) { myHost.updateProgress(progress); } else { System.out.println("Progress: " + progress + "%"); } }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
public static Charset toCharset(Charset charset){ return charset == null ? Charset.defaultCharset() : charset; }
Returns the given Charset or the default Charset if the given Charset is null.
@Override public void doGet(BaseSolrResource endpoint,String childId){ SolrQueryResponse response=endpoint.getSolrResponse(); if (childId != null) { String key=getIgnoreCase() ? childId.toLowerCase(Locale.ROOT) : childId; if (!managedWords.contains(key)) throw new SolrException(ErrorCode.NOT_FOUND,Strin...
Implements the GET request to provide the list of words to the client. Alternatively, if a specific word is requested, then it is returned or a 404 is raised, indicating that the requested word does not exist.
public void addAnswer(DNSRecord rec,long now) throws IOException { if (rec != null) { if ((now == 0) || !rec.isExpired(now)) { MessageOutputStream record=new MessageOutputStream(512,this); record.writeRecord(rec,now); byte[] byteArray=record.toByteArray(); if (byteArray.length < this.avail...
Add an answer to the message.
public void testFloatVersionField() throws Exception { updateJ(jsonAdd(sdoc("id","aaa","name","a1","my_version_f","10.01")),params("update.chain","external-version-float")); assertU(commit()); updateJ(jsonAdd(sdoc("id","aaa","name","XX","my_version_f","4.2")),params("update.chain","external-version-float")); as...
Sanity check that there are no hardcoded assumptions about the field type used that could byte us in the ass.
public void saveFrame(){ try { g.save(savePath("screen-" + nf(frameCount,4) + ".tif")); } catch ( SecurityException se) { System.err.println("Can't use saveFrame() when running in a browser, " + "unless using a signed applet."); } }
Grab an image of what's currently in the drawing area and save it as a .tif or .tga file. <p/> Best used just before endDraw() at the end of your draw(). This can only create .tif or .tga images, so if neither extension is specified it defaults to writing a tiff and adds a .tif suffix.
public static byte[] decode(char[] in){ int iLen=in.length; if (iLen % 4 != 0) throw new IllegalArgumentException("Length of Base64 encoded input string is not a multiple of 4."); while (iLen > 0 && in[iLen - 1] == '=') iLen--; int oLen=(iLen * 3) / 4; byte[] out=new byte[oLen]; int ip=0; int op=0; ...
Decodes a byte array from Base64 format. No blanks or line breaks are allowed within the Base64 encoded data.
public void checkDistribution(int grpSize,int partCnt) throws Exception { IgniteUuid fileId=IgniteUuid.randomUuid(); IgfsGroupDataBlocksKeyMapper mapper=new IgfsGroupDataBlocksKeyMapper(grpSize); int lastPart=0; boolean first=true; for (int i=0; i < 10; i++) { boolean firstInGroup=true; for (int j=0; ...
Check hash code generation for the given group size and partitions count.
public double calcTargetPotentialDamage(Targetable target){ if (!(target instanceof Entity)) { return 0; } Entity entity=(Entity)target; return getMaxDamageAtRange(entity,1,false,false); }
Calculates the potential damage that the target could theoretically deliver as a measure of it's potential "threat" to any allied unit on the board, thus prioritizing highly damaging enemies over less damaging ones. For now, this works by simply getting the max damage of the target at range=1, ignoring to-hit, heat, et...
public static Response.Builder readHttp2HeadersList(List<Header> headerBlock) throws IOException { String status=null; Headers.Builder headersBuilder=new Headers.Builder(); for (int i=0, size=headerBlock.size(); i < size; i++) { ByteString name=headerBlock.get(i).name; String value=headerBlock.get(i).valu...
Returns headers for a name value block containing an HTTP/2 response.
public AlreadyBoundException(){ super(); }
Constructs an <code>AlreadyBoundException</code> with no specified detail message.
public static void logDebug(String message){ System.out.println(message); }
Prints a debug message
public void remove(){ this.next(); }
Skips the page by moving the iterator to the next page.
public Span adjust(int offset,int n){ if (offset < 0) return this; if (offset < end) { end+=n; if (end < offset) end=offset; } else return this; if (offset < start) { start+=n; if (start < offset) start=offset; } return this; }
Adjusts the start and end Position of the Span, if they are larger than the offset.
public void yypushback(int number){ if (number > yylength()) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos-=number; }
Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method
protected void listadoprestamosenelaboracionverExecuteLogic(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){ AppUser appUser=getAppUser(request); ServiceRepository services=ServiceRepository.getInstance(ServiceClient.create(appUser)); saveCurrentInvocation(KeysClient...
Muestra el listado de los prestamos actuales.
public void increment(final int index){ if (index >= mHisto.length) { mCount++; return; } mHisto[index]++; }
Increment the histogram counter as determined by index. If beyond the specified length then increment a separate counter.
@Override public void onContainersCompleted(List<ContainerStatus> statuses){ List<SamzaResourceStatus> samzaResrcStatuses=new ArrayList<>(); for ( ContainerStatus status : statuses) { log.info("Container completed from RM " + status); SamzaResourceStatus samzaResrcStatus=new SamzaResourceStatus(status.getC...
Callback invoked from Yarn when containers complete. This translates the yarn callbacks into Samza specific ones.
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd,int featureID,NotificationChain msgs){ switch (featureID) { case ExpressionsPackage.ASSIGNMENT_EXPRESSION__VAR_REF: return basicSetVarRef(null,msgs); case ExpressionsPackage.ASSIGNMENT_EXPRESSION__EXPRESSION: return basicSetExpression(null...
<!-- begin-user-doc --> <!-- end-user-doc -->
@Override public void loadTxMtd(JobConf job,FileSystem fs,Path txMtdDir,TfUtils agents) throws IOException { if (!isApplicable()) return; _finalMaps=new HashMap<Integer,HashMap<String,String>>(); if (fs.isDirectory(txMtdDir)) { for (int i=0; i < _colList.length; i++) { int colID=_colList[i]; Pat...
Method to load recode maps of all attributes, at once.
public void clear() throws KeeperException, InterruptedException { List<String> childNames=zookeeper.getChildren(dir,null,true); for ( String childName : childNames) { zookeeper.delete(dir + "/" + childName,-1,true); } }
Helper method to clear all child nodes for a parent node.
private void testImportNoFile(TrackFileFormat trackFileFormat){ deleteExternalStorageFiles(trackFileFormat); importTracks(trackFileFormat); EndToEndTestUtils.SOLO.waitForText(getImportErrorMessage(trackFileFormat)); EndToEndTestUtils.getButtonOnScreen(trackListActivity.getString(R.string.generic_ok),true,true);...
Tests import all when there is no file.
private void deleteTodo(HttpServletRequest request,HttpServletResponse response){ AsyncContext ctx=request.startAsync(); runAsync(ctx,null); }
Delete a to-do item.
private List<Integer> generateTableOrdering(List<Integer> defaultTableOrdering){ List<Integer> tableOrdering=new ArrayList<Integer>(this.tables.size()); if (defaultTableOrdering == null) { defaultTableOrdering=defaultTableOrdering(); } Set<Integer> tablesInFont=new TreeSet<Integer>(this.tables.keySet()); ...
Generate the full table ordering to used for serialization. The full ordering uses the partial ordering as a seed and then adds all remaining tables in the font in an undefined order.
private void handleCheckConflicts(Operation op){ TransactionServiceState existing=getState(op); ConflictCheckRequest req=op.getBody(ConflictCheckRequest.class); ConflictCheckResponse res=new ConflictCheckResponse(); res.subStage=existing.taskSubStage; res.serviceIsInWriteSet=existing.modifiedLinks.contains(re...
Handle the case when another, peer coordinator is about to commit, and wants to learn about a coordinator (this) in its write set.
private URI findVolumeInSubGroup(List<VolumeRestRep> volumesInCopy,String subGroup){ for ( VolumeRestRep fullCopyTargetVol : volumesInCopy) { VolumeRestRep fullCopySourceVol=fcTargetToSourceMap.get(fullCopyTargetVol.getId()); if (fullCopySourceVol == null && fullCopyTargetVol.getProtection() != null && fullC...
get one full copy volume from the application sub group
protected synchronized static void installShutdownHook(){ if (Config.parms.getBoolean("sh") && shutdownHookThread == null) { Runtime.getRuntime().addShutdownHook(shutdownHookThread=new ShutdownHook()); Log.logger.fine("Signal handler installed"); } }
Adds a signal handler which will attempt to intiate a controlled shutdown. Of course this might take a long time and the handler is stuck in a Thread.join with the ControlThread.
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case UmplePackage.NUM_EXPR___NAME_1: return getName_1(); case UmplePackage.NUM_EXPR___ANONYMOUS_NUM_EXPR_11: return getAnonymous_numExpr_1_1(); case UmplePackage.NUM_EXPR___ANONYMOUS_NUM_EXPR_21: return getAnonymous...
<!-- begin-user-doc --> <!-- end-user-doc -->
public TestGenerationResult waitForResult(int timeout){ try { long start=System.currentTimeMillis(); Set<ClientNodeRemote> clients=MasterServices.getInstance().getMasterNode().getClientsOnceAllConnected(timeout); if (clients == null) { logger.error("Could not access client process"); return Te...
<p> waitForResult </p>
public DownloadTask addDownloadTask(DownloadTask task,DownloadTaskListener listener){ DownloadTask downloadTask=currentTaskList.get(task.getId()); if (null != downloadTask && downloadTask.getDownloadStatus() != DownloadStatus.DOWNLOAD_STATUS_CANCEL) { Log.d(TAG,"task already exist"); return downloadTask; ...
if task already exist,return the task,else return null
public boolean isDataFlavorSupported(DataFlavor flavor){ DataFlavor[] flavors=getTransferDataFlavors(); for (int i=0; i < flavors.length; i++) { if (flavors[i].equals(flavor)) return true; } return false; }
Returns whether or not the specified data flavor is supported for this object.
private static void attemptRetryOnException(String logPrefix,Request<?> request,VolleyError exception) throws VolleyError { RetryPolicy retryPolicy=request.getRetryPolicy(); int oldTimeout=request.getTimeoutMs(); try { retryPolicy.retry(exception); } catch ( VolleyError e) { request.addMarker(String.f...
Attempts to prepare the request for a retry. If there are no more attempts remaining in the request's retry policy, a timeout exception is thrown.
protected Rectangle computePopupBounds(int px,int py,int pw,int ph){ Toolkit toolkit=Toolkit.getDefaultToolkit(); Rectangle screenBounds; int listWidth=getList().getPreferredSize().width; Insets margin=comboBox.getInsets(); if (hasScrollBars()) { px+=margin.left; pw=Math.max(pw - margin.left - margin....
Calculate the placement and size of the popup portion of the combo box based on the combo box location and the enclosing screen bounds. If no transformations are required, then the returned rectangle will have the same values as the parameters.
public static void copy(InputStream is,Resource out,boolean closeIS) throws IOException { OutputStream os=null; try { os=toBufferedOutputStream(out.getOutputStream()); } catch ( IOException ioe) { IOUtil.closeEL(os); throw ioe; } copy(is,os,closeIS,true); }
copy a input resource to a output resource
public static byte[] bitmapToBytes(Bitmap bm){ byte[] bytes=null; if (bm != null) { ByteArrayOutputStream baos=new ByteArrayOutputStream(); bm.compress(Bitmap.CompressFormat.PNG,100,baos); bytes=baos.toByteArray(); } return bytes; }
Bitmap transfer to bytes
@Override public void completeKeyword(Keyword keyword,ContentAssistContext contentAssistContext,ICompletionProposalAcceptor acceptor){ List<Keyword> suppressKeywords=new ArrayList<Keyword>(); EObject rootModel=contentAssistContext.getRootModel(); if (rootModel instanceof TransitionSpecification) { suppressKey...
Validates if a keyword should be viewed by the proposal view. Builds dependent on the ContentAssistContext a list with keywords which shouldn't be displayed by the proposal view.
public static void writeField(final Object target,final String fieldName,final Object value) throws IllegalAccessException { FieldUtils.writeField(target,fieldName,value,false); }
Write a public field. Superclasses will be considered.
public static void sleep(long millis){ if (mockSleepQueue == null) { sleepUninterruptibly(millis,TimeUnit.MILLISECONDS); } else { try { boolean isMultiPass=mockSleepQueue.take(); rollMockClockMillis(millis); if (isMultiPass) mockSleepQueue.offer(true); } catch ( InterruptedE...
Sleep for a span of time, or mock sleep if enabled
public boolean isMappedSuperclass(){ return getClassAccessor().isMappedSuperclass(); }
INTERNAL: Return whether the ClassAccessor on this MetadataDescriptor is a MappedSuperclassAccessor.
protected void computeTopology(final IScope scope) throws GamaRuntimeException { final IExpression expr=species.getFacet(IKeyword.TOPOLOGY); final boolean fixed=species.isGraph() || species.isGrid(); if (expr != null) { if (!fixed) { topology=GamaTopologyType.staticCast(scope,scope.evaluate(expr,host).g...
Initializes the appropriate topology.
public VcfHeader(){ mGenericMetaInformationLines=new ArrayList<>(); mSampleNames=new ArrayList<>(); mContigLines=new ArrayList<>(); mAltLines=new ArrayList<>(); mFilterLines=new ArrayList<>(); mInfoLines=new ArrayList<>(); mFormatLines=new ArrayList<>(); mSampleLines=new ArrayList<>(); mPedigreeLines=...
Create a new VCF header
public void updateBitmap(int x1,int y1,int w,int h,byte[] bytes,LinkProperties properties,int graphicUpdateMask) throws IOException { writeGraphicGestureHeader(graphicUpdateMask); LinkBitmap.write(x1,y1,w,h,bytes,properties,link.dos); }
Update the bitmap.
public static void copy(File srcDir,File relSrcFile,File destDir,File relDestFile) throws IOException { File finalSrcFile=(srcDir != null) ? new File(srcDir,relSrcFile.getPath()) : relSrcFile; File relDestDir=relDestFile.getParentFile(); if (relDestDir != null) { File finalDestDir=(destDir != null) ? new File...
Copy the specified source file given relative to the specified source folder to the specified destination file relative to the specified destination folder
public void postStop(){ }
Called after actor shutdown
public boolean isIntersect(){ return this.constructionElement.getAttributeNS(null,XPath2FilterContainer04._ATT_FILTER).equals(XPath2FilterContainer04._ATT_FILTER_VALUE_INTERSECT); }
Returns <code>true</code> if the <code>Filter</code> attribute has value "intersect".
public static void putbytes2Uint8s(char[] destUint8s,byte[] srcBytes,int destOffset,int srcOffset,int count){ for (int i=0; i < count; i++) { destUint8s[destOffset + i]=convertByte2Uint8(srcBytes[srcOffset + i]); } }
Put byte[] into char[]( we treat char[] as uint8[])
@Override public ParcelableMqttMessage createFromParcel(Parcel parcel){ return new ParcelableMqttMessage(parcel); }
Creates a message from the parcel object
protected static Map translateQueryFields(AxSfQueryField field,int fldid,AxSf axsfQ){ Map idsToValidate=new HashMap(); try { if (fldid == 5) { idsToValidate.put(new Integer(fldid),field.getValue()); } if ((fldid == 7 || fldid == 8) && !field.getOperator().equals(com.ieci.tecdoc.common.isicres.Keys...
Sustituimos los atributos con sistituto
public DexDataWriter(@Nonnull OutputStream output,int filePosition){ this(output,filePosition,256 * 1024); }
Construct a new DexWriter instance that writes to output.
public void handleSelection(int row){ int[] sel=TABLE.getSelectedRows(); if (sel.length == 0) { handleNoSelection(); return; } File selectedFile=getFile(sel[0]); LAUNCH_ACTION.setEnabled(true); LAUNCH_OS_ACTION.setEnabled(true); DELETE_ACTION.setEnabled(true); SEND_TO_ITUNES_ACTION.setEnabled(tr...
Handles the selection rows in the library window, enabling or disabling buttons and chat menu items depending on the values in the selected rows.
public Builder addCapHandlers(@NonNull Iterable<CapHandler> handlers){ for ( CapHandler curHandler : handlers) { addCapHandler(curHandler); } return this; }
Add a collection of cap handlers
static public void numberSort(@Nonnull String[] values) throws NumberFormatException { for (int i=0; i <= values.length - 2; i++) { for (int j=values.length - 2; j >= i; j--) { if (Integer.parseInt(values[j]) > Integer.parseInt(values[j + 1])) { String temp=values[j]; values[j]=values[j + 1]...
Sort String[] representing numbers, in ascending order.
@Override @SuppressWarnings("unchecked") HashMap.Entry<K,V>[] newElementArray(int s){ return new LinkedHashMapEntry[s]; }
Create a new element array
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:57:40.040 -0500",hash_original_method="E2DD3866058120BA248E0EBF124B1A36",hash_generated_method="D16830E2241A31CF3EA28FD7BB070D36") public static void fill(float[] array,int st...
Fills the specified range in the array with the specified element.
static <T0,T1,T2>Tuple3<T0,T1,T2> of(T0 e0,T1 e1,T2 e2){ return new Tuple3Impl<>(e0,e1,e2); }
Creates and returns a Tuple3 with the given parameters.