code
stringlengths
10
174k
nl
stringlengths
3
129k
public SparseByteArray(){ this(10); }
Creates a new SparseByteArray containing no mappings.
@Override public void validateConvertUpdateSequence(Session session,Row row){ for (int i=0; i < columns.length; i++) { Value value=row.getValue(i); if (value != null) { Column column=columns[i]; Value v2=column.validateConvertUpdateSequence(session,value); if (v2 != value) { row.setV...
Convert the values if required. Default values are not set (kept as null).
public boolean equals(Object object){ if (this == object) return true; if (object instanceof org.eclipse.jdt.internal.core.ClasspathEntry) { org.eclipse.jdt.internal.core.ClasspathEntry otherEntry=(org.eclipse.jdt.internal.core.ClasspathEntry)object; if (this.contentKind != otherEntry.getContentKind()) ...
Returns true if the given object is a classpath entry with equivalent attributes.
public PriorityQueue(){ size=0; items=new ArrayList(); items.add(null); }
Creates a new empty priority queue
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-25 10:38:09.139 -0500",hash_original_method="06E8E6E37E1424A31870FF0EF434E6CA",hash_generated_method="A187188A20C0BEBD74FA62089DD62DE5") public int article(int articleNumber) throws IOException { return sendCommand(NNTPCommand.ARTICLE,Inte...
A convenience method to send the NNTP ARTICLE command to the server, receive the initial reply, and return the reply code. <p>
private static String codingLoopNameToCsvPrefix(String className){ List<String> names=splitCamelCase(className); return names.get(0) + "," + names.get(1)+ ","+ names.get(2)+ ","+ names.get(3)+ ","; }
Converts a name like "OutputByteInputTableCodingLoop" to "output,byte,input,table,".
public AFSDBRecord(Name name,int dclass,long ttl,int subtype,Name host){ super(name,Type.AFSDB,dclass,ttl,subtype,"subtype",host,"host"); }
Creates an AFSDB Record from the given data.
public double computeAverageInfoDistanceOfObservations(){ double infoDistance=0.0; for (int b=0; b < totalObservations; b++) { double prob1=mvkeSource.getProbability(sourceObservations[b],b); double prob2=mvkeDest.getProbability(destObservations[b],b); double probJoint=mvkeJoint.getProbability(sourceObs...
Extra utility method to return the information distance between the source and destination
@Override protected EClass eStaticClass(){ return UmplePackage.eINSTANCE.getBeforeCode_(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
protected StreamAdapter(IgniteDataStreamer<K,V> stmr,StreamSingleTupleExtractor<T,K,V> extractor){ this.stmr=stmr; this.singleTupleExtractor=extractor; }
Stream adapter.
public Log truncate(){ return truncate(0); }
Truncates the log.
public boolean isParseSVNEntries(){ return parseSVNentries; }
Checks if the spider should parse the SVN entries files for URIs (not related to following the directions).
public int nextNode(){ if (m_foundLast) return DTM.NULL; if (DTM.NULL == m_lastFetched) { resetProximityPositions(); } int next; org.apache.xpath.VariableStack vars; int savedStart; if (-1 != m_stackFrame) { vars=m_execContext.getVarStack(); savedStart=vars.getStackFrame(); vars.setStack...
Returns the next node in the set and advances the position of the iterator in the set. After a NodeIterator is created, the first call to nextNode() returns the first node in the set.
private static DataObjectRestRep findCategoryOrService(CatalogCategoryRestRep root,String... subPaths){ if (subPaths == null) { return root; } DataObjectRestRep result=root; for ( String path : subPaths) { if (StringUtils.isBlank(path)) { continue; } if (result instanceof CatalogCategoryR...
Recursively traverse a list of sub-paths to find the category or service.
@Override public boolean hasNext(){ return bitVector[length + 1] != 1; }
Returns true if iteration is done, otherwise false
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:58:54.907 -0500",hash_original_method="1D5D0C2F4FF0286B2839C7504C536EE3",hash_generated_method="89BBD29FF9474CF6EE73DC7C02803154") @Override public void onRefresh(boolean fileChanged,int[] fileList){ if (fileChanged) { fetchRuimR...
Called by CCAT Service when REFRESH is received.
public static void writeUnsafe(PacketOutputStream out,InputStream is,boolean noBackslashEscapes) throws IOException { out.writeUnsafe(QUOTE); byte[] buffer=new byte[1024]; int len; while ((len=is.read(buffer)) >= 0) { writeBytesEscapedUnsafe(out,buffer,len,noBackslashEscapes); } out.writeUnsafe(QUOTE); ...
Write stream in text format without checking buffer size.
public Message(Object sender,String id){ this(MessageLevel.DEBUG,sender,id); }
Instantiates a new message.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:07.128 -0500",hash_original_method="3FEA70547EDCF31E1AA086D3362AC6CE",hash_generated_method="4B1983FBB805BAAF80775A2DCEAE6D38") public AcceptHeader createAcceptHeader(String contentType,String contentSubType) throws ParseException {...
Creates a new AcceptHeader based on the newly supplied contentType and contentSubType values.
protected Frame<V> newFrame(final Frame<? extends V> src){ return new Frame<V>(src); }
Constructs a new frame that is identical to the given frame.
public void removeNull(){ if (hasNull) { removeItem(SimbrainConstants.NULL_STRING); setSelectedIndex(getItemCount() - 1); hasNull=false; } }
Remove the null state from the combo box.
@Override public Enumeration<Option> listOptions(){ Vector<Option> result=new Vector<Option>(); result.addElement(new Option("\tUnsets the class index temporarily before the filter is\n" + "\tapplied to the data.\n" + "\t(default: no)","unset-class-temporarily",1,"-unset-class-temporarily")); return result.elemen...
Returns an enumeration describing the available options.
@Override public CompletableFuture<Optional<T>> reduce(final BinaryOperator<T> accumulator){ return CompletableFuture.supplyAsync(null); }
Asynchronously perform a Stream reduction
public Point translate(final Location location,Point position){ double heightCoef=(topLeft.second.getLatitude() - location.getLatitude()) / heightInDegrees(); double widthCoef=(location.getLongitude() - topLeft.second.getLongitude()) / widthInDegrees(); if (position == null) { position=new Point(); } posi...
Converts location to position on the map.
protected void parse(String rawdata) throws MimeTypeParseException { int length=rawdata.length(); if (length > 0) { int currentIndex=skipWhiteSpace(rawdata,0); int lastIndex=0; if (currentIndex < length) { char currentChar=rawdata.charAt(currentIndex); while ((currentIndex < length) && (curr...
A routine for parsing the parameter list out of a String.
@Override public boolean equals(Object obj){ if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Pair<?,?> other=(Pair<?,?>)obj; if (lhSide == null) { if (other.lhSide != null) return false; } else if (!lhSide.equals(other.lhSide)) ...
Returns <code>true</code> if this <code>Pair</code> is equal to the given object.
public static double quantile(double z,double M,double S){ return Math.exp(NormalDistribution.quantile(z,M,S)); }
quantiles (=inverse cumulative density function)
public void paintPopupMenuBackground(SynthContext context,Graphics g,int x,int y,int w,int h){ paintBackground(context,g,x,y,w,h,null); }
Paints the background of a popup menu.
public void initialize(Properties props,String configID) throws IllegalArgumentException { checkPropertyKeys(props); Properties p=new Properties(); p.putAll(props); convertPassword(p); if (configID != null) { this.configs.put(configID,p); } else { this.defaultProperties=p; } }
Initializes the SSLSocketFactoryFactory with the provided properties for the provided configuration.
public synchronized Data findData(Data data){ if (data == null) { return null; } return getEntityManager().find(data.getClass(),data.getId(),properties); }
Return the lob data.
public static byte[] intsToBytes(final int[] ints){ final byte[] rVal=new byte[ints.length * 4]; for (int i=0; i < ints.length; i++) { rVal[4 * i]=(byte)(0x000000FF & ints[i]); rVal[(4 * i) + 1]=(byte)((0x000000FF & (ints[i] >> 8))); rVal[(4 * i) + 2]=(byte)((0x000000FF & (ints[i] >> 16))); rVal[(4 ...
converts an int[] to a bytep[
private int[] randomize(int[] array,Random generator){ int index; int temp; int[] newArray=new int[array.length]; System.arraycopy(array,0,newArray,0,array.length); for (int j=newArray.length - 1; j > 0; j--) { index=(int)(generator.nextDouble() * (double)j); temp=newArray[j]; newArray[j]=newArray...
Returns a copy of the array with its elements randomly redistributed.
public Object remove(String key){ return this.map.remove(key); }
Remove a name and its value, if present.
public static void exportAttributesAsKML(XMLStreamWriter xmlWriter,String styleType,ShapeAttributes attributes) throws XMLStreamException, IOException { if (attributes != null) { xmlWriter.writeStartElement("Pair"); xmlWriter.writeStartElement("key"); xmlWriter.writeCharacters(styleType); xmlWriter.wr...
Export ShapeAttributes as KML Pair element in a StyleMap. This method assumes that the StyleMap tag has already been written; it writes the Pair tag.
public void reset(){ for (int i=0; i < bgraphs.length; i++) { bgraphs[i].resetNumberField(); } }
This method resets the behavior graph so that we can recompute the SCCs.
protected void addOperationsPropertyDescriptor(Object object){ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),getResourceLocator(),getString("_UI_ServiceRef_operations_feature"),getString("_UI_PropertyDescriptor_description","_UI_ServiceRef...
This adds a property descriptor for the Operations feature. <!-- begin-user-doc --> <!-- end-user-doc -->
public void start(int statementId,EPStatementDesc desc,boolean isNewStatement,boolean isRecoveringStatement,boolean isResilient){ if (log.isDebugEnabled()) { log.debug(".start Starting statement " + statementId + " from desc="+ desc); } if (InstrumentationHelper.ENABLED) { InstrumentationHelper.get().qEng...
Start the given statement.
public void advance(){ moveToNextIndex(); }
Moves the iterator forward to the next entry in the underlying map.
@Override public void readSettings(){ SharedPreferences sharedPreferences=PreferenceManager.getDefaultSharedPreferences(this); serviceSwitch=sharedPreferences.getBoolean(getString(R.string.key_notification),false); autoRefresh=sharedPreferences.getBoolean(getString(R.string.key_notification_auto_refresh),false); ...
<br> life cycle.
@Around("execution(* org.yes.cart.service.order.impl.OrderStateManagerImpl.fireTransition(..))") public Object performNotifications(final ProceedingJoinPoint pjp) throws Throwable { final Object[] args=pjp.getArgs(); final OrderEvent orderEvent=(OrderEvent)args[0]; final String adminEmail=orderEvent.getCustomerOr...
Perform shopper notification, about payment authorize.
public static void cancelAnimationWithoutCallbacks(Animator animator){ if (animator != null) { animator.removeAllListeners(); animator.cancel(); } }
Cancels an animation ensuring that if it has listeners, onCancel and onEnd are not called.
public boolean removeFieldCamera(FieldCamera fieldCamera){ boolean found=false; String iName=fieldCamera.getName(); for (int i=0; i < layers.length; ++i) { if (layers[i] instanceof FieldCameraLayer) { FieldCameraLayer layer=(FieldCameraLayer)layers[i]; if (iName.equals(layer.getLayerName())) { ...
Remove field camera layers.
public boolean accept(List<Node> currentResults,Node node,int index){ return pseudoClass.match(currentResults,node,index); }
Accepts node within selected results. Invoked after results are matched.
private void drawCircle(Canvas canvas,Paint paint,float x,float y){ canvas.drawCircle(x,y,size,paint); }
The graphical representation of a circle point shape.
public Wine runForeground(String executableToRun,List<String> arguments,Map<String,String> environment) throws CancelException { runForeground(this.prefix.getWinePrefixDirectory(),executableToRun,arguments,environment); return this; }
Run wine in the prefix in foreground
@SuppressWarnings("unchecked") private HeapVariable<Object> findOrCreateHeapVariable(Object type){ if (DEBUG) { System.out.print("findOrCreateHeapVariable " + type); } HeapKey<Object> key=new HeapKey<Object>(0,type); HeapVariable<Object> H=heapVariables.get(key); if (DEBUG) { System.out.println("... ...
Return the heap variable for a given type or field with number 0. If no heap variable yet exits for this type or field, create a new one.
@Override public String toString(){ if (eIsProxy()) return super.toString(); StringBuffer result=new StringBuffer(super.toString()); result.append(" (generator: "); result.append(generator); result.append(", declaredAsync: "); result.append(declaredAsync); result.append(')'); return result.toString();...
<!-- begin-user-doc --> <!-- end-user-doc -->
public VNXeNfsShare findSnapNfsShare(String snapId,String shareName,String softwareVersion){ StringBuilder queryFilter=new StringBuilder(VNXeConstants.NAME_FILTER); if (!VNXeUtils.isHigherVersion(softwareVersion,VNXeConstants.VNXE_BASE_SOFT_VER)) { queryFilter.append(shareName); queryFilter.append(VNXeConst...
find Snapshot nfsShare using snapshot id and share name
public void ands(int size,Register dst,Register x,Register y){ super.ands(size,dst,x,y,ShiftType.LSL,0); }
Sets condition flags according to result of x & y.
public static String gensalt(int log_rounds){ return gensalt(log_rounds,new SecureRandom()); }
Generate a salt for use with the BCrypt.hashpw() method
public Path[] indexPaths(Index index){ assert assertEnvIsLocked(); Path[] indexPaths=new Path[nodePaths.length]; for (int i=0; i < nodePaths.length; i++) { indexPaths[i]=nodePaths[i].indicesPath.resolve(index.name()); } return indexPaths; }
Returns all index paths.
public void abortTransfer() throws RcsPermissionDeniedException, RcsGenericException { try { mTransferInf.abortTransfer(); } catch ( Exception e) { RcsPermissionDeniedException.assertException(e); throw new RcsGenericException(e); } }
Aborts the file transfer
private ZyGraphNodeBuilder(){ }
You are not supposed to instantiate this class.
public void println(){ if (addNewlines) { try { out.write("\n"); } catch ( IOException ioe) { throw new GroovyRuntimeException(ioe); } } }
Prints an end-of-line character (if enabled via addNewLines property). Defaults to outputting a single '\n' character but by using a custom Writer, e.g. PlatformLineWriter, you can get platform-specific end-of-line characters.
public void disconnectWithoutSettlement(){ wireParser.closeConnection(); }
Disconnects the network connection but doesn't request the server to settle the channel first (literally just unplugs the network socket and marks the stored channel state as inactive).
public TupleSerializer(final IKeyBuilderFactory keyBuilderFactory){ super(keyBuilderFactory); }
Ctor when creating a new instance.
public void addProcessListener(ProcessListener l){ listenerList.add(l); }
Adds an process listener to the list of listeners.
public ContingencyMatrix reweight(ExampleSet exampleSet,Model model,boolean normalize) throws OperatorException { exampleSet=model.apply(exampleSet); WeightedPerformanceMeasures wpm=new WeightedPerformanceMeasures(exampleSet); WeightedPerformanceMeasures.reweightExamples(exampleSet,wpm.getContingencyMatrix(),fals...
Reweights the examples according to knowledge based sampling. Normalizes weights to [0,1] if the parameter normalize is set to true.
public boolean createJob(String slurmScript,String heronExec,String[] commandArgs,String topologyWorkingDirectory,long containers){ return createJob(slurmScript,heronExec,commandArgs,topologyWorkingDirectory,containers,null); }
Create a slurm job. Use the slurm schedule'r sbatch command to submit the job. sbatch allocates the nodes and runs the script specified by slurmScript. This script runs the heron executor on each of the nodes allocated.
public void createNewTab(AsyncTabCreationParams asyncParams,TabLaunchType type,int parentId){ assert asyncParams != null; assert !(type == TabLaunchType.FROM_LONGPRESS_BACKGROUND && asyncParams.getWebContents() != null); Context context=ApplicationStatus.getApplicationContext(); Activity parentActivity=Activity...
Creates a Tab to host the given WebContents asynchronously.
public static void registerMetadata(MetadataRegistry registry){ if (registry.isRegistered(CONSTRUCT)) { return; } Content.registerMetadata(registry); ElementCreator constructBuilder=registry.build(CONSTRUCT).setValidator(new TextContentValidator()); constructBuilder.addElement(DIV); ElementCreator build...
Registers the metadata for this element.
public void load_Figure5_6(Iterator<V> it){ table=(LinkedList<V>[])new LinkedList[tableSize]; while (it.hasNext()) { V v=it.next(); int h=hashMethod.hash(v); if (table[h] == null) { table[h]=new LinkedList<V>(); } table[h].add(v); count++; } }
Reduced for Figure 5-6 in second edition.
@Ignore @Test public void testmodifyPlayer() throws Exception { DBTransaction transaction=TransactionPool.get().beginWork(); try { MockStendlRPWorld.get(); final String characterName="modifyme"; final PlayerModifier mod=new PlayerModifier(); Player player=mod.loadPlayer(transaction,characterName); ...
Tests for modifyPlayer.
public void testRandomHugeStrings() throws Exception { Analyzer analyzers[]=new Analyzer[]{new WhitespaceAnalyzer(),new SimpleAnalyzer(),new StopAnalyzer(),new UnicodeWhitespaceAnalyzer()}; for ( Analyzer analyzer : analyzers) { checkRandomData(random(),analyzer,100 * RANDOM_MULTIPLIER,8192); } IOUtils.clo...
blast some random large strings through the analyzer
private void removeDataPage(CacheDataPage parentDataPage,CacheDataPage cacheDataPage,Entry oldLastEntry) throws IOException { DataPageMain dpMain=cacheDataPage._main; DataPageExtra dpExtra=cacheDataPage._extra; if (dpMain.hasChildTail()) { throw new IllegalStateException(withErrorContext("Still has child tail...
Removes an index page which has become empty. If this page is the root page, just clears it.
public void disableLookAt(){ mLookAtEnabled=false; }
Disables auto-enforcement of look at target.
protected boolean singleUse(){ return true; }
PR2 allows only one throttle
@Override public IType<?> fromFacetType(){ return Types.FILE; }
Method fromFacetType()
private int size(Node x){ if (x == null) return 0; return x.size; }
Returns the number of nodes in the subtree.
private Node sourceNode(Node parent){ Node source=new Node(parent,"source"); @SuppressWarnings("unchecked") BiConsumer<Iterable<String>,Consumer<Map<String,String>>> addRepos=null; addRepos.accept(repos,Consumers.doNothing()); addRepos.accept(metadataRepos,null); addRepos.accept(artifactRepos,null); return ...
Creates an XML node representing all the repos in this model.
synchronized public long find(final long timestamp){ if (timestamp <= 0L) throw new IllegalArgumentException(); final long index=findIndexOf(timestamp); if (index == -1) { return -1L; } return decodeKey(keyAt(index)); }
Return the largest commitTime that is less than or equal to the given timestamp. This is used primarily to locate the commit point that will serve as the ground state for a transaction having <i>timestamp</i> as its start time. In this context the LTE search identifies the most recent commit point that not later than t...
public StandardSemImImpliedCovTable(StandardizedSemIm semIm,boolean measured,boolean correlations){ this.semIm=semIm; this.measured=measured; this.correlations=correlations; this.nf=NumberFormatUtil.getInstance().getNumberFormat(); if (measured() && covariances()) { matrix=getSemIm().getImplCovarMeas().to...
Constructs a new table for the given covariance matrix, the nodes for which are as specified (in the order they appear in the matrix).
private void popLongAsDouble(FPR reg){ asm.emitLFD(reg,spTopOffset + 2 * BYTES_IN_STACKSLOT - BYTES_IN_DOUBLE,FP); discardSlots(2); }
Emit the code to pop a long value from the expression stack into the register 'reg'.<p> NOTE: in 32 bit mode, reg is actually a FP register and we are treating the long value as if it were an FP value to do this in one instruction!!!
public int size(){ return annotations.size(); }
Gets the number of elements in this instance.
@Override public boolean remove(Object o){ if (!(o instanceof Struct)) { return false; } Struct s=(Struct)o; if (!this.structType.equals(StructTypeImpl.typeFromStruct(s))) { return false; } return removeFieldValues(s.getFieldValues()); }
Remove the specified Struct
protected byte[] _decodeBase64(Base64Variant b64variant) throws IOException, JsonParseException { ByteArrayBuilder builder=_getByteArrayBuilder(); while (true) { int ch; do { if (_inputPtr >= _inputEnd) { loadMoreGuaranteed(); } ch=(int)_inputBuffer[_inputPtr++] & 0xFF; } whil...
Efficient handling for incremental parsing of base64-encoded textual content.
private void processAnsiCommand_B(){ moveCursorDown(getAnsiParameter(0)); }
This method moves the cursor down by the number of lines specified by the escape sequence parameter (default 1).
public String testAbstractClass_method1(int p1,int p2) throws java.io.IOException, java.lang.NullPointerException { return null; }
Test 1 passes.
public void addRequestTags(String url,String host,String path,String method,Map<String,? extends Collection<String>> headers){ addRequestTags(url,host,path,method); addRequestTagsFromHeaders(headers); }
Adds tags from the HTTP request together with headers to the current Span
public void openDriver(SurfaceHolder holder) throws IOException { if (camera == null) { camera=Camera.open(); if (camera == null) { throw new IOException(); } camera.setPreviewDisplay(holder); if (!initialized) { initialized=true; configManager.initFromCameraParameters(camera); ...
Opens the camera driver and initializes the hardware parameters.
@Override public int size(){ return size; }
Returns the number of mappings in this IdentityHashMap.
@SuppressWarnings("unchecked") protected static <T>T enumProperty(String name,Class cls){ return enumProperty(name,cls,null); }
Get enum property.
public static int calcHeaderWidth(JTable table,int col){ if (table == null) { return -1; } if (col < 0 || col > table.getColumnCount()) { System.out.println("invalid col " + col); return -1; } JTableHeader header=table.getTableHeader(); TableCellRenderer defaultHeaderRenderer=null; if (header ...
Calculates the optimal width for the header of the given table. The calculation is based on the preferred width of the header renderer.
public static <T1,T2,T3,T4,T5,T6,R>Promise<R> join(Promise<T1> p1,Promise<T2> p2,Promise<T3> p3,Promise<T4> p4,Promise<T5> p5,Promise<T6> p6,final Func6<T1,T2,T3,T4,T5,T6,R> joinFunction){ return new Promise<R>(Observable.zip(p1.observable,p2.observable,p3.observable,p4.observable,p5.observable,p6.observable,joinFunc...
Combines the values of the promises into a promise of type R by applying the specified function. If any of the promises are rejected the returned promise is immediately rejected.
@Around("execution(* org.yes.cart.service.domain.impl.CustomerServiceImpl.create(..))") public Object doSetPassword(final ProceedingJoinPoint pjp) throws Throwable { setPassword((Customer)pjp.getArgs()[0]); return pjp.proceed(); }
Handle reset password operation.
public SendingSearch(UpnpService upnpService,UpnpHeader searchTarget){ this(upnpService,searchTarget,MXHeader.DEFAULT_VALUE); }
Defaults to an MX value of 3 seconds.
private static void renumProviders(){ Provider[] p=Services.getProviders(); for (int i=0; i < p.length; i++) { p[i].setProviderNumber(i + 1); } }
Update sequence numbers of all providers.
public static void main(String[] args){ System.out.println("\np 2^p-1"); System.out.println("--------------------"); for (int p=2; p <= 31; p++) { if (PrimeNumberMethod.isPrime(p)) { System.out.printf("%-13d",p); System.out.println(mersennePrime(p)); } } }
Main Method
public void logException(Throwable e,String message){ logMessage(IStatus.ERROR,message,e); }
Log an exception.
public void update(String sqlQuery){ db.rawQuery("UPDATE " + mDefaultTable + sqlQuery,null); }
Does the SQL UPDATE function on the table with given SQL string
public ProfilerSection section(String name){ if (!sections.containsKey(name)) { ProfilerSection sec=new ProfilerSection(name,this); sections.put(name,sec); return sec; } return sections.get(name); }
Get (or create) a profiler section. This is the subset of the profiler action everything fits under, and is shown in the root of the profiler tree.
public NotificationChain basicSetOwner(Composite newOwner,NotificationChain msgs){ msgs=eBasicSetContainer((InternalEObject)newOwner,DomPackage.CONTENT_NODE__OWNER,msgs); return msgs; }
<!-- begin-user-doc --> <!-- end-user-doc -->
private static String extractStatementResult(String result){ int pos=-1; if ((pos=result.indexOf("=")) >= 0) { return result.substring(pos + 1).trim(); } else { throw new RuntimeException("No result can be extracted from '" + result + "', "+ "something must be wrong"); } }
Extract the eval result of spark shell, e.g. extract application_1473129941656_0048 from following: res0: String = application_1473129941656_0048
public <T,I extends Serializable>Slice<T> findAll(final Pageable pageable,final Class<T> domainClass){ final SimpleJpaNoCountRepository<T,I> noCountDao=new SimpleJpaNoCountRepository<>(domainClass,em); return noCountDao.findAll(pageable); }
Searches without the need for an extra count query.
private void updateProgress(String progressLabel,int progress){ if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) { myHost.updateProgress(progressLabel,progress); } previousProgress=progress; previousProgressLabel=progressLabel; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
public void mapTableViewerColumn(Enum<?> key,TableViewerColumn column){ tableViewerColumnMap.put(key,column); }
Maps a column with the enumeration key. The implementing classes should map each column they create to the enum that represents that column. Later on the column can be retrieved with the enum key if needed.
public void handleUpdateView(ReactShadowNode node,String className,CatalystStylesDiffMap props){ if (!ENABLED) { mUIViewOperationQueue.enqueueUpdateProperties(node.getReactTag(),className,props); return; } boolean needsToLeaveLayoutOnly=node.isLayoutOnly() && !isLayoutOnlyAndCollapsable(props); if (need...
Handles an updateView call. If a view transitions from being layout-only to not (or vice-versa) this could result in some number of additional createView and manageChildren calls. If the view is layout only, no updateView call will be dispatched to the native hierarchy.
@Override protected void onStop(){ if (null != mDownloaderClientStub) { mDownloaderClientStub.disconnect(this); } super.onStop(); }
Disconnect the stub from our service on stop
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:09.218 -0500",hash_original_method="FF1AA715D5A76F97289F9771795F5B75",hash_generated_method="D13EA8B4571C88CE1520B97A33E45D38") public void arcTo(RectF oval,float startAngl...
Append the specified arc to the path as a new contour. If the start of the path is different from the path's current last point, then an automatic lineTo() is added to connect the current contour to the start of the arc. However, if the path is empty, then we call moveTo() with the first point of the arc. The sweep ang...
public static IntList copy(IntList other,int startIndex,int length){ return copy(other,startIndex,length,length); }
Makes a new int list by copying a range from a given int list.