code
stringlengths
10
174k
nl
stringlengths
3
129k
public boolean isALevelTechnicallyValid(final String signatureId){ SignatureWrapper signatureWrapper=getSignatureByIdNullSafe(signatureId); return signatureWrapper.isALevelTechnicallyValid(); }
Indicates if the -A (-LTA) level is technically valid. It means that the signature of the archive timestamps are valid and their imprint is valid too.
public void onDrawerOpened(View drawerView){ super.onDrawerOpened(drawerView); }
Called when a drawer has settled in a completely open state.
public void addEmotion(final String trigger,final String npcAction){ add(ConversationStates.IDLE,Arrays.asList(trigger),ConversationStates.IDLE,null,new NPCEmoteAction(npcAction)); add(ConversationStates.ATTENDING,Arrays.asList(trigger),ConversationStates.ATTENDING,null,new NPCEmoteAction(npcAction)); }
make npc's emotion
public static void copyFile(File sourceFile,File destFile) throws IOException { FileInputStream fis=new FileInputStream(sourceFile); FileOutputStream fos=new FileOutputStream(destFile); fis.getChannel().transferTo(0,sourceFile.length(),fos.getChannel()); fis.close(); fos.close(); }
Copies a file.
public boolean remove(T value){ if (value == null) { throw new IllegalArgumentException("BinaryTree cannot store 'null' values."); } if (root == null) { return false; } RightThreadedBinaryNode<T> node=root; RightThreadedBinaryNode<T> parent=null; RightThreadedBinaryNode<T> n; do { int c=valu...
Remove the value from the tree. The key is to find the predecessor-value (pv) to the target-value (tv). You can set the value of 'tv' to be 'pv' and then delete the original 'pv' node by considering the following two cases (note that the original pv node cannot have a right child because it is the predecessor to tv)...
private static String lz(int num){ return String.format("%02d",num); }
add leadingZero if only 1 char
public int read(InputStream is){ init(); if (is != null) { if (!(is instanceof BufferedInputStream)) is=new BufferedInputStream(is); in=(BufferedInputStream)is; readHeader(); if (!err()) { readContents(); if (frameCount < 0) { status=STATUS_FORMAT_ERROR; } } } el...
Reads GIF image from stream
public CEventTableMenu(final JTable table,final List<ITraceEvent> traces){ addOpenFunction(SwingUtilities.getWindowAncestor(table),traces); add(new JMenuItem(CActionProxy.proxy(new CSearchTableAction(SwingUtilities.getWindowAncestor(table),table)))); add(new CopySelectionAction(table)); }
Creates a new menu object.
public Set<PersonUser> findPersonUsersByNameInGroup(String tenantName,PrincipalId groupId,String searchString,int limit) throws Exception { return getService().findPersonUsersByNameInGroup(tenantName,groupId,searchString,limit,this.getServiceContext()); }
Finds regular users in a particular group of the tenant Utilizes 'starts with'-style queries Regular expressions are not allowed in the search string at this time.
public boolean scale(@NonNull TextureView view,@NonNull ScaleType scaleType){ if (!ready()) { requestedScaleType=scaleType; requestedModificationView=new WeakReference<>(view); return false; } if (view.getHeight() == 0 || view.getWidth() == 0) { Log.d(TAG,"Unable to apply scale with a view size of...
Performs the requested scaling on the <code>view</code>'s matrix
protected Control createTitleControl(Composite parent){ titleLabel=new Label(parent,SWT.NONE); GridDataFactory.fillDefaults().align(SWT.FILL,SWT.CENTER).grab(true,false).span(showDialogMenu ? 1 : 2,1).applyTo(titleLabel); if (titleText != null) { titleLabel.setText(titleText); } return titleLabel; }
Creates the control to be used to represent the dialog's title text. Subclasses may override if a different control is desired for representing the title text, or if something different than the title should be displayed in location where the title text typically is shown. <p> If this method is overridden, the returned...
public boolean isCodeAttribute(){ return false; }
Returns <tt>true</tt> if this type of attribute is a code attribute.
static void checkCompatible(FieldInfo fieldInfo){ if (fieldInfo.getDocValuesType() != DocValuesType.NONE && fieldInfo.getDocValuesType() != TYPE.docValuesType()) { throw new IllegalArgumentException("field=\"" + fieldInfo.name + "\" was indexed with docValuesType="+ fieldInfo.getDocValuesType()+ " but this type h...
helper: checks a fieldinfo and throws exception if its definitely not a LatLonDocValuesField
public Vec3D applyTo(ReadonlyVec3D v){ return applyToSelf(new Vec3D(v)); }
Creates a copy of the given vector, transformed by this matrix.
public Boolean shouldOpenExternalUrl(String url){ return null; }
Hook for blocking the launching of Intents by the Cordova application. This will be called when the WebView will not navigate to a page, but could launch an intent to handle the URL. Return false to block this: if any plugin returns false, Cordova will block the navigation. If all plugins return null, the default polic...
public CacheClosedException(String msg){ super(msg); GemFireCacheImpl cache=GemFireCacheImpl.getInstance(); if (cache != null) { initCause(cache.getDisconnectCause()); } }
Constructs a new <code>CacheClosedException</code> with a message string.
public BufferedShapeLayer(){ super(); setProjectionChangePolicy(new com.bbn.openmap.layer.policy.StandardPCPolicy(this)); }
Initializes an empty shape layer.
private void doScroll(int delta){ scrollingOffset+=delta; int itemHeight=getItemHeight(); int count=scrollingOffset / itemHeight; int pos=currentItem - count; int itemCount=viewAdapter.getItemsCount(); int fixPos=scrollingOffset % itemHeight; if (Math.abs(fixPos) <= itemHeight / 2) { fixPos=0; } i...
Scrolls the wheel
public RtpPacket readRtpPacket() throws TimeoutException { byte[] data=(byte[])mBuffer.getObject(mTimeout); if (data == null) { throw new TimeoutException("Unable to fetch packet from FIFO queue!"); } RtpPacket pkt=parseRtpPacket(data); if (pkt != null) { mStats.numPackets++; mStats.numBytes+=data...
Read a RTP packet (blocking method)
public NestableRuntimeException(String msg,Throwable cause){ super(msg); this.cause=cause; }
Constructs a new <code>NestableRuntimeException</code> with specified detail message and nested <code>Throwable</code>.
protected DoubleMatrix2D viewSelectionLike(int[] rowOffsets,int[] columnOffsets){ return new SelectedDenseDoubleMatrix2D(this.elements,rowOffsets,columnOffsets,0); }
Construct and returns a new selection view.
public T process(ResultSet rs) throws SQLException { return (T)JdbcUtils.getResultSetValue(rs,this.mIndex,this.mExpectedType); }
The actual implementation of retrieving a column from the current row in the ResultSet.
public final void increaseReadBytes(long nbBytesRead,long currentTime){ throughputCalculationLock.lock(); try { readBytes+=nbBytesRead; lastReadTime=currentTime; } finally { throughputCalculationLock.unlock(); } }
Increases the count of read bytes by <code>nbBytesRead</code> and sets the last read time to <code>currentTime</code>.
public static DoubleMatrix2D minus(DoubleMatrix2D A,double s){ return A.assign(F.minus(s)); }
<tt>A = A - s <=> A[row,col] = A[row,col] - s</tt>.
public String toString(){ return getClass().getName() + "@" + Integer.toHexString(hashCode()); }
Return a string-ified representation of the MapBean.
public BoundedFifoBuffer(){ this(32); }
Constructs a new <code>BoundedFifoBuffer</code> big enough to hold 32 elements.
@Deprecated public static Configuration create(){ return createConfiguration(); }
For now we need to manually construct our Configuration, because we need to override the default one and it is currently not possible to use dynamically set values.
public boolean userCanDeleteGroup(int connectedUserId,int GroupId,String entidad) throws Exception { boolean can=false; int mgrGroup=Defs.NULL_ID; try { mgrGroup=this.getGroupMgrId(GroupId,entidad); can=hasUserGroupAuth(connectedUserId,USER_ACTION_ID_CREATE,mgrGroup,entidad); } catch ( Exception e) { ...
Obtiene si el usuario conectado puede eliminar el grupo indicado.
public void consumer(Class<?> api,@Pin ServiceRefAmp serviceRef,Result<? super Cancel> result){ String path=api.getName(); String address=address(path); EventNodeAsset node=lookupPubSubNode(address); Cancel cancel=node.consumeImpl(serviceRef); result.ok(cancel); }
Consume a callback to a location.
public JSONObject(JSONTokener x) throws JSONException { this(); char c; String key; if (x.nextClean() != '{') { throw x.syntaxError("A JSONObject text must begin with '{'"); } for (; ; ) { c=x.nextClean(); switch (c) { case 0: throw x.syntaxError("A JSONObject text must end with '}'"); case '}...
Construct a JSONObject from a JSONTokener.
private File testWriteInDefinedFormat(final GamaGraph graph,final String extension){ System.out.println("testing the writing in this format: " + format); File file=TestUtils.getTmpFile("emptyGraph",extension); IGraphWriter writer=AvailableGraphWriters.getGraphWriter(format); System.out.println("will use writer:...
Attempts to write the graph in the current format. ensures a file was created and returns its path.
public UnixNumericGroupPrincipal(String name,boolean primaryGroup){ if (name == null) { java.text.MessageFormat form=new java.text.MessageFormat(sun.security.util.ResourcesMgr.getString("invalid.null.input.value","sun.security.util.AuthResources")); Object[] source={"name"}; throw new NullPointerException...
Create a <code>UnixNumericGroupPrincipal</code> using a <code>String</code> representation of the user's group identification number (GID). <p>
AbstractBufferStrategy(long initialExtent,long maximumExtent,int offsetBits,long nextOffset,BufferMode bufferMode,boolean readOnly){ super(offsetBits); assert nextOffset >= 0; if (bufferMode == null) throw new IllegalArgumentException(); this.initialExtent=initialExtent; this.maximumExtent=maximumExtent; ...
(Re-)open a buffer.
public void testAddExtraClasspathWorksWithNoPreviousPath() throws Exception { AbstractInstalledLocalContainer container=new AbstractInstalledLocalContainerStub(configuration); container.setFileHandler(fileHandler); container.addExtraClasspath(TEST_FILE); assertEquals(1,container.getExtraClasspath().length); a...
Tests adding a JAR to the extra classpath when no path was set.
public static GitCommittedChangeList parseChangeList(Project project,VirtualFile root,StringScanner s,boolean skipDiffsForMerge,GitHandler handler,boolean local,boolean revertable) throws VcsException { ArrayList<Change> changes=new ArrayList<Change>(); final Date commitDate=GitUtil.parseTimestampWithNFEReport(s.li...
Parse changelist
public void storeCommonAttributes(Positionable p,Element element){ element.setAttribute("x","" + p.getX()); element.setAttribute("y","" + p.getY()); element.setAttribute("level",String.valueOf(p.getDisplayLevel())); element.setAttribute("forcecontroloff",!p.isControlling() ? "true" : "false"); element.setAttr...
Default implementation for storing the common contents of an Icon
public void popCurrentMatched(){ m_currentMatchTemplates.pop(); m_currentMatchedNodes.pop(); }
Pop the elements that were pushed via pushPairCurrentMatched.
public T id(View view){ this.view=view; reset(); return self(); }
Points the current operating view to the specified view.
ExternalProblem(Process process){ this(process.getInputStream(),process.getOutputStream()); RedirectStream.redirect(process.getErrorStream(),System.err); }
Constructs an external problem using the specified process.
public void endEntity(String name) throws org.xml.sax.SAXException { }
Report the end of an entity.
public void initFromStrings(String[] initData){ Long key; String value; String[] data; hashData.clear(); for ( String anInitData : initData) { data=anInitData.split(";"); for ( String aData : data) { String[] words=aData.split("="); key=Long.valueOf(words[0]); value=words[1]; ...
initialize hash map with values from an array of strings in the format "key=value"
public GreaterConstraint(Number constraintValue){ super(constraintValue); }
Creates a Greater-Than-Number parameter constraint. <p/> That is, the value of the number parameter has to be greater than the given constraint value.
public static boolean isCommand(final String name){ return (valueOfName(name) != null); }
Determines whether the specified name refers to a valid Locator launcher command, as defined by this enumerated type.
public AlgorithmException(Algorithm algorithm,String message){ this(algorithm,message,null); }
Constructs an algorithm exception originating from the specified algorithm with the given message.
@Override public int hashCode(){ return getName().hashCode(); }
Answers an integer hash code for the receiver. Objects which are equal answer the same value for this method. <p> The hash code for a Field is the hash code of the field's name.
public int size(){ return m_size; }
Return the number of elements in the map
public void decodeContinuous(BarcodeCallback callback){ this.decodeMode=DecodeMode.CONTINUOUS; this.callback=callback; startDecoderThread(); }
Continuously decode barcodes. The same barcode may be returned multiple times per second. The callback will only be called on the UI thread.
static Object[] toArrayImpl(Collection<?> c){ return fillArray(c,new Object[c.size()]); }
Returns an array containing all of the elements in the specified collection. This method returns the elements in the order they are returned by the collection's iterator. The returned array is "safe" in that no references to it are maintained by the collection. The caller is thus free to modify the returned array. <p>T...
public void declareExtensions(ExtensionProfile extProfile){ extProfile.declare(CellFeed.class,RowCount.getDefaultDescription()); extProfile.declare(CellFeed.class,ColCount.getDefaultDescription()); super.declareExtensions(extProfile); BatchUtils.declareExtensions(extProfile); }
Declares relevant extensions into the extension profile.
private MapUtil(){ }
Do not instantiate this class
public boolean test_autoselection(String package_name,List<String> details){ if (_autoselect_conditions == null || !is_applicable(package_name)) { return false; } if (_autoselect_conditions.contains("applicable")) { return true; } for ( String detail : details) { if (_autoselect_conditions.contai...
Checks whether this update source should be used as a default for the given app. This is a very primitive DSL related to source.json's "autoselect_if" information. A list of conditions is given in the file, and if any of them match, the update source is selected. Conditions may be related to the APK's signature (tests ...
public void verifyKey(VerifyEvent event){ try { event.doit=false; System.out.println("Heard keystroke."); IBindingService ibindingService=(IBindingService)UIHelper.getActivePage().getActivePart().getSite().getService(IBindingService.class); KeyStroke keyStroke=SWTKeySupport.convertAcceleratorToKeyStro...
Listens for the first key to be pressed. If it is a digit, it finds the word currently containing the caret and repeats that word the number of times equal to the digit pressed. If the key pressed is not a digit, this does nothing to the document and removes itself from subsequent key events.
public T caseActionArguments(ActionArguments object){ return null; }
Returns the result of interpreting the object as an instance of '<em>Action Arguments</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
@Override public void run(){ amIActive=true; String slopeHeader=null; String aspectHeader=null; String outputHeader=null; String horizonAngleHeader=null; double z; int progress; int[] dY={-1,0,1,1,1,0,-1,-1}; int[] dX={1,1,1,0,-1,-1,-1,0}; int row, col; double azimuth=0; boolean blnSlope=false; ...
Used to execute this plugin tool.
public SearchRequestBuilder addHighlightedField(String name){ highlightBuilder().field(name); return this; }
Adds a field to be highlighted with default fragment size of 100 characters, and default number of fragments of 5.
public List<ResultSet> query(String table,String[] columns,String selection,String[] selectionArgs){ return query(table,columns,selection,selectionArgs,null,null,null); }
a simple query by condition
public static double avg(Array array) throws ExpressionException { if (array.size() == 0) return 0; return sum(array) / array.size(); }
average of all values of the array, only work when all values are numeric
private static void readEventTypeMap(final BufferedReader in,final Map<Integer,Pair<Integer,String>> eventTypeMap,final String prefixToStrip,final String postfixToStrip) throws IOException { String line; while (!(line=in.readLine()).isEmpty()) { final int i=line.indexOf(':'); final int j=line.indexOf('(',i ...
Reads an event type map from the specified input, and puts entries to the speicified even type map.
public static void passedMutation(double distance,int mutationId){ ExecutionTracer tracer=getExecutionTracer(); if (tracer.disabled) return; if (isThreadNeqCurrentThread()) return; checkTimeout(); tracer.trace.mutationPassed(mutationId,distance); }
<p> passedMutation </p>
public String sqlMetadata_tableNames(String vendorName,String catalogName,String schemaName){ return m_interfaces.get(getDBVendorID(vendorName)).sqlMetadata_tableNames(catalogName,schemaName); }
gets the database specific SQL command to find table names
@Override public void run(){ amIActive=true; String outputHeader=""; int row, col; double rowYCoord, value; int progress=0; double cellSizeX, cellSizeY; int rows, topRow, bottomRow; int cols; int inputRow, inputCol; double inputX, inputY; double east; double west; double north; double south;...
Used to execute this plugin tool.
public boolean match(Element e,String pseudoE){ String val=getValue(); if (val == null) { return !e.getAttribute(getLocalName()).equals(""); } return e.getAttribute(getLocalName()).equals(val); }
Tests whether this condition matches the given element.
public void generateOptimizedGreaterThan(BlockScope currentScope,BranchLabel trueLabel,BranchLabel falseLabel,boolean valueRequired){ int promotedTypeID=(this.left.implicitConversion & TypeIds.IMPLICIT_CONVERSION_MASK) >> 4; if (promotedTypeID == TypeIds.T_int) { if ((this.left.constant != Constant.NotAConstant...
Boolean generation for >
int[] determineDimensions(int sourceCodeWords,int errorCorrectionCodeWords) throws WriterException { float ratio=0.0f; int[] dimension=null; for (int cols=minCols; cols <= maxCols; cols++) { int rows=calculateNumberOfRows(sourceCodeWords,errorCorrectionCodeWords,cols); if (rows < minRows) { break; ...
Determine optimal nr of columns and rows for the specified number of codewords.
@Override protected Rectangle makeShape(){ double xmin=PackedQuadPrefixTree.this.xmin; double ymin=PackedQuadPrefixTree.this.ymin; int level=getLevel(); byte b; for (short l=0, i=1; l < level; ++l, ++i) { b=(byte)((term >>> (64 - (i << 1))) & 0x3L); switch (b) { case 0x00: ymin+=levelH[l]; break...
Constructs a bounding box shape out of the encoded cell
@Override public boolean isComplete(){ return (status == STATUS_COMPLETE || status == STATUS_ERROR); }
NTLM2 is complete once we've delivered our authentication response (the Type3 message) or we've failed, whichever comes first.
public static int dehexchar(char hex){ if (hex >= '0' && hex <= '9') { return hex - '0'; } else if (hex >= 'A' && hex <= 'F') { return hex - 'A' + 10; } else if (hex >= 'a' && hex <= 'f') { return hex - 'a' + 10; } else { return -1; } }
Returns the integer [0..15] value for the given hex character, or -1 for non-hex input.
public static Number unaryMinus(Number left){ return NumberMath.unaryMinus(left); }
Negates the number. Equivalent to the '-' operator when it preceeds a single operand, i.e. <code>-10</code>
public boolean isQuery(){ return (_flags & DNSConstants.FLAGS_QR_MASK) == DNSConstants.FLAGS_QR_QUERY; }
Check if the message is a query.
public Geometry next() throws IOException { Geometry geom=null; try { recordNumber=file.readIntBE(); int contentLength=file.readIntBE(); try { geom=handler.read(file,geomFactory,contentLength); } catch ( IllegalArgumentException r2d2) { geom=new GeometryCollection(null,null,-1); ...
Returns the next geometry in the shapefile stream
public void readData(RowSetInternal caller) throws SQLException { Connection con=null; try { CachedRowSet crs=(CachedRowSet)caller; if (crs.getPageSize() == 0 && crs.size() > 0) { crs.close(); } writerCalls=0; userCon=false; con=this.connect(caller); if (con == null || crs.getComma...
Reads data from a data source and populates the given <code>RowSet</code> object with that data. This method is called by the rowset internally when the application invokes the method <code>execute</code> to read a new set of rows. <P> After clearing the rowset of its contents, if any, and setting the number of writer ...
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case GamlPackage.TYPE_REF__REF: if (resolve) return getRef(); return basicGetRef(); case GamlPackage.TYPE_REF__PARAMETER: return getParameter(); } return super.eGet(featureID,resolve,coreType); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public static boolean hasHttpTimerData(InvocationSequenceData data){ return data.getTimerData() instanceof HttpTimerData; }
Checks whether this data object contains a http timer data object.
public static boolean checkSequence(SequencesReader sequences,File outputFile) throws IOException { return checkPrereadNames(sequences.names(),outputFile); }
Run the duplicate detection on one set of input sequences.
public AdditiveOperator createAdditiveOperatorFromString(EDataType eDataType,String initialValue){ AdditiveOperator result=AdditiveOperator.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '"+ eDataType.getName()+ "'"); retu...
<!-- begin-user-doc --> <!-- end-user-doc -->
@Override protected EClass eStaticClass(){ return TypeRefsPackage.Literals.UNKNOWN_TYPE_REF; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public GlobalVisualEffectEvent(String effectName,int duration){ super(Events.GLOBAL_VISUAL); put(NAME_ATTR,effectName); put(DURATION_ATTR,duration); }
Create a new GlobalVisualEffectEvent.
public MetacatException(Response.Status status){ this(Response.status(status).type(MediaType.APPLICATION_JSON_TYPE).entity(EMPTY_ERROR).build(),null); }
Construct a new client error exception.
private byte[] generateDerivedKey(){ byte[] digestBytes=new byte[digest.getDigestSize()]; digest.update(password,0,password.length); digest.update(salt,0,salt.length); digest.doFinal(digestBytes,0); for (int i=1; i < iterationCount; i++) { digest.update(digestBytes,0,digestBytes.length); digest.doFina...
the derived key function, the ith hash of the password and the salt.
private int decodeBandTypes(int bandType[],int bandTypeRunEnd[],IndividualChannelStream ics){ int idx=0; final int bits=(ics.windowSequence[0] == EIGHT_SHORT_SEQUENCE) ? 3 : 5; for (int g=0; g < ics.numWindowGroups; g++) { int k=0; while (k < ics.maxSfb) { int sectEnd=k; int sectBandType=br.re...
Decode band types (section_data payload); reference: table 4.46.
public IMultimediaMessagingSession initiateMessagingSession(String serviceId,ContactId contact) throws RemoteException { return initiateMessagingSession2(serviceId,contact,null,null); }
Initiates a new session for real time messaging with a remote contact and for a given service extension. The messages are exchanged in real time during the session and may be from any type. The parameter contact supports the following formats: MSISDN in national or international format, SIP address, SIP-URI or Tel-URI....
public static FunctionalReadWriteLock reentrant(){ return create(new ReentrantReadWriteLock()); }
Create a read-write lock that supports reentrancy.
public JSONObject put(String key,int value) throws JSONException { this.put(key,new Integer(value)); return this; }
Put a key/int pair in the JSONObject.
public UUID generateUUID(){ String uuidString=""; UUID uuid=null; while (!uuidString.matches("[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}") || assignedUUIDs.contains(uuid)) { uuid=UUID.randomUUID(); uuidString=uuid.toString(); } assignedUUIDs.add(uuid); return uuid; }...
A method that generates a UUID Note: This method does not guarantee uniqueness across multiple invocations of the Photon library
public final void testValidateSucceeds(){ EmailAddressValidator emailAddressValidator=new EmailAddressValidator("foo"); assertTrue(emailAddressValidator.validate("")); assertTrue(emailAddressValidator.validate("foo@bar.com")); assertTrue(emailAddressValidator.validate("foo-100@bar.com")); assertTrue(emailAddr...
Tests the functionality of the validate-method, if it succeeds.
public boolean equivalentTo(Fitness _fitness){ MultiObjectiveFitness other=(MultiObjectiveFitness)_fitness; boolean abeatsb=false; boolean bbeatsa=false; if (objectives.length != other.objectives.length) throw new RuntimeException("Attempt made to compare two multiobjective fitnesses; but they have different ...
Returns true if I'm equivalent in fitness (neither better nor worse) to _fitness. The rule I'm using is this: If one of us is better in one or more criteria, and we are equal in the others, then equivalentTo is false. If each of us is better in one or more criteria each, or we are equal in all criteria, then equivalent...
public static void initConfig(Config config){ config.registerForUpdates(null); }
Must be called before logger objects are created.
public void tuneMemory(double m){ if (m == 0) memoryA=0.0; else memoryA=Math.pow(memoryA,1.0 / m); }
Values greater than 1.0 (towards infinite) increase the memory towards 1. Values smaller than 1.0 (towards zero) decreases the memory .
public void createPictScenario03_3() throws Exception { long usageStartTime=DateTimeHandling.calculateMillis("2013-03-01 00:00:00"); BillingIntegrationTestBase.setDateFactoryInstance(usageStartTime); String supplierAdminId="Pict03_3Supplier"; VOOrganization supplier=orgSetup.createOrganization(basicSetup.getPla...
See testcase #3 of BESBillingFactorCombinations.xlsx variation of testcase #3 with role change within time-unit hour w daylight savings change in same month March (simple version)
protected void addLiteralValuePropertyDescriptor(Object object){ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),getResourceLocator(),getString("_UI_Enumerator_literalValue_feature"),getString("_UI_PropertyDescriptor_description","_UI_Enumer...
This adds a property descriptor for the Literal Value feature. <!-- begin-user-doc --> <!-- end-user-doc -->
private void decodeRules(){ decodeStartRule(); decodeEndRule(); }
Given a set of encoded rules in startDay and startDayOfMonth, decode them and set the startMode appropriately. Do the same for endDay and endDayOfMonth. Upon entry, the day of week variables may be zero or negative, in order to indicate special modes. The day of month variables may also be negative. Upon exit, the ...
public void add(String item,int index){ addItem(item,index); }
Adds the specified item to the the scrolling list at the position indicated by the index. The index is zero-based. If the value of the index is less than zero, or if the value of the index is greater than or equal to the number of items in the list, then the item is added to the end of the list.
public RtpPacket readRtpPacket() throws TimeoutException { try { byte[] data=(byte[])fifo.getObject(timeout); if (data == null) { throw new TimeoutException(); } RtpPacket pkt=parseRtpPacket(data); if (pkt != null) { stats.numPackets++; stats.numBytes+=data.length; RtpSourc...
Read a RTP packet (blocking method)
public boolean canChangeTo(OnlineStatus newStatus){ if (this.equals(newStatus)) { return false; } if (newStatus.equals(UNKNOWN)) { return false; } switch (this) { case OFFLINE: if (newStatus.equals(ONLINE)) { return false; } case ONLINE: if (newStatus.equals(OFFLINE)) { return false;...
Defines if the status can be changed.
public ItemStack addItem(ItemStack drive,ItemStack item){ if (getMaxKilobits(drive) == -1) { if (getPartitioningMode(drive) == PartitioningMode.NONE || findDataIndexForPrototype(drive,createPrototype(item)) != -1) { item.stackSize=0; return null; } else { return item; } } int bitsFr...
Insert as many items as possible from the given stack into a drive. <p> The stackSize of the passed stack will be affected. Return value is for convenience, and will be null if all items are taken.
public void println(String s){ long now=System.currentTimeMillis(); if (now > lastPrint + 1000) { lastPrint=now; long time=now - start; printlnWithTime(time,getClass().getName() + " " + s); } }
Print a message to system out.
@SkipValidation @Action(value="/modifyProperty-modifyDataEntry") public String modifyDataEntry(){ LOGGER.debug("Entered into modifyForm, \nIndexNumber: " + indexNumber + ", BasicProperty: "+ basicProp+ ", OldProperty: "+ oldProperty+ ", PropertyModel: "+ propertyModel); String target=""; target=populateFormData(B...
Returns modify data entry form
default Map<String,?> toMap(){ try { final Object o=unwrap(); final Map<String,Object> result=new HashMap<>(); for ( final Field f : ReflectionCache.getFields(o.getClass())) { result.put(f.getName(),f.get(o)); } return result; } catch ( final Exception e) { throw ExceptionSoftener...
default implementation maps field values on the host object by name
void createAnimationImage(){ GraphicsConfiguration gc=getGraphicsConfiguration(); image=gc.createCompatibleImage(imageW,imageH,Transparency.TRANSLUCENT); Graphics2D gImg=image.createGraphics(); if (useImage) { try { URL url=getClass().getResource("images/duke.gif"); Image originalImage=ImageIO.r...
Create the image that will be animated. This image may be an actual image (duke.gif), or some graphics (a variation on a black filled rectangle) that are rendered into an image. The contents of this image are dependent upon the runtime toggles that have been set when this method is called.
public boolean isIncludeTrailingSemicolons(){ return includeTrailingSemicolons; }
Gets whether to include trailing semicolon delimiters for structured property values whose list of values end with null or empty values.