code
stringlengths
10
174k
nl
stringlengths
3
129k
public boolean isChanged(){ if (m_change) { MLocator l=(MLocator)fLocator.getSelectedItem(); if (l != null) return l.getM_Locator_ID() == m_M_Locator_ID; } return m_change; }
Get result
public boolean acceptIncomingConnect(BluetoothDevice device){ if (DBG) log("acceptIncomingConnect"); if (mService != null && isEnabled()) { try { return mService.acceptIncomingConnect(device); } catch ( RemoteException e) { Log.e(TAG,e.toString()); } } else { Log.w(TAG,"Proxy no...
Accept the incoming connection. Note: This is an internal function and shouldn't be exposed
public void brk(AArch64ExceptionCode exceptionCode){ super.brk(exceptionCode.encoding); }
Monitor mode software breakpoint: exception routed to a debug monitor executing in a higher exception level.
public PropertiesMetalTheme(InputStream stream){ initColors(); loadProperties(stream); }
pass an inputstream pointing to a properties file. Colors will be initialized to be the same as the DefaultMetalTheme, and then any colors provided in the properties file will override that.
public Spider thread(ExecutorService executorService,int threadNum){ checkIfRunning(); this.threadNum=threadNum; if (threadNum <= 0) { throw new IllegalArgumentException("threadNum should be more than one!"); } return this; }
start with more than one threads
public HierarchicalTreeModel(Map<GraphNode,? extends SuccessorEdges> index){ this.index=index; }
Create a TreeModel from a Map of SuccessorEdges.
Type fold2(int opcode,Type left,Type right){ try { if (opcode > ByteCodes.preMask) { Type t1=fold2(opcode >> ByteCodes.preShift,left,right); return (t1.constValue() == null) ? t1 : fold1(opcode & ByteCodes.preMask,t1); } else { Object l=left.constValue(); Object r=right.constValue(); ...
Fold binary operation.
public boolean isSetType(){ return EncodingUtils.testBit(__isset_bitfield,__TYPE_ISSET_ID); }
Returns true if field type is set (has been assigned a value) and false otherwise
public static void noNullElements(Object[] objects){ noNullElements(objects,"Array must not contain any null objects"); }
Validates that the array contains no null elements
private void adjustApproximatedKNNDistances(MkCoPEntry entry,Map<DBID,KNNList> knnLists){ MkCoPTreeNode<O> node=getNode(entry); if (node.isLeaf()) { for (int i=0; i < node.getNumEntries(); i++) { MkCoPLeafEntry leafEntry=(MkCoPLeafEntry)node.getEntry(i); approximateKnnDistances(leafEntry,knnLists.ge...
Adjusts the knn distance in the subtree of the specified root entry.
private void sortFiles() throws IOException { for ( String filePath : filePaths) { readProperties(filePath); Map<String,String> sortedProps=sort(props); write(sortedProps,filePath); } }
Reads the properties from the first specified file as master key set, sorts them and writes the values back to the files, properly escaped. Then reads the remaining files, sorting the properties and adding empty entries for the missing keys.
private void returnData(Object ret){ if (myHost != null) { myHost.returnData(ret); } }
Used to communicate a return object from a plugin tool to the main Whitebox user-interface.
@Override public ConnectionPoolDataSource createConnectionPoolDataSource(Properties properties) throws SQLException { Properties propertiesCopy=new Properties(); if (properties != null) { propertiesCopy.putAll(properties); } rejectUnsupportedOptions(propertiesCopy); rejectPoolingOptions(propertiesCopy); ...
Creates a pooled data source.
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter,java.lang.String namespace) throws javax.xml.stream.XMLStreamException { java.lang.String prefix=xmlWriter.getPrefix(namespace); if (prefix == null) { prefix=generatePrefix(namespace); while (xmlWriter.getNamespaceContext().g...
Register a namespace prefix
public boolean deleteImage(String path){ return new File(path).delete(); }
Delete image file at 'path'
public DD ceil(){ if (isNaN()) return NaN; double fhi=Math.ceil(hi); double flo=0.0; if (fhi == hi) { flo=Math.ceil(lo); } return new DD(fhi,flo); }
Returns the smallest (closest to negative infinity) value that is not less than the argument and is equal to a mathematical integer. Special cases: <ul> <li>If this value is NaN, returns NaN. </ul>
@Override public Object adapt(Object object,Object type){ if (isFactoryForType(type)) { Object adapter=super.adapt(object,type); if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) { return adapter; } } return null; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public AccountHeaderBuilder withProfileImagesVisible(boolean profileImagesVisible){ this.mProfileImagesVisible=profileImagesVisible; return this; }
define if the profile images in the header are shown or not
public void previousTrack(){ buildAndSendMessage(null,"PreviousTrack"); }
Tell the Chromecast to return to the previous track in the playlist
public CalibratedGyroscopeProvider(SensorManager sensorManager){ super(sensorManager); sensorList.add(sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE)); }
Initialises a new CalibratedGyroscopeProvider
@Override public void run(){ amIActive=true; String redHeader, greenHeader, blueHeader, intensityHeader, saturationHeader, hueHeader; if (args.length <= 0) { showFeedback("Plugin parameters have not been set."); return; } redHeader=args[0]; greenHeader=args[1]; blueHeader=args[2]; intensityHeade...
Used to execute this plugin tool.
public List<HostStorageDomain> addHostStorageDomains(String systemId,List<HostStorageDomain> hostGroups,String model) throws Exception { InputStream responseStream=null; List<HostStorageDomain> hsdList=null; try { Map<String,Object> attributeMap=new HashMap<String,Object>(); StorageArray array=new Storage...
This method makes http POST call with a payload of bulk HostStorageDomains.
public BitmapDrawer scaleRegistration(float regX,float regY){ setScaleRegistration(regX,regY); return this; }
The left offset and y offset for this display object's registration point. For example, to make a 100x100px Bitmap scale around its center, you would set regX and regY to 50.
public static boolean isRuntimeModule(String module){ return module != null && RUNTIME_MODULES_PATTERN.matcher(module).matches(); }
Returns true, if the given Java 9 module name is part of the runtime (no custom 3rd party module).
public static void outputResultTreeFragment(SerializationHandler handler,XObject obj,XPathContext support) throws org.xml.sax.SAXException { int doc=obj.rtf(); DTM dtm=support.getDTM(doc); if (null != dtm) { for (int n=dtm.getFirstChild(doc); DTM.NULL != n; n=dtm.getNextSibling(n)) { handler.flushPendin...
Given a result tree fragment, walk the tree and output it to the SerializationHandler.
public Enumeration entries(){ if (!isOpen()) return null; return m_zipFile.entries(); }
Get ZipEntries as Enumeration
@Override public boolean rowUpdated() throws SQLException { try { debugCodeCall("rowUpdated"); return false; } catch ( Exception e) { throw logAndConvert(e); } }
Detects if the row was updated (by somebody else or the caller).
public void reConnect(String mac){ }
Reconnect a bluetooth device by MAC address when the connection is lost.
protected String tmpname(){ synchronized (OsLib.class) { return TMP_PREFIX + (tmpnames++) + TMP_SUFFIX; } }
Returns a string with a file name that can be used for a temporary file. The file must be explicitly opened before its use and explicitly removed when no longer needed. On some systems (POSIX), this function also creates a file with that name, to avoid security risks. (Someone else might create the file with wrong ...
public static void retrieve(String accountName,String deviceId,String deviceToken) throws IOException { URL url=new URL("https://iotmms" + accountName + ".hanatrial.ondemand.com/com.sap.iotservices.mms/v1/api/http/data/"+ deviceId); HttpURLConnection connection=(HttpURLConnection)url.openConnection(); connection....
Retrieves messages from the PUSH API
private boolean updateCalculatedGoals(){ if (!MEASURETYPE_Calculated.equals(getMeasureType())) return false; MGoal[] goals=MGoal.getMeasureGoals(getCtx(),getPA_Measure_ID()); for (int i=0; i < goals.length; i++) { MGoal goal=goals[i]; MRole role=null; if (goal.getAD_Role_ID() != 0) role=MRole.ge...
Update/save Goals with Calculation
public IKnowledge parseKnowledge(char[] chars){ CharArrayReader reader=new CharArrayReader(chars); Lineizer lineizer=new Lineizer(reader,commentMarker); IKnowledge knowledge=parseKnowledge(lineizer,delimiterType.getPattern()); this.logger.reset(); return knowledge; }
Parses knowledge from the char array, assuming that's all there is in the char array.
public MarkerAxisBand(NumberAxis axis,double topOuterGap,double topInnerGap,double bottomOuterGap,double bottomInnerGap,Font font){ this.axis=axis; this.topOuterGap=topOuterGap; this.topInnerGap=topInnerGap; this.bottomOuterGap=bottomOuterGap; this.bottomInnerGap=bottomInnerGap; this.font=font; this.marke...
Constructs a new axis band.
public RefactoringHistoryEvent(final IRefactoringHistoryService service,final int type,final RefactoringDescriptorProxy proxy){ Assert.isNotNull(service); Assert.isNotNull(proxy); fService=service; fType=type; fProxy=proxy; }
Creates a new refactoring history event.
public String toString(){ StringBuffer uriSpecString=new StringBuffer(); if (m_scheme != null) { uriSpecString.append(m_scheme); uriSpecString.append(':'); } uriSpecString.append(getSchemeSpecificPart()); return uriSpecString.toString(); }
Get the URI as a string specification. See RFC 2396 Section 5.2.
public static boolean isComponent(Object object){ return object instanceof Component; }
tests if object is a Component
public CertificateNotYetValidException(){ super(); }
Constructs a CertificateNotYetValidException with no detail message. A detail message is a String that describes this particular exception.
public static PlaceholderFragment newInstance(int sectionNumber){ PlaceholderFragment fragment=new PlaceholderFragment(); Bundle args=new Bundle(); args.putInt(ARG_SECTION_NUMBER,sectionNumber); fragment.setArguments(args); return fragment; }
Returns a new instance of this fragment for the given section number.
@Override public String toString(){ return format(-1); }
Return the XML document formatted with two spaces for indents. Chosen to do this since it's the most common case (e.g. with println()). Same as format(2). Use the format() function for more options.
@Override public boolean isObstacle(final Entity entity){ if (!(entity instanceof Player)) { return super.isObstacle(entity); } final Player player=(Player)entity; if (player.isGhost()) { return false; } final Player occupant=getOccupant(); if (occupant != null) { if (contains(occupant)) { ...
Checks whether players, NPC's, etc. can walk over this entity.
private void movePlayer(final Point p,boolean doubleClick){ if (p.y <= height) { final RPAction action=new RPAction(); action.put("type","moveto"); action.put("x",(p.x + xOffset) / scale); action.put("y",(p.y + yOffset) / scale); if (doubleClick) { action.put("double_click",""); } cl...
Tell the player to move to point p
public Composite composite(){ return comp; }
Returns the SWT composite that hosts the game view.
public void clearPassword(String code){ ComponentName demoDeviceAdmin=new ComponentName(context,AgentDeviceAdminReceiver.class); resultBuilder.build(code); devicePolicyManager.setPasswordQuality(demoDeviceAdmin,DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED); devicePolicyManager.setPasswordMinimumLength(demoD...
Clear device password.
private void beforeKey() throws JSONException { Scope context=peek(); if (context == Scope.NONEMPTY_OBJECT) { out.append(','); } else if (context != Scope.EMPTY_OBJECT) { throw new JSONException("Nesting problem"); } newline(); replaceTop(Scope.DANGLING_KEY); }
Inserts any necessary separators and whitespace before a name. Also adjusts the stack to expect the key's value.
public ObjectFactory(){ }
Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: pl.baczkowicz.mqttspy.configuration.generated
public static String xmlStartDoc(){ return "<?xml version=\"1.0\"?>\n"; }
Returns <?xml version="1.0"?>
public static IndexColumn[] wrap(Column[] columns){ IndexColumn[] list=new IndexColumn[columns.length]; for (int i=0; i < list.length; i++) { list[i]=new IndexColumn(); list[i].column=columns[i]; } return list; }
Create an array of index columns from a list of columns. The default sort type is used.
public static void addComponent(FaceletContext ctx,UIComponent parent,UIComponent child){ String facetName=getFacetName(parent); if (facetName == null) { if (child.getAttributes().containsKey(RIConstants.DYNAMIC_COMPONENT)) { int childIndex=(Integer)child.getAttributes().get(RIConstants.DYNAMIC_COMPONENT)...
<p class="changed_added_2_0">Add the child component to the parent. If the parent is a facet, check to see whether the facet is already defined. If it is, wrap the existing component in a panel group, if it's not already, then add the child to the panel group. If the facet does not yet exist, make the child the facet.<...
public static void delete(File file,boolean ignoreDir){ if (file == null || !file.exists()) { return; } if (file.isFile()) { file.delete(); return; } File[] fileList=file.listFiles(); if (fileList == null) { return; } for ( File f : fileList) { delete(f,ignoreDir); } if (!ignore...
Delete corresponding path, file or directory.
public char[] toChars(){ char[] ch=new char[s.length()]; for (int i=0; i < s.length(); i++) { ch[i]=s.charAt(i); } return ch; }
Return string as a character array
public boolean send(byte[] bytes){ if (!connected) return false; try { outputStream.write(bytes); outputStream.flush(); return true; } catch ( IOException e) { connected=false; Log.e(TAG,"Fail to send data"); return false; } finally { if (!connected) { closeConnection(); ...
Send array of bytes to bluetooth output stream.
public static String toString(byte[] a){ if (a == null) return "null"; int iMax=a.length - 1; if (iMax == -1) return "[]"; StringBuilder b=new StringBuilder(); b.append('['); for (int i=0; ; i++) { b.append(a[i]); if (i == iMax) return b.append(']').toString(); b.append(", "); } }
Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets (<tt>"[]"</tt>). Adjacent elements are separated by the characters <tt>", "</tt> (a comma followed by a space). Elements are converted to strings as...
public Chest2DView(){ openChanged=false; requestOpen=false; }
Create a 2D view of a chest.
public void applyToOr(TextView textView,ColorStateList colorDefault){ if (mColorInt != 0) { textView.setTextColor(mColorInt); } else if (mColorRes != -1) { textView.setTextColor(ContextCompat.getColor(textView.getContext(),mColorRes)); } else if (colorDefault != null) { textView.setTextColor(col...
a small helper to set the text color to a textView null save
protected void doneInternal(){ if (states.size() > 0) throw new JsonWriterException("Unclosed JSON objects and/or arrays when closing writer"); if (first) throw new JsonWriterException("Nothing was written to the JSON writer"); }
Ensures that the object is in the finished state.
public void destroySubcontext(Name name) throws NamingException { checkIsDestroyed(); Name parsedName=getParsedName(name); if (parsedName.size() == 0 || parsedName.get(0).length() == 0) { throw new InvalidNameException(LocalizedStrings.ContextImpl_NAME_CAN_NOT_BE_EMPTY.toLocalizedString()); } String subCo...
Destroys subcontext with name name. The subcontext must be empty otherwise ContextNotEmptyException is thrown. Once a context is destroyed, the instance should not be used.
public synchronized void reopen(int _log) throws IOException { Log oldlog=(Log)logs.elementAt(_log); logs.setElementAt(oldlog.reopen(),_log); }
Forces a file-based log to reopen, erasing its previous contents. non-file logs ignore this.
private Object readLiteral() throws JSONException { String literal=nextToInternal("{}[]/\\:,=;# \t\f"); if (literal.length() == 0) { throw syntaxError("Expected literal value"); } else if ("null".equalsIgnoreCase(literal)) { return JSONObject.NULL; } else if ("true".equalsIgnoreCase(literal)) { ...
Reads a null, boolean, numeric or unquoted string literal value. Numeric values will be returned as an Integer, Long, or Double, in that order of preference.
public DeviceAutomator onHomeScreen(){ return onHomeScreen(5000); }
Presses the home button and waits for the launcher with a timeout of 5 seconds.
public void run(){ log.info("IdentServer running on port " + serverSocket.getLocalPort()); while (!serverSocket.isClosed()) { Socket socket=null; try { socket=serverSocket.accept(); BufferedReader reader=new BufferedReader(new InputStreamReader(socket.getInputStream(),encoding)); OutputStr...
Waits for a client to connect to the ident server before making an appropriate response.
public TwitchApiRequest(TwitchApi origin,RequestType type,String url,String token){ this.url=url; this.origin=origin; this.type=type; this.token=token; }
Construct a new request with the given type, url and token. The token can be null if no token should be used.
public void test_ticket_bg1899_h() throws Exception { new TestHelper("ticket_bg1899h","ticket_bg1899h.rq","ticket_bg1899h.n3","ticket_bg1899h.srx").runTest(); }
Test case for proper reconstruction of cache from HTree index for numerics.
private static int _token_sort(String s1,String s2,Boolean partial,Boolean force_ascii){ if (partial == null) { partial=true; } if (force_ascii == null) { force_ascii=true; } x.assertNotNull(s1,"s1 is null"); x.assertNotNull(s2,"s2 is null"); String sorted1=_process_and_sort(s1,force_ascii); Str...
# Sorted Token # find all alphanumeric tokens in the string # sort those tokens and take ratio of resulting joined strings # controls for unordered string elements
public int size(){ return messages.size(); }
return size of the store in term of number of element
String removeFromPlaylist(int index){ return "invalid.index: " + index; }
Returns "ok" on success and a failure message on failure after taking an index into the playlist and remove it.
static void tick(){ if (Timings.isTimingsEnabled()) { boolean violated=Timings.fullServerTickTimer.isViolated(); for ( Timing timing : TIMINGS) { if (timing.isSpecial()) { continue; } timing.tick(violated); } TimingsHistory.playerTicks+=Server.getInstance().getOnlinePlayer...
Called every tick to count the number of times a timer caused TPS loss.
public void migrateVirtualVolume(URI vplexURI,URI virtualVolumeURI,URI targetVolumeURI,URI migrationURI,URI newNhURI,String stepId) throws WorkflowException { _log.info("Migration {} using target {}",migrationURI,targetVolumeURI); try { WorkflowStepCompleter.stepExecuting(stepId); _workflowService.storeStep...
Creates and starts a VPlex data migration for the passed virtual volume on the passed VPlex storage system. The passed target is a newly created backend volume to which the data will be migrated. The source for the data migration is the current backend volume for the virtual volume that is in the same varray as the pas...
public Map<String,String> convert(Map<String,List<Integer>> lineCoverage){ Map<String,String> results=new HashMap<String,String>(); for ( Map.Entry<String,List<Integer>> entry : lineCoverage.entrySet()) { results.put(entry.getKey(),convertFileCoverage(entry.getValue())); } return results; }
Convert line coverage to the Harbormaster coverage format
public static DbException wrapException(String sql,Exception ex){ SQLException e=DbException.toSQLException(ex); return DbException.get(ErrorCode.ERROR_ACCESSING_LINKED_TABLE_2,e,sql,e.toString()); }
Wrap a SQL exception that occurred while accessing a linked table.
void doSparqlQuery(final HttpServletRequest req,final HttpServletResponse resp) throws IOException { if (!isReadable(getServletContext(),req,resp)) { return; } final String queryStr=getQueryString(req); if (queryStr == null) { buildAndCommitResponse(resp,HTTP_BADREQUEST,MIME_TEXT_PLAIN,"Not found: query...
Run a SPARQL query.
public void testRemoveWorstPlans_nullType(){ PlanSelector<Plan,Person> selector=getPlanSelector(); Person person=PopulationUtils.getFactory().createPerson(Id.create(1,Person.class)); Plan plan1=PopulationUtils.createPlan(person); plan1.setScore(15.0); Plan plan2=PopulationUtils.createPlan(person); plan2.set...
Tests plan selection when all plans have the type <code>null</code>.
public CharSetMap(Properties props){ this(); mappers[MAP_PROG]=new HashMap(props); }
Constructs a charset map from properties.
@Override public boolean test(final Array params){ for (int i=0; i < params.size(); i++) { if ((params.get(i) < low) || (params.get(i) > high)) { return false; } } return true; }
Tests if params satisfy the constraint.
public static boolean equals(int[] a,int[] a2){ if (a == a2) return true; if (a == null || a2 == null) return false; int length=a.length; if (a2.length != length) { return false; } for (int i=0; i < length; i++) { if (a[i] != a2[i]) return false; } return true; }
Returns <tt>true</tt> if the two specified arrays of ints are <i>equal</i> to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in ...
public static ShortRange fixed(int num){ return new ShortRange(num,num); }
Create range with only gived value in range.
public void onReqMarketData(Contract contract,String genericTicklist,boolean snapshot) throws BrokerModelException { try { if (m_client.isConnected()) { if (this.isMarketDataRunning(contract)) { throw new BrokerModelException(contract.getId(),3030,"MarketData request is already in progress for: " + ...
Method onReqMarketData.
protected String generateJavadoc(int index) throws Exception { String result; Method method; result=""; if (index == 0) { if (!canInstantiateClass()) return result; try { method=getInstance().getClass().getMethod(GLOBALINFO_METHOD,(Class[])null); } catch ( Exception e) { return r...
generates and returns the Javadoc for the specified start/end tag pair.
public static void deleteContents(File dir) throws IOException { File[] files=dir.listFiles(); if (files != null) { for ( File file : files) { if (file.isDirectory()) { deleteContents(file); } file.delete(); } } }
Do not use. Use createTemporaryDirectory instead. Used by frameworks/base unit tests to clean up a temporary directory. Deliberately ignores errors, on the assumption that test cleanup is only supposed to be best-effort.
public static IntBuffer createIntBuffer(int elements){ ByteBuffer byteBuffer=ByteBuffer.allocateDirect(elements * 4); byteBuffer.order(ByteOrder.nativeOrder()); return byteBuffer.asIntBuffer(); }
Creates a buffer for the given number of elements and native byte ordering
public boolean isConnected(){ return mSocketState == SocketState.CONNECTED; }
Get the connection status of this socket, ie, whether there is an active connection with remote device.
public ReflectiveProperty(Class<T> propertyHolder,Class<V> valueType,String name){ super(valueType,name); char firstLetter=Character.toUpperCase(name.charAt(0)); String theRest=name.substring(1); String capitalizedName=firstLetter + theRest; String getterName=PREFIX_GET + capitalizedName; try { mGetter=...
For given property name 'name', look for getName/isName method or 'name' field. Also look for setName method (optional - could be readonly). Failing method getters and field results in throwing NoSuchPropertyException.
public void basicRemoveAll(Collection<? extends Figure> figures){ for ( Figure f : figures) { basicRemove(f); } }
Removes all children.
@Deprecated @Override public final void remove(){ throw new UnsupportedOperationException(); }
Guaranteed to throw an exception and leave the underlying data unmodified.
public synchronized void sync(){ if (readOnly) { return; } if (mvStore != null) { mvStore.sync(); } if (pageStore != null) { pageStore.sync(); } }
Synchronize the files with the file system. This method is called when executing the SQL statement CHECKPOINT SYNC.
public static List<org.oscm.internal.vo.VORoleDefinition> convertToUpVORoleDefinition(List<org.oscm.vo.VORoleDefinition> oldVO){ if (oldVO == null) { return null; } List<org.oscm.internal.vo.VORoleDefinition> newVO=new ArrayList<org.oscm.internal.vo.VORoleDefinition>(); for ( org.oscm.vo.VORoleDefinition t...
Convert list of VORoleDefinition.
public static void error(final ErrorType type,final String... params){ if (type != null && type.getNumberOfParameters() == params.length) { final ErrorEvent event=new ErrorEvent(type,params); userLog(event.getMessage()); notifyAll(event); } }
Convenience method to report an error. If the <code>type</code> is <code>null</code> or if the parameter count does not match the expected number of parameters then the notification is ignored. Any error reported here, is also sent to the log.
protected String predictionsToString(ArrayList<Prediction> predictions){ StringBuffer sb=new StringBuffer(); sb.append(predictions.size()).append(" predictions\n"); for (int i=0; i < predictions.size(); i++) { sb.append(predictions.get(i)).append('\n'); } return sb.toString(); }
Returns a string containing all the predictions.
public int code(){ return code; }
HTTP status code.
@Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); initializeDownloadUI(); if (!expansionFilesDelivered()) { try { Intent launchIntent=SampleDownloaderActivity.this.getIntent(); Intent intentToLaunchThisActivityFromNotification=new Intent(SampleDownloade...
Called when the activity is first create; we wouldn't create a layout in the case where we have the file and are moving to another activity without downloading.
public void clearCache(){ }
method to flush any caching values for cases where may need resetting (ie in CMYK where restore will render last values in setColor used for caching invalid
public void delete(ForumPostConfig config){ config.addCredentials(this); POST(this.url + "/delete-forum-post",config.toXML()); }
Permanently delete the forum post with the id.
public static void addChemicalOxidizerRecipe(ItemStack input,GasStack output){ try { Class recipeClass=Class.forName("mekanism.common.recipe.RecipeHandler"); Method m=recipeClass.getMethod("addChemicalOxidizerRecipe",ItemStack.class,GasStack.class); m.invoke(null,input,output); } catch ( Exception e) ...
Add a Chemical Oxidizer recipe.
public boolean isRare(){ return getAIProfiles().containsKey("rare"); }
Check if the creature has a rare profile, and thus should not appear in DeathMatch, or the daily quest.
private Set<Map<String,VariableDefinition>> handleMethodCallNodeChild(CCFGMethodCallNode callNode,Set<Map<String,VariableDefinition>> activeDefs,Set<BytecodeInstruction> freeUses,Set<DefUseCoverageTestFitness> foundPairs,Stack<MethodCall> callStack,CCFGMethodEntryNode investigatedMethod){ MethodCall call=MethodCall.c...
If the child is a CCFGMethodCallNode check if we previously determined reachable DUs in there and if so handle that call separately in order to minimize computation. make sure to update activeDefs and freeUses accordingly. after that just proceed with the child of that CCFGMethodCallNode
@Override public void zoomRangeAxes(double lowerPercent,double upperPercent,PlotRenderingInfo info,Point2D source){ this.rangeAxis.zoomRange(lowerPercent,upperPercent); }
Zooms in on the range axes.
public Iterator<WeakReference<V>> iterator(){ return map.values().iterator(); }
An iterator that visits the weak reference values in the map. You must test each weak reference in order to determine whether its value has been cleared as of the moment that you request that value. The entries visited by the iterator are not "touched" so the use of the iterator will not cause them to be retained any l...
public void test_read$BII() throws IOException { int bytesRead; RandomAccessFile raf=new java.io.RandomAccessFile(fileName,"rw"); byte[] rbuf=new byte[4000]; FileOutputStream fos=new java.io.FileOutputStream(fileName); fos.write(testString.getBytes(),0,testLength); fos.close(); bytesRead=raf.read(rbuf,10,...
java.io.RandomAccessFile#read(byte[], int, int)
private void addToMarker(LatLong endPoint){ MapHandler.getMapHandler().addEndMarker(endPoint); }
add end point marker to map
public static boolean isRightClick(MouseEvent e){ boolean result; result=false; if ((e.getButton() == MouseEvent.BUTTON3) && (e.getClickCount() == 1)) result=true; else if ((e.getButton() == MouseEvent.BUTTON1) && e.isAltDown() && !e.isShiftDown()&& !e.isControlDown()) result=true; return result; }
Checks whether the mouse event is a right-click event. Alt+Left-Click is also interpreted as right-click.
public long serviceInit(long memPtr) throws IgniteCheckedException { enter(); try { return PlatformCallbackUtils.serviceInit(envPtr,memPtr); } finally { leave(); } }
Initializes native service.