code
stringlengths
10
174k
nl
stringlengths
3
129k
public static boolean isGeolocType(String mime){ return mime != null && mime.toLowerCase().startsWith(GeolocInfoDocument.MIME_TYPE); }
Is a geolocation event type
@Override protected UUID doTask() throws Exception { final String name=getOnlyResource(); IIndex ndx=getJournal().getIndex(name); if (ndx != null) { final UUID indexUUID=ndx.getIndexMetadata().getIndexUUID(); if (log.isInfoEnabled()) log.info("Index exists: name=" + name + ", indexUUID="+ indexUUID); ...
Create the named index if it does not exist.
protected void clearOutEvents(){ sCISafe.clearOutEvents(); }
This method resets the outgoing events.
public static Object wrap(Object object){ try { if (object == null) { return NULL; } if (object instanceof JSONObject || object instanceof JSONArray || NULL.equals(object)|| object instanceof JSONString|| object instanceof Byte|| object instanceof Character|| object instanceof Short|| object instanc...
Wrap an object, if necessary. If the object is null, return the NULL object. If it is an array or collection, wrap it in a JSONArray. If it is a map, wrap it in a JSONObject. If it is a standard property (Double, String, et al) then it is already wrapped. Otherwise, if it comes from one of the java packages, turn it in...
@Override protected void onStop(){ super.onStop(); Log.d(TAG,"onStop() - the activity is no longer visible (it is now \"stopped\")"); }
Called when Activity is no longer visible. Release resources that may cause memory leak. Save instance state (onSaveInstanceState()) in case activity is killed.
public TextureAtlas packTexturesFromAssets(int atlasWidth,int altasHeight,int padding,boolean useCompresison,String subDir){ assetsToStreams(subDir); return createAtlas(atlasWidth,altasHeight,padding,useCompresison); }
Used for loading images from assets. If <code>subDir</code> is blank the root <code>assets</code> folder will be searched Returns a packed <code>TextureAtlas</code>
public static void main(String[] args){ Locale saveLocale=Locale.getDefault(); try { TestSupplementary tester=new TestSupplementary(); run(tester,ARGS,TEST,NEGATED_TEST); tester.printSummary(); } finally { Locale.setDefault(saveLocale); } }
The entry point of the test.
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); if (factor == null) { throw new NullPointerException(); } if (laggedFactor == null) { throw new NullPointerException(); } }
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 ObjectMatrix2D viewColumn(int column){ checkColumn(column); int viewRows=this.slices; int viewColumns=this.rows; int viewRowZero=sliceZero; int viewColumnZero=rowZero; int viewOffset=this.offset + _columnOffset(_columnRank(column)); int viewRowStride=this.sliceStride; int viewColumnStride=this.ro...
Constructs and returns a new 2-dimensional <i>slice view</i> representing the slices and rows of the given column. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa. <p> To obtain a slice view on subranges, construct a sub-ranging view (<tt>view().p...
private boolean validateRequiredVolumeConfiguration(StoragePool sourcePool,StoragePool targetPool,Volume vpoolChangeVolume,Map<StoragePool,StorageSystem> destPoolStorageMap,MetaVolumeRecommendation sourceVolumeRecommendation,long size,boolean isThinlyProvisioned,boolean fastExpansion,long sourceMaxVolumeSizeLimitKb){ ...
Check if target pool can support required volume configuration for srdf target volume.
protected final void discardBackup(){ backup=false; backupTokens.clear(); }
Discards the backed up tokens.
public static boolean isTheSamePomodoroDay(@Nullable DateTime first,@Nullable DateTime second){ if (first != null && second != null) { boolean sameDay=first.getYear() == second.getYear() && first.getDayOfYear() == second.getDayOfYear(); boolean isBothAfter6am=first.getHourOfDay() > 6 && second.getHourOfDay() ...
Checks if we the 2 dates are in the same day. After 6AM means that it is the next day.
public static void run(AdSense adsense,String adClientId,int maxReportPageSize) throws Exception { System.out.println("================================================================="); System.out.printf("Running report for ad client %s\n",adClientId); System.out.println("=======================================...
Runs this sample.
private void calculateComponentPosition(int index,int defaultWidth,Rectangle rect,Dimension rendererSize,Dimension selectedSize,boolean beforeSelected){ Style style=getStyle(); int initialY=style.getPadding(false,TOP); int initialX=style.getPadding(false,LEFT); boolean rtl=isRTL(); if (rtl) { initialX+=ge...
Calculates the desired bounds for the component and returns them within the given rectangle.
private Ptdemand adjustCollection(final List<Installment> installments,final Map<Installment,Set<EgDemandDetails>> newDemandDetailsByInstallment,final Set<String> demandReasons,Ptdemand ptDemand){ LOGGER.info("Entered into adjustCollection"); EgDemandDetails advanceDemandDetails=null; BigDecimal balanceDemand=Big...
Adjusts Collection amount to installment wise demand details
public Cache(int maxSize,long maxLifetime){ if (maxSize == 0) { throw new IllegalArgumentException("Max cache size cannot be 0."); } this.maxCacheSize=maxSize; this.maxLifetime=maxLifetime; map=new HashMap<K,CacheObject<V>>(103); lastAccessedList=new LinkedList(); ageList=new LinkedList(); }
Create a new cache and specify the maximum size of for the cache in bytes, and the maximum lifetime of objects.
public void done(final Step step,final Context context){ if (!(step instanceof SyntheticStep)) { eventBus.fireEvent(new StepEvent(context,step,true)); } executeNextStep(context); }
Should be invoked when step execution is successful.
private void makeTree(int nstep){ for (Enumeration<Body> e=bodiesRev(); e.hasMoreElements(); ) { Body q=e.nextElement(); if (q.mass != 0.0) { q.expandBox(this,nstep); MathVector xqic=intcoord(q.pos); if (root == null) { root=q; } else { root=root.loadTree(q,xqic,Node.I...
Initialize the tree structure for hack force calculation.
private static int[] readProgramTable(final FontFile2 currentFontFile,final int table){ int[] program={}; final int startPointer=currentFontFile.selectTable(table); if (startPointer == 0) { LogWriter.writeLog("No program table found: " + table); } else { final int len=currentFontFile.getOffset(table); ...
Reads a program from a table in the font file.
protected SimpleQuery genSimpleQuery(DashboardAnalysis analysis) throws ScopeException, SQLScopeException, ComputingException, InterruptedException { if (analysis.getMainDomain() == null) { throw new ComputingException("if no kpi is defined, must have one single domain"); } Space root=analysis.getMainDomain()...
generate a simple query without metrics
private static void extract(String s,int start,ExtractFloatResult result){ int currentIndex=start; boolean foundSeparator=false; result.mEndWithNegSign=false; for (; currentIndex < s.length(); currentIndex++) { char currentChar=s.charAt(currentIndex); switch (currentChar) { case ' ': case ',': foundSe...
Calculate the position of the next comma or space or negative sign
public void writeGrain(long lba,byte[] data,int offset) throws IOException { assert data.length - offset >= NfcClient.SECTOR_SIZE; if (lba < nextLba) { throw new RuntimeException("Sectors are out of order"); } zeroSectors+=lba - nextLba; nextLba=lba + 1; if (isZero(data,offset,NfcClient.SECTOR_SIZE)) { ...
Write a data grain. Will be buffered until we have a full message of grains.
public GPUImageRGBDilationFilter(int radius){ this(getVertexShader(radius),getFragmentShader(radius)); }
Acceptable values for dilationRadius, which sets the distance in pixels to sample out from the center, are 1, 2, 3, and 4.
public ExecutionSynchronizationItemProvider(AdapterFactory adapterFactory){ super(adapterFactory); }
This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
@Override public boolean isConnected(){ return (delegate == null) ? super.isConnected() : delegate.isConnected(); }
Returns the connection state of the socket.
public synchronized void connect(BluetoothDevice device,boolean secure){ if (_debug) Log.d(TAG,"connect to: " + device.getName()); if (_state == STATE_CONNECTING) { cancelConnectThread(); } cancelCommunicationThread(_communicationThread); _connectThread=new ConnectThread(device,secure); _connectThread...
Start the ConnectThread to initiate a connection to a remote device.
@Override public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception { oauthServer.tokenKeyAccess("isAnonymous() || hasRole('ROLE_TRUSTED_CLIENT')").checkTokenAccess("hasRole('TRUSTED_CLIENT')"); }
Defines the security constraints on the token endpoints /oauth/token_key and /oauth/check_token Client credentials are required to access the endpoints
@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED}) @DSSpec(DSCat.SPEC_OTHERS) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-01-27 09:54:33.583 -0500",hash_original_method="8D45E71D432CDD40BD281029502FF1F3",hash_generated_method="A282D89E7B4612096D1395CC8DDD2706") public static boolean startActi...
Start a set of activities as a synthesized task stack, if able. <p>In API level 11 (Android 3.0/Honeycomb) the recommended conventions for app navigation using the back key changed. The back key's behavior is local to the current task and does not capture navigation across different tasks. Navigating across tasks and e...
public static void fill(byte[] array,int start,int end,byte value){ checkBounds(array.length,start,end); for (int i=start; i < end; i++) { array[i]=value; } }
Fills the specified range in the array with the specified element.
private int unFilledSpacesInHeaderGroup(int header){ int remainder=mDelegate.getCountForHeader(header) % mNumColumns; return remainder == 0 ? 0 : mNumColumns - remainder; }
Counts the number of items that would be need to fill out the last row in the group of items with the given header.
public void clearSounds(){ mSoundMap.clear(); }
Clears all of the previously set sounds and events.
public static Iterable<MatchResult> findMatches(Pattern pattern,CharSequence s){ List<MatchResult> results=new ArrayList<MatchResult>(); for (Matcher m=pattern.matcher(s); m.find(); ) results.add(m.toMatchResult()); return results; }
Find all the matches of a pattern in a charSequence and return the results as list.
protected Long wrapValue(long k){ return new Long(k); }
Wraps a value
public comment removeElement(String hashcode){ removeElementFromRegistry(hashcode); return (this); }
Removes an Element from the element.
public boolean isData(String name){ return isDefinedAs(name,LocalType.DATA); }
In this scope or some enclosing scope, is a given name defined as data via a local "var" or formal parameter declaration?
public SequenceType type(){ if (mIsPaired) { return mLeft.type(); } else { return mSingle.type(); } }
Convenience method.
@Override public void readFrom(StreamInput in) throws IOException { duration=in.readLong(); timeUnit=TimeUnit.NANOSECONDS; }
serialization converts TimeValue internally to NANOSECONDS
public NotificationChain basicSetRightOperand(Expression newRightOperand,NotificationChain msgs){ Expression oldRightOperand=rightOperand; rightOperand=newRightOperand; if (eNotificationRequired()) { ENotificationImpl notification=new ENotificationImpl(this,Notification.SET,ExpressionsPackage.LOGICAL_AND_EXPR...
<!-- begin-user-doc --> <!-- end-user-doc -->
public void updateNodeSize(int nodeViewTag,int newWidth,int newHeight){ ReactShadowNode cssNode=mShadowNodeRegistry.getNode(nodeViewTag); cssNode.setStyleWidth(newWidth); cssNode.setStyleHeight(newHeight); if (mOperationsQueue.isEmpty()) { dispatchViewUpdates(-1); } }
Invoked when native view that corresponds to a root node, or acts as a root view (ie. Modals) has its size changed.
public boolean isCausedByNetworkIssue(){ return getCause() instanceof java.io.IOException; }
Tests if the exception is caused by network issue
public static CacheHeader readHeader(InputStream is) throws IOException { CacheHeader entry=new CacheHeader(); int magic=readInt(is); if (magic != CACHE_MAGIC) { throw new IOException(); } entry.key=readString(is); entry.etag=readString(is); if (entry.etag.equals("")) { entry.etag=null; } entr...
Reads the header off of an InputStream and returns a CacheHeader object.
private void maybeAddNewWizardActionsToWorkbench(){ IWorkbench workbench=Workbench.getInstance(); if (workbench != null) { workbench.addWindowListener(windowListener); maybeAddNewWizardActionsToWindow(workbench.getActiveWorkbenchWindow()); } else { } }
Adds the new wizards to the current perspective displayed in the workbench's active window, if they've not been added already. Adds listeners on the workbench so that the same is done for any new workbench windows that are created. Note: This method can only be called once the workbench has been started.
private void copyDefault(MAcctSchema targetAS) throws Exception { MAcctSchemaDefault source=MAcctSchemaDefault.get(getCtx(),p_SourceAcctSchema_ID); MAcctSchemaDefault target=new MAcctSchemaDefault(getCtx(),0,get_TrxName()); target.setC_AcctSchema_ID(p_TargetAcctSchema_ID); target.setC_AcctSchema_ID(p_TargetAcct...
Copy Default
@Override public boolean supportsDb(String type){ return true; }
No database tables used, so all supported
public void close() throws IOException { if (closed) { return; } rtcpSession.isByeRequested=true; closed=true; if (datagramConnection != null) { datagramConnection.close(); } if (this.getState() == State.NEW) { this.start(); } }
Close the transmitter
public GenericObjectEditorDialog(Dialog owner,Dialog.ModalityType modality){ super(owner,modality); }
Creates a dialog with the specified owner Dialog and modality.
public Family(String father,String mother,String... children){ mPedigree=new GenomeRelationships(); mIsDiseased=new boolean[children.length + FIRST_CHILD_INDEX]; mMembers=new String[children.length + FIRST_CHILD_INDEX]; for (int i=0; i < children.length; i++) { mPedigree.addParentChild(father,children[i]); ...
Construct family without pedigree
protected double calculateCategoryGapSize(int categoryCount,Rectangle2D area,RectangleEdge edge){ double result=0.0; double available=0.0; if ((edge == RectangleEdge.TOP) || (edge == RectangleEdge.BOTTOM)) { available=area.getWidth(); } else if ((edge == RectangleEdge.LEFT) || (edge == RectangleEdge.RIGH...
Calculates the size (width or height, depending on the location of the axis) of a category gap.
public static int minIndex(double[] doubles){ double minimum=0; int minIndex=0; for (int i=0; i < doubles.length; i++) { if ((i == 0) || (doubles[i] < minimum)) { minIndex=i; minimum=doubles[i]; } } return minIndex; }
Returns index of minimum element in a given array of doubles. First minimum is returned.
public boolean isVisible(){ return isVisible; }
Returns true if this node is visible, false otherwise.
public TermSuggestionBuilder sort(String sort){ this.sort=sort; return this; }
Sets how to sort the suggest terms per suggest text token. Two possible values: <ol> <li><code>score</code> - Sort should first be based on score, then document frequency and then the term itself. <li><code>frequency</code> - Sort should first be based on document frequency, then scotr and then the term itself. </ol> <...
public static void checkOpen(FileSystem fs){ checkArgument(fs.isOpen(),"file system must be open"); }
Ensures that the given file system is open.
public DestinationWrapper<Topic> lookupTopic(String uri,JMSContext context) throws JMSException, NamingException { if (usingJNDI || context == null) { return lookupTopicFromJNDI(uri); } else { return new DestinationWrapper<Topic>(uri,context.createTopic(uri)); } }
<b>JMS 2.0</b>
private TechnicalProduct createTechnicalProduct(Organization organization) throws Exception { TechnicalProduct technicalProduct=new TechnicalProduct(); technicalProduct.setProvisioningURL("http://"); technicalProduct.setProvisioningVersion("1.0"); technicalProduct.setTechnicalProductId("technicalProductId"); ...
Helper method for creating technical product.
public static long convertAmount(ExchangeRateProvider exchangeRates,String sourceCurrencyCode,long sourceAmount,String targetCurrencyCode){ double exchangeRate=exchangeRates.getExchangeRate(sourceCurrencyCode,targetCurrencyCode); return convertAmount(exchangeRate,sourceCurrencyCode,sourceAmount,targetCurrencyCode);...
Performs a currency conversion & unit conversion.
public AddUpdateRowDialog(DefaultTableModel mainTableModel,RowController rowController,Object[] columns,Object[] row,int rowIndex){ super(new Frame(),true); initComponents(); setLocationRelativeTo(null); defaultTableModel=(DefaultTableModel)addUpdateRowTable.getModel(); this.mainTableModel=mainTableModel; t...
Creates new form AddUpdateRowDialog
@Override public boolean eIsSet(int featureID){ switch (featureID) { case UmplePackage.AUTOUNIQUE_ATTRIBUTE___AUTOUNIQUE_1: return autounique_1 != AUTOUNIQUE_1_EDEFAULT; case UmplePackage.AUTOUNIQUE_ATTRIBUTE___NAME_1: return NAME_1_EDEFAULT == null ? name_1 != null : !NAME_1_EDEFAULT.equals(name_1); } return sup...
<!-- begin-user-doc --> <!-- end-user-doc -->
public void add(int startIndex,Point... sizes){ if (!valid()) { return; } invalidateLineMapAfter(startIndex); makeSpace(startIndex,sizes.length); int index=startIndex; for ( Point size : sizes) { sizeMap.put(index++,size); } refreshLineMap(); }
Add measured items into cache
public int size(int i){ return sizes.get(i); }
Returns the size associated with the specified vector.
public void mkdir(String dirName,int posixPermissions) throws IOException { int req_id=generateNextRequestID(); TypesWriter tw=new TypesWriter(); tw.writeString(dirName,charsetName); tw.writeUINT32(AttribFlags.SSH_FILEXFER_ATTR_PERMISSIONS); tw.writeUINT32(posixPermissions); sendMessage(Packet.SSH_FXP_MKDIR...
Create a new directory.
@SuppressWarnings("UnusedDeclaration") public void notifyDataSetChanged(final boolean force){ if (force) { mDecoratedBaseAdapter.notifyDataSetChanged(); } }
Helper function if you want to force notifyDataSetChanged()
public void clearUser(){ Bitmap bitmap=BitmapFactory.decodeResource(context.getResources(),R.drawable.avatar_36dp); setAvatarBitmap(bitmap); userFullName.setText(""); userName.setText(""); levelText.setText(""); levelProgress.setText(""); user=null; }
Clears information about any user, displaying the default avatar and no text.
private AuthorizationRequest createAuthorizationRequest(final HttpServletRequest request){ log.debug("Constructing authorization request"); final Map<String,String> requestParameters=createRequestMap(request.getParameterMap()); return authRequestFactory.createAuthorizationRequest(requestParameters); }
Create authorization request authorization request.
private static List<Territory> findUnitTerr(final GameData data,final PlayerID player,final Match<Unit> unitCondition){ final CompositeMatch<Unit> limitShips=new CompositeMatchAnd<>(unitCondition); final List<Territory> shipTerr=new ArrayList<>(); final Collection<Territory> tNeighbors=data.getMap().getTerritorie...
Return Territories containing any unit depending on unitCondition Differs from findCertainShips because it doesn't require the units be owned
BinaryMN(int kind,int name_index,int name_space,boolean ns_is_set,Set<Integer> versions){ this.kind=kind; this.nameID=name_index; this.nsID=name_space; this.nsIsSet=ns_is_set; this.versions=versions; }
Construct a non-parameterized name.
@Override public UntypedResultSet fetchRow(final String ksName,final String index,final String cfName,final String id,final String[] columns,final ConsistencyLevel cl) throws InvalidRequestException, RequestExecutionException, RequestValidationException, IOException { DocPrimaryKey docPk=parseElasticId(index,cfName,i...
Fetch from the coordinator node.
private void simpleAction(IMqttToken token,Bundle data){ if (token != null) { Status status=(Status)data.getSerializable(MqttServiceConstants.CALLBACK_STATUS); if (status == Status.OK) { ((MqttTokenAndroid)token).notifyComplete(); } else { Exception exceptionThrown=(Exception)data.getSerializ...
Common processing for many notifications
public void removeLink(HGPersistentHandle handle){ impl.removeLink(handle); }
<p>Remove a link value associated with a <code>HGPersistentHandle</code> key.</p>
public StochasticOscillatorDataset(){ this.data=new ArrayList<IndicatorSeries>(); }
Creates a new instance of <code>OHLCSeriesCollection</code>.
private void createModeShareHistoryChart(String title,String filePath,BenchmarkDataReader data,String xLabel,String yLabel,BenchmarkDataReader surveyData){ String[] newCategories=new String[data.getCategories().length + 2]; for (int p=0; p < data.getCategories().length; p++) newCategories[p]=data.getCategories()[...
Create series for each mode as percentage of total trips for each distance class
private Workflow.Method moidfyVolumesMethod(URI systemURI,URI poolURI,List<URI> volumeURIs){ return new Workflow.Method("modifyVolumes",systemURI,poolURI,volumeURIs); }
Return a Workflow.Method for createVolumes.
public static double[] updateTrackCalorie(Context context,Track track){ MyTracksProviderUtils myTracksProviderUtils=MyTracksProviderUtils.Factory.get(context); ActivityType activityType=getActivityType(context,track.getCategory()); if (activityType == ActivityType.INVALID) { clearCalorie(myTracksProviderUtils...
Updates calories for a track and its waypoints.
public void testInvokeAll3(){ testInvokeAll3(mainPool()); }
invokeAll(tasks) with > 2 argument invokes tasks
public final void testToString() throws Exception { KeyStore keyTest=KeyStore.getInstance(KeyStore.getDefaultType()); keyTest.load(null,null); ByteArrayInputStream certArray=new ByteArrayInputStream(certificate.getBytes()); ByteArrayInputStream certArray2=new ByteArrayInputStream(certificate2.getBytes()); Cer...
Test for <code>toString()</code>
public static byte[] toByteArray(Reader input,Charset encoding) throws IOException { ByteArrayOutputStream output=new ByteArrayOutputStream(); copy(input,output,encoding); return output.toByteArray(); }
Get the contents of a <code>Reader</code> as a <code>byte[]</code> using the specified character encoding. <p> This method buffers the input internally, so there is no need to use a <code>BufferedReader</code>.
public void addProcedure(Procedure procedure){ if (procedures == null) { procedures=database.newStringMap(); } procedures.put(procedure.getName(),procedure); }
Add a procedure to this session.
public Object runSafely(Catbert.FastStack stack) throws Exception { Airing a=getAir(stack); Agent bond=(Agent)stack.pop(); return (a != null && bond != null && bond.followsTrend(a,false,null)) ? Boolean.TRUE : Boolean.FALSE; }
Returns true if the specified Favorite object matches the specified Airing object.
public void validate(JetFormat format){ DatabaseImpl.validateIdentifierName(getName(),format.MAX_COLUMN_NAME_LENGTH,"column"); if (getType() == null) { throw new IllegalArgumentException(withErrorContext("must have type")); } if (getType().isUnsupported()) { throw new IllegalArgumentException(withErrorC...
Checks that this column definition is valid.
public DateMidnight toDateMidnight(){ return new DateMidnight(getMillis(),getChronology()); }
Converts this object to a <code>DateMidnight</code> using the same millis and chronology.
public boolean isMinuteTickMarksVisible(){ return null == minuteTickMarksVisible ? _minuteTickMarksVisible : minuteTickMarksVisible.get(); }
Returns true if the minute tickmarks will be drawn.
@Override protected void after(){ try { if (enabled) { boolean failed=true; boolean failedOnce=false; long timeout=System.currentTimeMillis() + 60000; while (failed && timeout > System.currentTimeMillis()) { failed=checkThread(); if (failed) { failedOnce=true; ...
Override to tear down your specific external resource.
void checkpoint(){ Data buffer=getBuffer(); buffer.writeByte((byte)CHECKPOINT); write(buffer); undo=new BitField(); logSectionId++; logPos=0; pageOut.flush(); pageOut.fillPage(); int currentDataPage=pageOut.getCurrentDataPageId(); logSectionPageMap.put(logSectionId,currentDataPage); }
Switch to a new log section.
public final boolean isOptimizeAE(){ return optimizeAE; }
Get the <code>OptimizeAE</code> value.
public static UiBinderXmlParser newInstance(IDOMModel xmlModel,ReferenceManager referenceManager,IValidationResultPlacementStrategy<?> validationResultPlacementStrategy) throws FileNotFoundException, UiBinderException { IFile xmlFile=SseUtilities.resolveFile(xmlModel); if (xmlFile == null) { throw new FileNotFo...
Returns a new instance of the parser.
private static String processXYPoints(final String points,final String pattern,final String coordSeparator,final String pointSeparator){ final int X_RELATIVE_INDEX=0; final int Y_RELATIVE_INDEX=1; final int COORDS_NUMBER=2; final String[] pointsArray=points.split(" "); String coords=""; logger.debug("(proce...
Coordinates convertion The template string of coordinates is: <p> "x1 y1 x2 y2 x3 y3 ... x1 y1" </p> <p> The method returns the list of 2D coordinates following the pattern passed as param. </p>
public Dimension maximumLayoutSize(Container target){ Dimension rd, mbd; Insets i=rootPane.getInsets(); Container contentPane=rootPane.getContentPane(); JMenuBar menuBar=rootPane.getJMenuBar(); if (menuBar != null && menuBar.isVisible()) { mbd=menuBar.getMaximumSize(); } else { mbd=new Dimension(0,...
Returns the maximum amount of space the layout can use.
private void fetchMaps(){ maps=GenericUtil.getTankFrame(getFakeWorld(),bottomDiagFrame,topDiagFrame); }
The maps contain the blocks on the: inside, outter frame, inner frame
public PrefixQuery(Term prefix){ super(prefix,toAutomaton(prefix.bytes()),Integer.MAX_VALUE,true); if (prefix == null) { throw new NullPointerException("prefix must not be null"); } }
Constructs a query for terms starting with <code>prefix</code>.
public Quaternion add(Quaternion q){ this.x+=q.x; this.y+=q.y; this.z+=q.z; this.w+=q.w; return this; }
Adds the values of this quaternion to those of the parameter quaternion. The result is stored in this Quaternion.
public static String createCompleteBugDescription(String userDescription,Throwable exception,boolean attachProcess,boolean attachSystemProps,boolean attachLog){ StringBuffer buffer=new StringBuffer(); buffer.append(userDescription); buffer.append(Tools.getLineSeparator()); buffer.append(Tools.getLineSeparator()...
Creates the complete description of the bug including user description, exception stack trace, system properties and RM and plugin versions.
public boolean hasContainsSampledData(){ return hasExtension(ContainsSampledData.class); }
Returns whether it has the flag indicating whether response contains sampled data.
public void testFindUserGroupsActiveDirectoryWithEmptyBase() throws Exception { LdapManager mgr=getLdapAD(); List ret=null; AndFilter filter=new AndFilter(); filter.and(new EqualsFilter(mgr.getGroupsReturningAttribute(LdapGroupAttributeConstants.LDAP_GROUP_ATTRIBUTE_MEMBER),"CN=nacho,CN=Users,DC=SERVIDOR-GDOC3,...
Test de busqueda de varios grupos de usuario para Active Directory con base vacio
public synchronized void addDragSourceListener(DragSourceListener dsl) throws TooManyListenersException { if (dsl == null) return; if (equals(dsl)) throw new IllegalArgumentException("DragSourceContext may not be its own listener"); if (listener != null) throw new TooManyListenersException(); else listen...
Add a <code>DragSourceListener</code> to this <code>DragSourceContext</code> if one has not already been added. If a <code>DragSourceListener</code> already exists, this method throws a <code>TooManyListenersException</code>. <P>
public static boolean is_system(SootMethod m){ Project p=Project.v(); SootClass c=m.getDeclaringClass(); return !p.isSrcClass(c) && !p.isLibClass(c); }
Returns true if the specified method is a system (android or java) class
public static void registerBackupManager(IBackupElectricItemManager manager){ backupManagers.add(manager); }
Register an electric item manager for items not implementing IElectricItem. This method is only designed for special purposes, implementing IElectricItem or ISpecialElectricItem instead of using this is faster. Managers used with ISpecialElectricItem shouldn't be registered.
private static boolean eq(double v1,double v2){ return v1 == v2; }
Compare two doubles for equality.
public CGraphSynchronizer(final ZyGraph graph,final CDebugPerspectiveModel debugPerspective){ m_graph=Preconditions.checkNotNull(graph,"IE02330: graph argument can not be null"); m_debugPerspective=Preconditions.checkNotNull(debugPerspective,"IE02331: debugPerspective argument can not be null"); debugPerspective....
Creates a new synchronizer object.
public RestAssessmentDetails fetchAssessmentDetails(final String assessmentNo){ PropertyImpl property; RestAssessmentDetails assessmentDetails=new RestAssessmentDetails(); BasicProperty basicProperty=basicPropertyDAO.getAllBasicPropertyByPropertyID(assessmentNo); if (basicProperty != null) { assessmentDetai...
Fetches Assessment Details - owner details, tax dues, plinth area, mutation fee related information
private static void listMethods(Output output,String protoDiscoveryRoot,ServiceDescriptor descriptor,Optional<String> methodFilter,Optional<Boolean> withMessage){ boolean printedService=false; File protoDiscoveryDir=new File(protoDiscoveryRoot).getParentFile(); for ( MethodDescriptor method : descriptor.getMetho...
Lists the methods on the service (the methodFilter will be applied if non-empty)
public boolean tryUnlockRead(){ long s, m; WNode h; while ((m=(s=state) & ABITS) != 0L && m < WBIT) { if (m < RFULL) { if (U.compareAndSwapLong(this,STATE,s,s - RUNIT)) { if (m == RUNIT && (h=whead) != null && h.status != 0) release(h); return true; } } else if (tr...
Releases one hold of the read lock if it is held, without requiring a stamp value. This method may be useful for recovery after errors.