code
stringlengths
10
174k
nl
stringlengths
3
129k
private List<com.google.security.zynamics.binnavi.API.reil.mono.IInfluencingState<ApiLatticeElement,ObjectType>> wrap(final List<IInfluencingState<ApiLatticeElement,ObjectType>> states){ final List<com.google.security.zynamics.binnavi.API.reil.mono.IInfluencingState<ApiLatticeElement,ObjectType>> wrapped=new ArrayLis...
Wraps a list of API lattice elements into internal lattice elements.
@SuppressWarnings("unchecked") private static int find(Object[] arr,Object val,int bnd,int l,int r,Comparator c){ int m=l; int d=1; while (m <= r) { if (c.compare(val,arr[m]) > bnd) { l=m + 1; } else { r=m - 1; break; } m+=d; d<<=1; } while (l <= r) { m=(l + r) >>> 1...
Finds the place of specified range of specified sorted array, where the element should be inserted for getting sorted array. Uses exponential search algorithm.
public static UUID byteArrayToUuid(final byte[] src,final int srcPos){ if (src.length - srcPos < 16) { throw new IllegalArgumentException("Need at least 16 bytes for UUID"); } return new UUID(byteArrayToLong(src,srcPos,0,0,8),byteArrayToLong(src,srcPos + 8,0,0,8)); }
<p> Converts bytes from an array into a UUID using the default (little endian, Lsb0) byte and bit ordering. </p>
public long startTime(){ return this.startTime; }
Returns snapshot start time
public LinearSpaceDriver(ServerInterpreter server,String spaceName,Space mmtkSpace,int blockSize,boolean mainSpace){ super(server,spaceName,mmtkSpace,blockSize,mainSpace); if (DEBUG) { Log.write("LinearSpaceDriver for "); Log.write(spaceName); Log.write(", blocksize="); Log.write(blockSize); Log...
Create a new driver for a contiguous MMTk space.
public ModbusTCPTransport(Socket socket){ try { setSocket(socket); socket.setSoTimeout(timeout); } catch ( IOException ex) { logger.debug("ModbusTCPTransport::Socket invalid"); throw new IllegalStateException("Socket invalid",ex); } }
Constructs a new <tt>ModbusTransport</tt> instance, for a given <tt>Socket</tt>. <p>
public static void readFully(FileChannel channel,ByteBuffer dst) throws IOException { do { int r=channel.read(dst); if (r < 0) { throw new EOFException(); } } while (dst.remaining() > 0); }
Fully read from the file. This will read all remaining bytes, or throw an EOFException if not successful.
@Override protected EClass eStaticClass(){ return N4JSPackage.Literals.PROPERTY_NAME_VALUE_PAIR; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public CCSprite(CCSpriteFrame spriteFrame){ init(spriteFrame); }
Initializes an sprite with an sprite frame.
@Override public int hashCode(){ return key == null ? 0 : key.hashCode(); }
Returns a hash code value for the object.
public void cancel(){ mCanceled=true; cancelSoftwareAnimations(); mCanceled=false; }
Cancels all animations. The caller is responsible for removing the ripple from the list of animating ripples.
private String fetchDeviceType(String deviceType){ if (Constants._Block.equalsIgnoreCase(deviceType) || DiscoveredDataObject.Type.vnxblock.toString().equalsIgnoreCase(deviceType) || DiscoveredDataObject.Type.vmax.toString().equalsIgnoreCase(deviceType)) { return Constants._Block; } else if (Constants.COMPUTE...
Returns the context key based on its devicetype.
public void entering(String sourceClass,String sourceMethod,Object params[]){ throw new RuntimeException(); }
Log a method entry, with an array of parameters. <p> This is a convenience method that can be used to log entry to a method. A LogRecord with message "ENTRY" (followed by a format {N} indicator for each entry in the parameter array), log level FINER, and the given sourceMethod, sourceClass, and parameters is logged. <...
public void testIntervalOps(R1Interval x,R1Interval y,String expectedRelation){ assertEquals(x.contains(y),expectedRelation.charAt(0) == 'T'); assertEquals(x.interiorContains(y),expectedRelation.charAt(1) == 'T'); assertEquals(x.intersects(y),expectedRelation.charAt(2) == 'T'); assertEquals(x.interiorIntersects...
Test all of the interval operations on the given pair of intervals. "expected_relation" is a sequence of "T" and "F" characters corresponding to the expected results of contains(), interiorContains(), Intersects(), and InteriorIntersects() respectively.
public SPINARQFunction(Function spinFunction){ this.spinFunction=spinFunction; this.cachable=spinFunction.hasProperty(SPIN.cachable,JenaDatatypes.TRUE); try { Query spinQuery=(Query)spinFunction.getBody(); queryString=ARQFactory.get().createCommandString(spinQuery); arqQuery=ARQFactory.get().createQue...
Constructs a new SPINARQFunction based on a given SPIN Function. The spinFunction model be associated with the Model containing the triples of its definition.
public void sortPalettes(Comparator<Integer> comparator){ for ( String key : mColorPaletteMap.keySet()) { ArrayList<Integer> palette=mColorPaletteMap.get(key); Integer[] sortedColors=new Integer[palette.size()]; Arrays.sort(palette.toArray(sortedColors),comparator); palette.clear(); for ( Inte...
Sorts the arrays of colors based on a comparator.
public static void checkState(boolean expression,@Nullable Object errorMessage){ if (!expression) { throw new IllegalStateException(String.valueOf(errorMessage)); } }
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.
public boolean match(ParenthesizedExpression node,Object other){ if (!(other instanceof ParenthesizedExpression)) { return false; } ParenthesizedExpression o=(ParenthesizedExpression)other; return safeSubtreeMatch(node.getExpression(),o.getExpression()); }
Returns whether the given node and the other object match. <p> The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed. </p>
public static void showFab(FloatingActionButton fab){ fab.show(); fab.animate().translationY(0).setInterpolator(new DecelerateInterpolator(2)).start(); }
FAB animator that displays the FAB.
@Override public synchronized int hashCode(){ int result=1; for (int i=0; i < elementCount; i++) { result=(31 * result) + (elementData[i] == null ? 0 : elementData[i].hashCode()); } return result; }
Returns an integer hash code for the receiver. Objects which are equal return the same value for this method.
public GenericSipMsrpSession createMsrpSession(ContactId contact,String featureTag,String[] acceptTypes,String[] acceptWrappedTypes){ if (sLogger.isActivated()) { sLogger.info("Initiate a MSRP session with contact " + contact); } return new OriginatingSipMsrpSession(this,contact,featureTag,mRcsSettings,System...
Initiate a MSRP session
protected void init(int treeStyle,PatternFilter filter){ this.patternFilter=filter; setShowFilterControls(true); createControl(getParent(),treeStyle); createRefreshJob(); setInitialText(ViewerMessages.FilteredTree_FilterMessage); setFont(getParent().getFont()); }
Create the filtered tree.
public static String cdmaCheckAndProcessPlusCodeByNumberFormat(String dialStr,int currFormat,int defaultFormat){ String retStr=dialStr; if (dialStr != null && dialStr.lastIndexOf(PLUS_SIGN_STRING) != -1) { if ((currFormat == defaultFormat) && (currFormat == FORMAT_NANP)) { String postDialStr=null; S...
This function should be called from checkAndProcessPlusCode only And it is used for test purpose also. It checks the dial string by looping through the network portion, post dial portion 1, post dial porting 2, etc. If there is any plus sign, then process the plus sign. Currently, this function supports the plus sign c...
private static boolean isExternalStorageWritable(){ return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()); }
Checks if external storage is available for read and write.
public Object runSafely(Catbert.FastStack stack) throws Exception { String remoteName=getString(stack); int portNum=getInt(stack); SFIRTuner tun=ExternalTuningManager.getIRTunerPlugin(getString(stack),portNum); if (tun != null) return tun.getRemoteInfo(remoteName).prefixCmd; else return null; }
Gets the command that is to be sent before a channel change sequence is started. This is for devices that require a 'Power On' or 'Cancel' type of function to ensure the device is a responsive state.
private static int dpToPx(Context context,int dp){ float density=context.getResources().getDisplayMetrics().density; return Math.round((float)dp * density); }
Convets dp to px.
public void cdata(char ch[],int start,int length) throws org.xml.sax.SAXException { try { writeNormalizedChars(ch,start,length,m_lineSepUse); if (m_tracer != null) super.fireCDATAEvent(ch,start,length); } catch ( IOException ioe) { throw new SAXException(ioe); } }
Receive notification of cdata. <p>The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so tha...
public static Command show(String title,Component body,Command[] cmds,int type,Image icon){ return show(title,body,cmds,type,icon,0); }
Shows a modal dialog with the given component as its "body" placed in the center.
public int findItem(final String slotName,final String itemName){ RPSlot slot=getSlot(slotName); if (slot == null) { return -1; } for ( final RPObject item : slot) { if (item.get("name").equals(itemName)) { final int itemID=item.getID().getObjectID(); return itemID; } } return -1; }...
Returns the objectid for the named item.
public void handleInactivityEvent(){ }
Session inactivity event
public void deleteQueue(String name) throws Exception { }
delete a queue on the provider. differs from deleting a jms queue. unbind the associated admin object from the jndi store.
public static void reverse(byte[] array){ if (array == null) { return; } int i=0; int j=array.length - 1; byte tmp; while (j > i) { tmp=array[j]; array[j]=array[i]; array[i]=tmp; j--; i++; } }
Reverse an array of bytes to get the actual IP address
public AsyncLogWriter(ClientId provider){ this.provider=provider; }
Creates AsyncLogWriter with provider.
private ParserUtils(){ }
This class is not meant to be instantiated.
private int partition(T pivot,int from,int to){ if (to - from < temp.length) { return partitionSmall(pivot,from,to); } int m=(from + to + 1) / 2; int m1=partition(pivot,from,m - 1); int m2=partition(pivot,m,to); swapBlocks(m1,m,m2 - 1); return m1 + m2 - m; }
Move all elements that are bigger than the pivot to the end of the list, and return the partitioning index. The partitioning index is the start index of the range where all elements are larger than the pivot. If the partitioning index is larger than the 'to' index, then all elements are smaller or equal to the pivot.
public SerialMessage(byte[] a,int l){ super(String.valueOf(a)); setResponseLength(l); setBinary(true); }
This ctor interprets the byte array as a sequence of characters to send.
public CConnection(final CDatabaseConfiguration databaseConfiguration) throws CouldntLoadDriverException, SQLException { m_databaseConfiguration=Preconditions.checkNotNull(databaseConfiguration,"IE02409: m_databaseConfiguration argument can not be null"); final String url=Preconditions.checkNotNull(databaseConfigur...
Creates a new connection object.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:20.216 -0500",hash_original_method="1B5471D21BEA46C8ED1B36EA429F046B",hash_generated_method="277779C1CB18A60DD012AA41528BB1DB") public boolean quickReject(Path path,EdgeType type){ return native_quickReject(mNativeCanvas,path.ni()...
Return true if the specified path, after being transformed by the current matrix, would lie completely outside of the current clip. Call this to check if an area you intend to draw into is clipped out (and therefore you can skip making the draw calls). Note: for speed it may return false even if the path itself might n...
public MicroPipelineInstantiationResponse instantiatePipeline(final MicroPipelineConfiguration pipelineConfiguration) throws IOException, RemoteClientConnectionFailedException { MicroPipelineValidationResult cfgValidationResult=this.pipelineConfigurationValidator.validate(pipelineConfiguration); if (cfgValidationRe...
Instantiates the referenced pipeline on the remote processing node
public void scrollToCurrentRow(){ onPostSelectedRowChanged(); }
scroll grid to the current focus row
public void dateCallback(Date date){ m_dateFrom=new Timestamp(date.getTime()); fieldDate.setValue(m_dateFrom); }
Callback from WSchedule
public ResourceNotFoundException(String message,Throwable cause){ super(message,cause); }
Create a new <code>ResourceNotFoundException</code> with a message text and the root exception.
private String[] combineResultsFromMultipleReads(String[] buffer,String[] lastRead){ String[] t=new String[buffer.length + lastRead.length]; System.arraycopy(buffer,0,t,0,buffer.length); System.arraycopy(lastRead,0,t,buffer.length,lastRead.length); return t; }
For multi line records this method combines the current result with the result from previous read(s).
public static void sort(Comparable[] a){ Comparable[] aux=a.clone(); sort(aux,a,0,a.length - 1); assert isSorted(a); }
Rearranges the array in ascending order, using the natural order.
public KMLTraversalContext(){ }
Constructs a new KML traversal context in a default state, but otherwise does nothing.
private boolean isTypeValid(char type){ return (type == MAPPED_ADDRESS || type == RESPONSE_ADDRESS || type == SOURCE_ADDRESS || type == CHANGED_ADDRESS || type == REFLECTED_FROM || type == XOR_MAPPED_ADDRESS || type == ALTERNATE_SERVER || type == XOR_PEER_ADDRESS || type == XOR_RELAYED_ADDRESS || type == DESTINATION_...
Verifies that type is a valid address attribute type.
public JSONArray(Collection<?> collection){ this.myArrayList=new ArrayList<Object>(); if (collection != null) { for ( Object o : collection) { this.myArrayList.add(JSONObject.wrap(o)); } } }
Construct a JSONArray from a Collection.
public static <T>String joinAnd(final String delimiter,final String lastDelimiter,final Collection<T> objs){ if (objs == null || objs.isEmpty()) return ""; final Iterator<T> iter=objs.iterator(); final StringBuilder buffer=new StringBuilder(Strings.toString(iter.next())); int i=1; while (iter.hasNext()) { ...
Originally from RoboGuice: https://github.com/roboguice/roboguice/blob/master/roboguice/src/main/java/roboguice/util/Strings.java Like join, but allows for a distinct final delimiter. For english sentences such as "Alice, Bob and Charlie" use ", " and " and " as the delimiters.
public static void main(String[] args) throws Exception { Ignite ignite=Ignition.start("examples/config/filesystem/example-igfs.xml"); System.out.println(); System.out.println(">>> IGFS example started."); try { IgniteFileSystem fs=ignite.fileSystem("igfs"); IgfsPath workDir=new IgfsPath("/examples/fs")...
Executes example.
private void runTests(Problem problem,CommandLine commandLine){ int trials=5; if (commandLine.getOptionValue("test") != null) { trials=Integer.parseInt(commandLine.getOptionValue("test")); } try { int count=0; RandomInitialization initialization=new RandomInitialization(problem,trials); Solution...
Runs a number of trials as a way to quickly test if the connection between this solver and the problem is functional.
public boolean isDrafted(){ return STATUS_Drafted.equals(m_status); }
Document is Drafted
public static BufferedImage createWorkingCopy(BufferedImage bimg){ BufferedImage image; if (bimg.getType() == BufferedImage.TYPE_3BYTE_BGR) { image=bimg; } else { image=new BufferedImage(bimg.getWidth(),bimg.getHeight(),BufferedImage.TYPE_3BYTE_BGR); Graphics2D g2d=image.createGraphics(); g2d.dra...
Converts an image to a standard internal representation. Taken from OpenIMAJ. Thanks to these guys! http://sourceforge.net/p/openimaj
public void emitSYNC(){ final int LWSYNCtemplate=31 << 26 | 1 << 21 | 598 << 1; int mi=LWSYNCtemplate; appendInstruction(mi); }
Emits an LWSYNC. The "sync" on Power 4 architectures are expensive and so we use "lwsync" instead to implement SYNC. On older architectures, there is no problem because lwsync will get mapped to (hw)sync. On newer architectures, the weaker semantics of lwsync means that there are memory consistency bugs we might need t...
protected IIOMetadata updateMetadata(IIOMetadata meta,ImageWriterParams params){ final String stdmeta="javax_imageio_1.0"; if (meta.isStandardMetadataFormatSupported()) { IIOMetadataNode root=(IIOMetadataNode)meta.getAsTree(stdmeta); IIOMetadataNode dim=getChildNode(root,"Dimension"); IIOMetadataNode ch...
Updates the metadata information based on the parameters to this writer.
public static int secureRandomInt(int lowerThan){ SecureRandom sr=getSecureRandom(); synchronized (sr) { return sr.nextInt(lowerThan); } }
Get a cryptographically secure pseudo random int value between 0 (including and the given value (excluding).
@Override public void writeMessageBegin(TMessage message) throws TException { try { getCurrentWriter().writeStartObject(); getCurrentWriter().writeFieldName("method"); getCurrentWriter().writeString(message.name); getCurrentWriter().writeFieldName("type"); TypedParser.TMESSAGE_TYPE.writeValue(getC...
I believe these two messages are called for a thrift service interface. We don't plan on storing any text objects of that type on disk.
@Override public void handlePeriodicMaintenance(Operation post){ post.complete(); if (isBackgroundPaused()) { return; } Operation.CompletionHandler handler=null; Operation selectOwnerOp=Operation.createPost(null).setExpiration(ServiceUtils.computeExpirationTime(OWNER_SELECTION_TIMEOUT_MILLIS)).setCompleti...
Handle service periodic maintenance calls.
public static <E>TopicProcessor<E> share(String name,int bufferSize,Supplier<E> signalSupplier){ return share(name,bufferSize,null,signalSupplier); }
Create a new TopicProcessor using passed backlog size, wait strategy and signal supplier. The created processor will auto-cancel and is shared. <p> A Shared Processor authorizes concurrent onNext calls and is suited for multi-threaded publisher that will fan-in data. <p> A new Cached ThreadExecutorPool will be implicit...
public static boolean isParityAdjusted(byte[] key,int offset) throws InvalidKeyException { if (key.length - offset < DES_EDE_KEY_LEN) { throw new InvalidKeyException(); } for (int i=offset; i < DES_EDE_KEY_LEN + offset; i++) { int b=key[i]; if ((((b & 1) + ((b & 2) >> 1) + ((b & 4) >> 2)+ ((b & 8) >> ...
Returns whether the specified key data starting at <code>offset</code> is <i>parity-adjusted</i>.
public List<RawComponent> removeExperimentalComponents(String name){ List<RawComponent> all=getExperimentalComponents(); List<RawComponent> toRemove=new ArrayList<RawComponent>(); for ( RawComponent property : all) { if (property.getName().equalsIgnoreCase(name)) { toRemove.add(property); } } a...
Removes all experimental sub-components that have the given name.
@Override public int hashCode(){ String h=this.get(Schema.hash); return (int)(Base64Order.enhancedCoder.cardinal(h) >> 32); }
get the hash code of the peer. The hash code is a number that has the same order as the peer order.
private boolean recentlyExchangedWithPeer(Peer peer){ long now=(new Date()).getTime(); long then=getLastExchangeTime(peer).getTime(); return (now - then) < MS_BETWEEN_EXCHANGES; }
Check whether we've had an exchange with the given peer within the last MS_BETWEEN_EXCHANGES ms. Time since exchange isn't persisted, so this might answer false incorrectly if Murmur has been stopped and started.
@Override public void unregisterAdapterDataObserver(RecyclerView.AdapterDataObserver observer){ super.unregisterAdapterDataObserver(observer); if (mFastAdapter != null) { mFastAdapter.unregisterAdapterDataObserver(observer); } }
overwrite the unregisterAdapterDataObserver to correctly forward all events to the FastAdapter
public void testGetInputBooksDistribuidor2(){ ISWebServiceBooksSoap client=(ISWebServiceBooksSoap)this.applicationContext.getBean("clientWebServiceBooks"); Security security=new Security(); UsernameTokenClass value=new UsernameTokenClass(); value.setUsername("distribuidor2"); value.setPassword("distribuidor2"...
Verifica que el usuario <i>distribuidor2</i> autenticado en la oficina <i>003</i> tiene acceso al libro de entrada etiquetado como <i>Libro de entrada auxiliar</i>.
public void paintScrollPaneBackground(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 scroll pane.
public void openFrame(JInternalFrame f){ if (f.getDesktopIcon().getParent() != null) { f.getDesktopIcon().getParent().add(f); removeIconFor(f); } }
Normally this method will not be called. If it is, it try to determine the appropriate parent from the desktopIcon of the frame. Will remove the desktopIcon from its parent if it successfully adds the frame.
public boolean removeShutdownHook(Runnable shutdownHook){ return hooks.remove(shutdownHook); }
Removes a shutdownHook.
public String[] parseLineMulti(String nextLine) throws IOException { return parseLine(nextLine,true); }
Parses an incoming String and returns an array of elements. This method is used when the data spans multiple lines.
public static void main(String[] args) throws Exception { try { int exitCode=ToolRunner.run(new JdbcExportJob(),args); System.exit(exitCode); } catch ( Exception e) { LOG.error(e.getMessage()); System.exit(1); } }
The entry point when called from the command line.
public ChunkedHashStore(final TransformationStrategy<? super T> transform,final File tempDir,final ProgressLogger pl) throws IOException { this(transform,tempDir,0,pl); }
Creates a chunked hash store with given transformation strategy and progress logger.
public String attributeIndexTipText(){ return "Choose attribute to be used for selection (default last)."; }
Returns the tip text for this property
public Builder addDefaultValues(Iterable<? extends CharSequence> defaultValues){ for ( CharSequence defaultValue : defaultValues) { this.defaultValues.add(defaultValue); } return this; }
Add set of default values to the mapping
public void flush(Session session){ if (isTemporary()) { return; } if (session == null || !database.isSysTableLockedBy(session)) { Session sysSession=database.getSystemSession(); synchronized (sysSession) { synchronized (flushSync) { flushInternal(sysSession); } sysSession.commit(false...
Flush the current value, including the margin, to disk.
public boolean contains(Entry e){ for ( T set : mDataSets) { if (set.contains(e)) return true; } return false; }
Checks if this data object contains the specified Entry. Returns true if so, false if not. NOTE: Performance is pretty bad on this one, do not over-use in performance critical situations.
public final void disconnect(){ if (mNext != null) { mNext.mPrev=null; mNext=null; } if (mPrev != null) { mPrev.mNext=null; mPrev=null; } }
Removes this SignalProcessor from the processing chain leaving adjacent SignalProcessors disconnected
@Override public void attributeAdded(HttpSessionBindingEvent event){ log("attributeAdded('" + event.getSession().getId() + "', '"+ event.getName()+ "', '"+ event.getValue()+ "')"); }
Record the fact that a servlet context attribute was added.
public boolean unregister(Context context){ if (isRegistered) { context.unregisterReceiver(this); isRegistered=false; return true; } return false; }
unregister received
public void forward(){ Display.impl.browserForward(internal); }
Navigates forward in the history
@DSComment("Package priviledge") @DSBan(DSCat.DEFAULT_MODIFIER) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:57:29.125 -0500",hash_original_method="F4DF6B4551FDBC23EEE87B7E4E870504",hash_generated_method="F4DF6B4551FDBC23EEE87B7E4E870504") TimerImpl(String name,boolean isDaemon){...
Starts a new timer.
void disconnect(){ synchronized (lock) { disconnected=true; lock.notifyAll(); } }
Disconnect this stream from all connection activity.
public StringBuffer prepare(UCharacterIterator src,int options) throws ParseException { StringBuffer mapOut=map(src,options); StringBuffer normOut=mapOut; if (doNFKC) { normOut=normalize(mapOut); } int ch; char result; UCharacterIterator iter=UCharacterIterator.getInstance(normOut); Values val=new V...
Prepare the input buffer for use in applications with the given profile. This operation maps, normalizes(NFKC), checks for prohited and BiDi characters in the order defined by RFC 3454 depending on the options specified in the profile.
public static boolean checkTextInputLayoutValueRequirement(TextInputLayout textInputLayout,String errorValue){ if (textInputLayout != null && textInputLayout.getEditText() != null) { String text=Utils.getTextFromInputLayout(textInputLayout); if (text == null || text.isEmpty()) { textInputLayout.setError...
Method checks if text input layout exist and contains some value. If layout is empty, then show error value under the textInputLayout.
public void postVisit(ASTNode node){ }
Visits the given AST node following the type-specific visit (after <code>endVisit</code>). <p> The default implementation does nothing. Subclasses may reimplement. </p>
@LargeTest public void testMountUnsignedObb(){ mFile=createObbFile(OBB_FILE_2_UNSIGNED,R.raw.obb_file2_nosign); String filePath=mFile.getAbsolutePath(); mountObb(filePath,OBB_FILE_2_UNSIGNED,OnObbStateChangeListener.ERROR_INTERNAL); }
Tests mounting a single OBB that isn't signed.
@Override public Instances generateExamples() throws Exception { Instances format=getDatasetFormat(); Instance example=null; if (format == null) { throw new Exception("Dataset format not defined."); } for (int cNum=0; cNum < getClusters().length; cNum++) { SubspaceClusterDefinition cl=(SubspaceCluster...
Generate all examples of the dataset.
public static void main(final String[] args){ DOMTestCase.doMain(importNode01.class,args); }
Runs this test from the command line.
public Class<? extends IHighlightingConfiguration> bindIHighlightingConfiguration(){ return HighlightingConfiguration.class; }
Bind a proper highlighting configuration
public boolean handles(Capability c){ if (doNotCheckCapabilities()) { return true; } return m_Capabilities.contains(c); }
returns true if the classifier handler has the specified capability
public String toString(){ return "(unresolved " + type + " "+ name+ " "+ actions+ ")"; }
Returns a string describing this UnresolvedPermission. The convention is to specify the class name, the permission name, and the actions, in the following format: '(unresolved "ClassName" "name" "actions")'.
public IXMLElement createElement(String fullName){ return new XMLElement(fullName); }
Creates an empty element.
private void emitInvoke(){ if (parameterTypes.length > 65535) { throw new InternalError("Can't handle more than 65535 parameters"); } ClassFileAssembler cb=new ClassFileAssembler(); if (isConstructor) { cb.setMaxLocals(2); } else { cb.setMaxLocals(3); } short illegalArgStartPC=0; if (isCons...
This emits the code for either invoke() or newInstance()
public void prepend(CharSequence s){ text.insert(0,s); }
Add a string to the start of the first line of the buffer.
public void declareExtensions(ExtensionProfile extProfile){ super.declareExtensions(extProfile); }
Declares extensions used by Rows feeds into the extension profile.
public static Drawable decideIcon(ImageHolder imageHolder,Context ctx,int iconColor,boolean tint,int paddingDp){ if (imageHolder == null) { return null; } else { return imageHolder.decideIcon(ctx,iconColor,tint,paddingDp); } }
a small static helper which catches nulls for us
public Object deserialize(String json,String containerType,Class cls) throws ApiException { if (null != containerType) { containerType=containerType.toLowerCase(); } try { if ("list".equals(containerType) || "array".equals(containerType)) { JavaType typeInfo=JsonUtil.getJsonMapper().getTypeFactory()...
Deserialize the given JSON string to Java object.
public void dragDropEnd(DragSourceDropEvent dsde){ Debug.message("dndlistener","dragDropEnd(source)"); startDrag=true; }
This method is invoked to signify that the Drag and Drop operation is complete. The getDropSuccess() method of the <code>DragSourceDropEvent</code> can be used to determine the termination state. The getDropAction() method returns the operation that the <code>DropTarget</code> selected (via the DropTargetDropEvent acce...
public final void doFilter(final ServletRequest sRequest,final ServletResponse sResponse,final FilterChain chain) throws IOException, ServletException { HttpServletRequest request=(HttpServletRequest)sRequest; HttpServletResponse response=(HttpServletResponse)sResponse; if (!isIncluded(request) && headerContainsA...
Performs the filtering for a request.
public NoUniqueResultException(String message,Throwable cause){ super(message,cause); }
Create a new <code>NoUniqueResultException</code> with a message text and the root exception.
private void incorporateDequeues(){ final int cycles=itrs.cycles; final int takeIndex=ArrayBlockingQueue.this.takeIndex; final int prevCycles=this.prevCycles; final int prevTakeIndex=this.prevTakeIndex; if (cycles != prevCycles || takeIndex != prevTakeIndex) { final int len=items.length; long dequeues...
Adjusts indices to incorporate all dequeues since the last operation on this iterator. Call only from iterating thread.
protected CCMoveTo(float t,CGPoint pos){ super(t); startPosition=CGPoint.zero(); endPosition=CGPoint.make(pos.x,pos.y); delta=CGPoint.zero(); }
initializes the action