code
stringlengths
10
174k
nl
stringlengths
3
129k
public BufferedImage createCompatibleDestImage(BufferedImage src,ColorModel destCM){ BufferedImage image; if (destCM == null) { ColorModel cm=src.getColorModel(); image=new BufferedImage(cm,src.getRaster().createCompatibleWritableRaster(),cm.isAlphaPremultiplied(),null); } else { int w=src.getWidth()...
Creates a zeroed destination image with the correct size and number of bands.
public static void main(String[] args){ TestTaglets tester=new TestTaglets(); run(tester,ARGS_4654308,TEST_4654308,NEGATED_TEST_4654308); tester.printSummary(); tester=new TestTaglets(); run(tester,ARGS_4767038,TEST_4767038,NEGATED_TEST_4767038); tester.printSummary(); }
The entry point of the test.
public boolean isDrawCirclesEnabled(){ return mDrawCircles; }
returns true if drawing circles is enabled, false if not
public static void copyURLToFile(URL source,File destination,int connectionTimeout,int readTimeout) throws IOException { URLConnection connection=source.openConnection(); connection.setConnectTimeout(connectionTimeout); connection.setReadTimeout(readTimeout); InputStream input=connection.getInputStream(); cop...
Copies bytes from the URL <code>source</code> to a file <code>destination</code>. The directories up to <code>destination</code> will be created if they don't already exist. <code>destination</code> will be overwritten if it already exists.
private static Pair<Action,Action> addForkJoin(DirectedAcyclicGraph<Action,DefaultEdge> parentGraph){ Action fork=new Action(); fork.setName("fork-" + forkCount); fork.setType("fork"); Action join=new Action(); join.setName("join-" + forkCount); join.setType("join"); forkCount++; parentGraph.addVertex(f...
Create a fork/join pair and add it to a graph
protected int hprs(int N,int M,int n,RandomEngine randomGenerator){ int Dk, X, V; double Mp, np, p, nu, U, Y, W; if (N != N_last || M != M_last || n != n_last) { N_last=N; M_last=M; n_last=n; Mp=(double)(M + 1); np=(double)(n + 1); N_Mn=N - M - n; p=Mp / (N + 2.0); nu=np * p; U...
Returns a random number from the distribution.
public Object runSafely(Catbert.FastStack stack) throws Exception { stack.getUIMgrSafe().getVideoFrame().playPause(); return null; }
Pauses playback of the MediaPlayer if it is currently playing or resumes playback of the MediaPlayer if it is currently paused.
protected int engineGetBlockSize(){ return DESConstants.DES_BLOCK_SIZE; }
Returns the block size (in bytes).
public AVT(StylesheetHandler handler,String uri,String name,String rawName,String stringedValue,ElemTemplateElement owner) throws javax.xml.transform.TransformerException { m_uri=uri; m_name=name; m_rawName=rawName; StringTokenizer tokenizer=new StringTokenizer(stringedValue,"{}\"\'",true); int nTokens=tokeni...
Construct an AVT by parsing the string, and either constructing a vector of AVTParts, or simply hold on to the string if the AVT is simple.
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:56:41.586 -0500",hash_original_method="00DF77F4EAECB68BC1742A03B5A51C8E",hash_generated_method="447CCF55C0CC97BFF2C53A213E0DA55F") @Override public String toString(){ StringBuilder result=new StringBuilder();...
Returns the state of this tokenizer in a readable format.
private String createString(String f){ StringBuilder sb=new StringBuilder(); sb.append("format=" + CUresourceViewFormat.stringFor(format) + f); sb.append("width=" + width + f); sb.append("height=" + height + f); sb.append("depth=" + depth + f); sb.append("firstMipmapLevel=" + firstMipmapLevel + f); sb.app...
Creates and returns a string representation of this object, using the given separator for the fields
public static ExternalBuilding findByAbbv(Long sessionId,String bldgAbbr){ ExternalBuildingDAO bldgDAO=new ExternalBuildingDAO(); List bldgs=bldgDAO.getSession().createCriteria(ExternalBuilding.class).add(Restrictions.eq("session.uniqueId",sessionId)).add(Restrictions.eq("abbreviation",bldgAbbr)).list(); if (bldg...
Retrieve an external building for a given abbreviation and academic session
private long[] determinePreferenceVectorByApriori(Relation<V> relation,ModifiableDBIDs[] neighborIDs,StringBuilder msg){ int dimensionality=neighborIDs.length; UpdatableDatabase apriori_db=new HashmapDatabase(); SimpleTypeInformation<?> bitmeta=VectorFieldTypeInformation.typeRequest(BitVector.class,dimensionality...
Determines the preference vector with the apriori strategy.
protected boolean isTokenChar(char ch){ if (Character.isLetterOrDigit(ch)) return true; if (Character.isISOControl(ch)) return false; if (isHttpSeparator(ch)) return false; return true; }
Checks whether a character is a valid token character. Whitespace, control characters, and HTTP separators are not valid token characters. The HTTP specification (RFC 2616, section 2.2) defines tokens only for the US-ASCII character set, this method extends the definition to other character sets.
protected boolean isUseFieldNames(){ return useFieldNames; }
<p>Gets whether to use the field names passed in.</p>
public static JSONArray toJSONArray(JSONArray names,JSONTokener x) throws JSONException { if (names == null || names.length() == 0) { return null; } JSONArray ja=new JSONArray(); for (; ; ) { JSONObject jo=rowToJSONObject(names,x); if (jo == null) { break; } ja.put(jo); } if (ja.le...
Produce a JSONArray of JSONObjects from a comma delimited text string using a supplied JSONArray as the source of element names.
public List<Struct> listTraitDefinitions(final String guid) throws AtlasServiceException { JSONObject jsonResponse=callAPI(API.GET_ALL_TRAIT_DEFINITIONS,null,guid,TRAIT_DEFINITIONS); List<JSONObject> traitDefList=extractResults(jsonResponse,AtlasClient.RESULTS,new ExtractOperation<JSONObject,JSONObject>()); Array...
Get all trait definitions for an entity
public void writeExpression(Expression oldExp){ boolean internal=this.internal; this.internal=true; Object oldValue=getValue(oldExp); if (get(oldValue) == null || (oldValue instanceof String && !internal)) { getValueData(oldValue).exp=oldExp; super.writeExpression(oldExp); } this.internal=internal; ...
Records the Expression so that the Encoder will produce the actual output when the stream is flushed. <P> This method should only be invoked within the context of initializing a persistence delegate or setting up an encoder to read from a resource bundle. <P> For more information about using resource bundles with the X...
protected int findNext(int from){ if (from < -1) return -1; final int to=this.allHeaders.length - 1; boolean found=false; while (!found && (from < to)) { from++; found=filterHeader(from); } return found ? from : -1; }
Determines the index of the next header.
private CSVParser(String data){ this.tokenizer=new Tokenizer(data); }
Creates a new parser that parses the given string.
@Override public boolean remove(Object searched){ throw new UnsupportedOperationException(ERROR_MSG); }
Guaranteed to throw an exception and leave the table unmodified.
public boolean isAvailable(){ return available; }
Gets the value of the available property.
public static void redirect(InputStream inputStream,OutputStream outputStream){ new RedirectStream(inputStream,outputStream).start(); }
Redirects all the contents from the specified input stream to the specified output stream.
public InitialLdapContext() throws NamingException { super(null); }
Constructs an initial context using no environment properties or connection request controls. Equivalent to <tt>new InitialLdapContext(null, null)</tt>.
public int export(ConstantPool target){ return target.addDouble(_value).getIndex(); }
Exports to the target pool.
public boolean hasListener(EventListener listener){ List<Object> list=Arrays.asList(this.listenerList.getListenerList()); return list.contains(listener); }
Returns <code>true</code> if the specified object is registered with the brokerManagerModel as a listener. Most applications won't need to call this method, it exists mainly for use by unit testing code.
public HttpRoute(HttpHost target,InetAddress local,HttpHost proxy,boolean secure,TunnelType tunnelled,LayerType layered){ this(local,target,toChain(proxy),secure,tunnelled,layered); }
Creates a new route with at most one proxy.
public void close() throws IOException { if (thread.isAlive()) { thread.closed=true; thread.interrupt(); } if (stream != null) { stream.close(); } }
Closes the underlying input stream.
protected void clearPrefs(HttpServletRequest request,PreferencesForm frm){ frm.clearPrefs(); }
Clear Preference Lists
private void reinitializeAnimationArrays(){ final int childCount=mWorkspace.getChildCount(); if (mLastChildCount == childCount) return; mOldBackgroundAlphas=new float[childCount]; mOldAlphas=new float[childCount]; mNewBackgroundAlphas=new float[childCount]; mNewAlphas=new float[childCount]; }
Reinitializes the arrays that we need for the animations on each page.
public static String parseIdFromSameDocumentURI(String uri){ if (uri.length() == 0) { return null; } String id=uri.substring(1); if (id != null && id.startsWith("xpointer(id(")) { int i1=id.indexOf('\''); int i2=id.indexOf('\'',i1 + 1); id=id.substring(i1 + 1,i2); } return id; }
Returns the ID from a same-document URI (ex: "#id")
public static Intent forgeIntentOnStackEvent(Context ctx,ContactId contact,Intent intent){ intent.setClass(ctx,OneToOneTalkView.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtra(EXTRA_CONTACT,(Parcelable)contact); return intent; }
Forge intent to start OneToOneTalkView activity upon reception of a stack event
public byte ID(){ return 3; }
Id of tag. (see NBT_Tag)
private Object readResolve(){ if (list instanceof RandomAccess) { return new SynchronizedRandomAccessList<E>(list,mutex); } return this; }
Resolves SynchronizedList instances to SynchronizedRandomAccessList instances if the underlying list is a Random Access list. <p> This is necessary since SynchronizedRandomAccessList instances are replaced with SynchronizedList instances during serialization for compliance with JREs before 1.4. <p>
protected void startTrade(Player partner){ trade.startTrade(partner); }
starts a trade with this partner
public void testOneTransformer(){ addTransformerToManager(fInst,getRandomTransformer()); verifyTransformers(fInst); }
Add and check just one transformer to the manager
public void readData(final File file,final boolean allowRowChanges,final boolean allowColumnChanges) throws TableDataException { String[][] values=Utils.getStringMatrix(file); try { checkData(allowRowChanges,allowColumnChanges,values); reset(values.length,values[0].length); for (int i=0; i < values.leng...
Load a .csv file.
public static boolean isInCircle(Coordinate a,Coordinate b,Coordinate c,Coordinate p){ boolean isInCircle=(a.x * a.x + a.y * a.y) * triArea(b,c,p) - (b.x * b.x + b.y * b.y) * triArea(a,c,p) + (c.x * c.x + c.y * c.y) * triArea(a,b,p) - (p.x * p.x + p.y * p.y) * triArea(a,b,c) > 0; return isInCircle; }
Tests if a point is inside the circle defined by the points a, b, c. This test uses simple double-precision arithmetic, and thus may not be robust.
public PStrategy chooseStrategy(){ if (!allStrategiesAreDisabled) { double rnd=MatsimRandom.getRandom().nextDouble() * this.totalWeights; double accumulatedWeight=0.0; for (int i=0; i < this.weights.size(); i++) { accumulatedWeight+=this.weights.get(i); if (accumulatedWeight >= rnd) { ...
Picks randomly one strategy from the set of available strategies. Strategies with a higher weight have a higher probability of being picked.
public Campaign(final String query,final String name,final String start_date,final String end_date,final int timezoneOffset) throws ParseException { this(name,query,new Date(),DateParser.parse(start_date,timezoneOffset).getTime(),DateParser.parse(end_date,timezoneOffset).getTime(),timezoneOffset); }
create an campaign
public void addOldIndicationListener(TransportAddress localAddr,MessageEventHandler indicationListener){ eventDispatcher.addOldIndicationListener(localAddr,indicationListener); }
Adds a new <tt>MessageEventHandler</tt> which is to be notified about old indications received at a specific local <tt>TransportAddress</tt>.
protected void resetRecyclerPadding(@NonNull RecyclerView recyclerView){ recyclerView.setPadding(recyclerView.getPaddingLeft() - edgeSpacing,recyclerView.getPaddingTop(),recyclerView.getPaddingRight() - edgeSpacing,recyclerView.getPaddingBottom()); }
Removes the padding previously added to the <code>recyclerView</code> for the edge spacing. If no padding was previously added, then this has no affect
public void testWrite(){ int len=2048; byte[] data=getWData(len); ByteFifoBuffer instance=new ByteFifoBuffer(len); int expResult=len; int result=instance.write(data,len); assertEquals(expResult,result); byte[] read=new byte[len]; int readCount=instance.read(read,len); assertEquals(result,readCount); ...
Test of Write method, of class ByteFifoBuffer.
@Override public Object[] toArray(ResultSet rs) throws SQLException { ResultSetMetaData meta=rs.getMetaData(); int cols=meta.getColumnCount(); Object[] result=new Object[cols]; for (int i=0; i < cols; i++) { result[i]=rs.getObject(i + 1); } return result; }
Convert a <code>ResultSet</code> row into an <code>Object[]</code>. This implementation copies column values into the array in the same order they're returned from the <code>ResultSet</code>. Array elements will be set to <code>null</code> if the column was SQL NULL.
KeyToolTest(){ Locale.setDefault(Locale.US); }
Creates a new instance of KeyToolTest
protected AbstractSet(){ super(); }
Constructs a new instance of this AbstractSet.
public static BigInteger createRandomInRange(BigInteger min,BigInteger max,SecureRandom random){ int cmp=min.compareTo(max); if (cmp >= 0) { if (cmp > 0) { throw new IllegalArgumentException("'min' may not be greater than 'max'"); } return min; } if (min.bitLength() > max.bitLength() / 2) { ...
Return a random BigInteger not less than 'min' and not greater than 'max'
public Builder tag(String value){ tag=value; return this; }
Sets the tag property.
private static MatrixBlock[] computeLU(MatrixObject in) throws DMLRuntimeException { if (in.getNumRows() != in.getNumColumns()) { throw new DMLRuntimeException("LU Decomposition can only be done on a square matrix. Input matrix is rectangular (rows=" + in.getNumRows() + ", cols="+ in.getNumColumns()+ ")"); } ...
Function to perform LU decomposition on a given matrix.
private void defineInternalFrameCloseButtons(UIDefaults d){ String p="InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.closeButton\""; String c=PAINTER_PREFIX + "TitlePaneCloseButtonPainter"; d.put(p + ".States","Enabled,MouseOver,Pressed,Disabled,Focused,Selected,WindowNotFocused"); d.put(p + ".Wi...
Initialize the internal frame close button settings.
private String encode(String s){ try { return URLEncoder.encode(s,"UTF-8"); } catch ( UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 is not supported by the JVM",e); } }
Encodes a string using UTF-8.
public boolean isPrivate(){ return Modifier.isPrivate(flags); }
Utility method to query the modifier flags of this member.
public boolean isInScope(LocalMember field){ for (LocalMember f=locals; f != null; f=f.prev) { if (field == f) { return true; } } return false; }
Check if the given field is active in this context.
private void addToQuery(PriorityQueue<ScoreTerm> q,BooleanQuery query){ ScoreTerm scoreTerm; float bestScore=-1; while ((scoreTerm=q.pop()) != null) { TermQuery tq=new TermQuery(new Term(scoreTerm.topField,scoreTerm.word)); if (boost) { if (bestScore == -1) { bestScore=(scoreTerm.score); ...
Add to an existing boolean query the More Like This query from this PriorityQueue
public NSNumber(boolean b){ boolValue=b; doubleValue=longValue=b ? 1 : 0; type=BOOLEAN; }
Creates a boolean number.
public String substring(final int start){ return substring(start,size); }
Extracts a portion of this string builder as a string.
@Override public String toString(){ return "cudaPitchedPtr[" + "ptr=" + ptr + ","+ "pitch="+ pitch+ ","+ "xsize="+ xsize+ ","+ "ysize="+ ysize+ "]"; }
Returns a String representation of this object.
@Override public double execute(double in1,double in2){ return (in1 == in2 ? 1.0 : 0.0); }
execute() method that returns double is required since current map-reduce runtime can only produce matrices of doubles. This method is used on MR side to perform comparisons on matrices like A==B and A==2.5
RosterEntry(String user,String name,RosterPacket.ItemType type,RosterPacket.ItemStatus status,Roster roster,Connection connection){ this.user=user; this.name=name; this.type=type; this.status=status; this.roster=roster; this.connection=connection; }
Creates a new roster entry.
private void validateServerClientID(){ String serverClientId=getString(R.string.server_client_id); String suffix=".apps.googleusercontent.com"; if (!serverClientId.trim().endsWith(suffix)) { String message="Invalid server client ID in strings.xml, must end with " + suffix; Log.w(TAG,message); Toast.ma...
Validates that there is a reasonable server client ID in strings.xml, this is only needed to make sure users of this sample follow the README.
public String upload() throws Exception { if (this.cancel != null) { return "cancel"; } String uploadDir=ServletActionContext.getServletContext().getRealPath("/resources") + "/" + getRequest().getRemoteUser()+ "/"; File dirPath=new File(uploadDir); if (!dirPath.exists()) { dirPath.mkdirs(); } Inpu...
Upload the file
public void printCFG(String label,BciBlockMapping blockMap){ begin("cfg"); out.print("name \"").print(label).println('"'); for ( BciBlockMapping.BciBlock block : blockMap.getBlocks()) { begin("block"); printBlock(block); end("block"); } end("cfg"); }
Prints the control flow graph denoted by a given block map.
private static void s_uam(SparseBlock a,double[] c,int m,int n,int rl,int ru){ double ret=1; for (int i=rl; i < ru; i++) { if (!a.isEmpty(i)) { int alen=a.size(i); ret*=product(a.values(i),0,alen); ret*=(alen < n) ? 0 : 1; } if (!NAN_AWARENESS && ret == 0) break; } c[0]=ret; }
PROD, opcode: ua*, sparse input.
public static boolean isXML11ValidLiteral(int c){ return ((c < 0x10000 && ((XML11CHARS[c] & MASK_XML11_VALID) != 0 && (XML11CHARS[c] & MASK_XML11_CONTROL) == 0)) || (0x10000 <= c && c <= 0x10FFFF)); }
Returns true if the specified character is valid and permitted outside of a character reference. That is, this method will return false for the same set as isXML11Valid, except it also reports false for "control characters".
public void testSettingsHookTestAppAvailable() throws Exception { Context context=mSettings.getApplicationContext(); PackageManager pm=context.getPackageManager(); ApplicationInfo applicationInfo=pm.getApplicationInfo(PACKAGE_NAME,0); assertTrue((applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0); }
Test that the operator/manufacturer settings hook test application is available and that it's installed in the device's system image.
public _CheckinOptions(final _CheckinOptions_Flag[] flags){ super(flags); }
Constructs a _CheckinOptions with the given flags initially set.
private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writePaint(this.backgroundPaint,stream); }
Provides serialization support.
@Override public void onPause(){ super.onPause(); if (!isFinishing()) { establishInitialState(); } }
Abandon all progress through the confirmation sequence by returning to the initial view any time the activity is interrupted (e.g. by idle timeout).
public AbstractCharList partFromTo(int from,int to){ if (size == 0) return new CharArrayList(0); checkRangeFromTo(from,to,size); char[] part=new char[to - from + 1]; System.arraycopy(elements,from,part,0,to - from + 1); return new CharArrayList(part); }
Returns a new list of the part of the receiver between <code>from</code>, inclusive, and <code>to</code>, inclusive.
public ScriptMethodRequest(String method,Object argument){ this.method=method; this.argument=argument; }
Creates a new method invocation request.
private Node addRec(final CharSequence s,final int offset,final int length,final Node e){ if (e == null) { modified=true; size++; return new Node(s,offset,length,true,1); } char c; int i; Node n=null; final char[] path=e.path; for (i=0; i < path.length - 1; i++) { c=s.charAt(offset + i); ...
Inserts the given character sequence, starting at the given position, in the given subtree.
public CompareResult<LinkAddress> compareAddresses(LinkProperties target){ CompareResult<LinkAddress> result=new CompareResult<>(); result.removed=new ArrayList<>(mLinkAddresses); result.added.clear(); if (target != null) { for ( LinkAddress newAddress : target.getLinkAddresses()) { if (!result.rem...
Return two lists, a list of addresses that would be removed from mLinkAddresses and a list of addresses that would be added to mLinkAddress which would then result in target and mLinkAddresses being the same list.
private void generateSysCall(int parametersSize){ int linkageAreaSize=parametersSize + BYTES_IN_STACKSLOT + (6 * BYTES_IN_STACKSLOT); if (VM.BuildFor32Addr) { asm.emitSTWU(FP,-linkageAreaSize,FP); } else { asm.emitSTDU(FP,-linkageAreaSize,FP); } asm.emitSTAddr(JTOC,linkageAreaSize - BYTES_IN_STACKSLO...
Generate a sys call where the address of the function or (when build for 64-bit PowerPC ELF ABI) function descriptor have been loaded into S0 already
public void addIndex(IIndex index){ if (index != null) { indices.add(index); } }
Adds the given index.
DirectCompactOrderedSketch(long[] compactOrderedCache,boolean empty,short seedHash,int curCount,long thetaLong,Memory dstMem){ super(empty,seedHash,curCount,thetaLong); int emptyBit=isEmpty() ? (byte)EMPTY_FLAG_MASK : 0; byte flags=(byte)(emptyBit | READ_ONLY_FLAG_MASK | COMPACT_FLAG_MASK| ORDERED_FLAG_MASK); m...
//TODO convert to factory Constructs this sketch from correct, valid components.
public void replace(@NonNull List items){ getList().clear(); getList().addAll(items); notifyDataSetChanged(); }
Replaces current list of items
protected POInfo initPO(Properties ctx){ POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName()); return poi; }
Load Meta Data
public static LocalDate fromCalendarFields(Calendar calendar){ if (calendar == null) { throw new IllegalArgumentException("The calendar must not be null"); } return new LocalDate(calendar.get(Calendar.YEAR),calendar.get(Calendar.MONTH) + 1,calendar.get(Calendar.DAY_OF_MONTH)); }
Constructs a LocalDate from a <code>java.util.Calendar</code> using exactly the same field values. <p> Each field is queried from the Calendar and assigned to the LocalDate. This is useful if you have been using the Calendar as a local date, ignoring the zone. <p> One advantage of this method is that this method is una...
public KafkaTemplate(ProducerFactory<K,V> producerFactory){ this(producerFactory,false); }
Create an instance using the supplied producer factory and autoFlush false.
private boolean mutationConcolic(){ logger.info("Applying DSE mutation"); List<BranchCondition> branches=ConcolicExecution.getSymbolicPath(this); logger.debug("Conditions: " + branches); if (branches.isEmpty()) return false; boolean mutated=false; List<BranchCondition> targetBranches=new ArrayList<BranchC...
Collect path constraints and negate one of them to derive new integer inputs
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 15:01:20.007 -0400",hash_original_method="C9D180903A7CC0CD8F17729AA0E80F49",hash_generated_method="618E78147D566CA48083B5158FE7687B") public void put(E e){ offer(e); }
Inserts the specified element into this delay queue. As the queue is unbounded this method will never block.
@Override public void connectionNotification(String eventName,Object source){ if (connectionAllowed(eventName)) { m_listenee=source; } }
Notify this object that it has been registered as a listener with a source with respect to the named event
public static int count(long[] srcArr,long thetaLong){ int cnt=0; int len=srcArr.length; for (int i=len; i-- > 0; ) { long hash=srcArr[i]; if (continueCondition(thetaLong,hash)) { continue; } cnt++; } return cnt; }
Counts the cardinality of the given source array.
public static ComponentUI createUI(JComponent c){ return new CompiereTabbedPaneUI(); }
Static Create UI
public void addEvent(SimEvent newEvent){ newEvent.setSerial(serial++); sortedSet.add(newEvent); }
Adds a new event to the queue. Adding a new event to the queue preserves the temporal order of the events in the queue.
protected double updateDistance(double currDist,double diff){ double result; result=currDist; result+=Math.abs(diff); return result; }
Updates the current distance calculated so far with the new difference between two attributes. The difference between the attributes was calculated with the difference(int,double,double) method.
protected String compute(Date dateDate,String patternString){ String defaultLocale=Locale.getDefault().getISO3Language(); return compute(dateDate,patternString,defaultLocale); }
Computes the result for one date and one string input value.
protected void sequence_TryStatement(ISerializationContext context,TryStatement semanticObject){ genericSequencer.createSequence(context,semanticObject); }
Contexts: ScriptElement returns TryStatement RootStatement<Yield> returns TryStatement RootStatement returns TryStatement Statement<Yield> returns TryStatement Statement returns TryStatement TryStatement<Yield> returns TryStatement TryStatement returns TryStatement Constraint: (block=Block ((catch=CatchBlock finally=Fi...
@Override protected EClass eStaticClass(){ return StextPackage.Literals.SIMPLE_SCOPE; }
<!-- begin-user-doc --> <!-- end-user-doc -->
protected POInfo initPO(Properties ctx){ POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName()); return poi; }
Load Meta Data
public void select(boolean flag){ isSelected=flag; mark=0; }
Determine selectable status.
public input addElement(String hashcode,Element element){ addElementToRegistry(hashcode,element); return (this); }
Adds an Element to the element.
public void attachMirror(URI vplexURI,URI vplexVolumeURI,URI mirrorVolumeURI,URI cgURI,String detachStepId,String stepId){ _log.info("Executing attach mirror {} to VPLEX volume {} on VPLEX {}",new Object[]{mirrorVolumeURI,vplexVolumeURI,vplexURI}); try { WorkflowStepCompleter.stepExecuting(stepId); StorageS...
Called to reattach the remote mirror for a distributed VPLEX volume upon successfully restoring a native snapshot of the backend source volume.
boolean isSingleWord(){ if (hasFinalPossessive) { return current == startBounds && end == endBounds - 2; } else { return current == startBounds && end == endBounds; } }
Determines if the current word contains only one subword. Note, it could be potentially surrounded by delimiters
public Mailbox(QueueCollection<Envelope> queueCollection){ this.queueCollection=queueCollection; this.queueId=queueCollection.spawnQueue(); }
Creating mailbox
private static synchronized String formatNum(double n,boolean wide){ String w=(wide) ? "21" : ""; return String.format("%" + w + ".12e",n); }
Method formatNum.
@Override public void run(){ amIActive=true; String inputTextFile=null; String inputRasterFiles=null; String outputTextFile=null; boolean interpolateValues=false; boolean includeStatistics=false; String[] gatHeaderFile; List<WhiteboxRaster> gatGrids=new ArrayList<>(); String fileName; int numberOfLi...
Used to execute this plugin tool.
private Expression compileExtension(int opPos) throws TransformerException { int endExtFunc=opPos + getOp(opPos + 1) - 1; opPos=getFirstChildPos(opPos); java.lang.String ns=(java.lang.String)getTokenQueue().elementAt(getOp(opPos)); opPos++; java.lang.String funcName=(java.lang.String)getTokenQueue().elementAt...
Compile an extension function.
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case N4JSPackage.TYPE_REF_ANNOTATION_ARGUMENT__TYPE_REF: return getTypeRef(); } return super.eGet(featureID,resolve,coreType); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void test_ticket_1202l() throws Exception { new TestHelper("ticket-1202-group05-modified5","ticket-1202-group05-modified5.rq","ticket-1202-group05-modified5.ttl","ticket-1202-group05-modified5.srx").runTest(); }
SELECT?s ?w (COUNT(DISTINCT ?v) AS ?c) (?w AS ?u) { ?s :p ?v . OPTIONAL { ?s :q ?w } } GROUP BY ?s ?w