code
stringlengths
10
174k
nl
stringlengths
3
129k
public void onVerificationSmsSent(){ if (ENABLED) { trackOpt("Verification SMS Sent",null); } }
Send the event that a SMS was sent to verify the number
public StringLiteralConcatenation(StringLiteral str1,StringLiteral str2){ super(str1.sourceStart,str1.sourceEnd); this.source=str1.source; this.literals=new StringLiteral[INITIAL_SIZE]; this.counter=0; this.literals[this.counter++]=str1; extendsWith(str2); }
Build a two-strings literal
public void addProjectLabel(ProjectLabel projectLabel){ getProjectLabels().add(projectLabel); }
Adds a new project label.
private void viewContact(){ Intent contactIntent=new Intent(ContactsContract.Intents.SHOW_OR_CREATE_CONTACT); final String address=smsPopupPager.getActiveMessage().getAddress(); final boolean fromEmail=smsPopupPager.getActiveMessage().isEmail(); if (address != null) { if (PhoneNumberUtils.isWellFormedSmsAdd...
View contact that has the message address (or create if it doesn't exist)
public synchronized void deleteManagedResource(ManagedResource res){ String resourceId=res.getResourceId(); ManagedResourceRegistration existingReg=registry.registered.get(resourceId); int numObservers=existingReg.observers.size(); if (numObservers > 0) { String errMsg=String.format(Locale.ROOT,"Cannot dele...
Deletes a managed resource if it is not being used by any Solr components.
public void unreserve(Object object){ reservedIdsLock.lock(); if (!reservedObjects.contains(object)) { log.error(".unreserve FAILED, object=" + object); reservedIdsLock.unlock(); return; } reservedObjects.remove(object); reservedIdsLock.unlock(); }
Unreserve an object. Logs a fatal error if the unreserve failed.
@Override public boolean hasNext(){ if (!isOpen) return false; if (m_src == null) compile(realSource); boolean ret=m_src.hasNext(); if (!ret) { close(); } return ret; }
delegates hasNext request to source iterator
public static float[] translateBounds(float[] target,float x,float y,float z,float[] src){ assert target.length == 6; target[0]=src[0] + x; target[1]=src[1] + y; target[2]=src[2] + z; target[3]=src[3] + x; target[4]=src[4] + y; target[5]=src[5] + z; return target; }
Scales the provided bounding box
protected void connectionLog(String message){ Logger.sqlInfoLog(message); }
Description: <br>
public long optLong(String key){ return this.optLong(key,0); }
Get an optional long value associated with a key, or zero if there is no such key or if the value is not a number. If the value is a string, an attempt will be made to evaluate it as a number.
public MalformedConfigurationException(String message){ super(message); }
Instantiates a new malformed configuration exception.
public IotDevice iotDevice(){ return device; }
Get the application's IotDevice
@Nullable private Motion createMotionFromProperties(@NonNull final Spring spring,@NonNull final MotionProperty[] motionProperties,@Nullable final SpringListener[] springListeners,final int trackStrategy,final int followStrategy,final int restValue){ final MotionImitator[] motionImitators=new MotionImitator[motionProp...
Creations a new motion object.
public SynchronizedProtocolEncoder(ProtocolEncoder encoder){ if (encoder == null) { throw new IllegalArgumentException("encoder"); } this.encoder=encoder; }
Creates a new instance which decorates the specified <tt>encoder</tt>.
public boolean startPrefixMapping(String prefix,String uri,boolean shouldFlush) throws org.xml.sax.SAXException { boolean pushed; int pushDepth; if (shouldFlush) { flushPending(); pushDepth=m_elemContext.m_currentElemDepth + 1; } else { pushDepth=m_elemContext.m_currentElemDepth; } pushed=m_pre...
Handle a prefix/uri mapping, which is associated with a startElement() that is soon to follow. Need to close any open start tag to make sure than any name space attributes due to this event are associated wih the up comming element, not the current one.
@RequestMapping(method=RequestMethod.GET,value="/{region}/{keys}",produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ApiOperation(value="read data for specific keys",notes="Read data for specific set of keys in region.",response=void.class) @ApiResponses({@ApiResponse(code=200,message="OK."),@ApiResponse(code=400,message...
Reading data for set of keys
public void startPart(String contentType,String[] headers) throws IOException { writeCurrentBoundary(); if (contentType != null) { writeString(MimeUtils.HEADER_CONTENT_TYPE + ": " + contentType); out.write(CRLF); } for (int i=0; headers != null && i < headers.length; i++) { writeString(headers[i]); ...
Starts new MIME part. Use write() method to write content of the part.
public CStartTraceAction(final JFrame parent,final IFrontEndDebuggerProvider debugger,final ZyGraph graph){ m_parent=Preconditions.checkNotNull(parent,"IE00303: Parent argument can not be null"); m_debugger=Preconditions.checkNotNull(debugger,"IE01538: Debugger argument can not be null"); m_graph=Preconditions.ch...
Creates a new start trace action.
private void updateProgress(int progress){ if (myHost != null && progress != previousProgress) { myHost.updateProgress(progress); } previousProgress=progress; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
public static List<UserGroup> toUserGroups(List<POUserGroup> poUserGroups) throws ValidationException { BLValidator.isNotNull("poUserGroups",poUserGroups); List<UserGroup> userGroups=new ArrayList<UserGroup>(); for ( POUserGroup poUserGroup : poUserGroups) { userGroups.add(toUserGroup(poUserGroup)); } re...
Create UserGroup objects and fills the fields with the corresponding data from the POs.
private boolean isUnconfirmed(){ int no=DB.getSQLValue(null,"SELECT COUNT(*) FROM M_InOutLineConfirm WHERE AD_Client_ID=?",Env.getAD_Client_ID(Env.getCtx())); if (no > 0) return true; no=DB.getSQLValue(null,"SELECT COUNT(*) FROM M_MovementLineConfirm WHERE AD_Client_ID=?",Env.getAD_Client_ID(Env.getCtx())); r...
System has Unconfirmed records
public boolean evaluate(EventBean theEvent){ return evaluatePerStream(new EventBean[]{theEvent}); }
Evaluate the boolean expression given the event as a stream zero event.
public static String toNTriplesString(Resource resource){ if (resource instanceof IRI) { return toNTriplesString((IRI)resource); } else if (resource instanceof BNode) { return toNTriplesString((BNode)resource); } else { throw new IllegalArgumentException("Unknown resource type: " + resource.getCla...
Creates an N-Triples string for the supplied resource.
public void customizePresentation(@NotNull ColoredTextContainer component){ XSourcePosition position=getSourcePosition(); if (position != null) { component.append(position.getFile().getName(),SimpleTextAttributes.REGULAR_ATTRIBUTES); component.append(":" + (position.getLine() + 1),SimpleTextAttributes.REGUL...
Customize presentation of the stack frame in frames list
@Override public final void attrSplit(int attr,Instances inst) throws Exception { int i, len, part; Impurity imp; int low=0; int high=inst.numInstances() - 1; this.initialize(low,high,attr); if (number < 4) { return; } len=((high - low + 1) < 5) ? 1 : (high - low + 1) / 5; position=low; part=low...
Finds the best splitting point for an attribute in the instances
public Object jjtAccept(ParserVisitor visitor,Object data){ return visitor.visit(this,data); }
Accept the visitor.
protected void onPause(){ super.onPause(); try { if (client != null) { client.stop(); Log.i("Jetty","Stopped httpclient"); } } catch ( Exception e) { Log.e("Jetty","Error stopping httpclient ",e); } finally { client=null; if (fileInProgress != null) { _progressBar.setVis...
User has moved away from the download activity. Stop the httpclient.
public T next(){ return array.cursorNext(cursorId); }
Fetches the next object.
protected Sample sample(){ Sample sample=new Sample(); if (isTerminated) { return sample; } try { for ( BNode n : sortedNodes) { String id=n.getId(); if (n.getInputNodeIds().isEmpty() && evidence.containsVar(id)) { sample.addPair(id,evidence.getValue(id)); } else if (...
Runs the sample collection procedure until termination (either due to a time-out or the collection of a number of samples = nbSamples). The method loops until terminate() is called, or enough samples have been collected.
public final boolean greaterEquals(ProtocolVersion version){ return isComparable(version) && (compareToVersion(version) >= 0); }
Tests if this protocol version is greater or equal to the given one.
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 15:01:20.008 -0400",hash_original_method="BFDD71499687D637F57FF5151EA7665D",hash_generated_method="15D875AD3B87D08D9F9ACE2C248B6583") public boolean offer(E e,long timeout,TimeUnit unit){ return offer(e); }
Inserts the specified element into this delay queue. As the queue is unbounded this method will never block.
public static void localizeParameterDefOption(DataService dm,long objKey) throws NonUniqueBusinessKeyException { create(dm,objKey,LocalizedObjectTypes.OPTION_PARAMETER_DEF_DESC); }
Creates a auto-generated localization for the given domain object key.
public MultipartBuilder inline(InputStream is,String cidName){ return bodyPart(new StreamDataBodyPart("inline",is,cidName)); }
Adds a named inline attachment.
public boolean hasNativeTheme(){ return impl.hasNativeTheme(); }
Indicates if the implemenetation has a native underlying theme
@Override public boolean isIdentity(){ return isMatrixIdentity(mActiveTransform,1e-3f); }
Returns true if the zoomable transform is identity matrix.
public static boolean isODKTablesInstanceDataDirectory(File directory){ String dirPath=directory.getAbsolutePath(); if (dirPath.startsWith(Collect.ODK_ROOT)) { dirPath=dirPath.substring(Collect.ODK_ROOT.length()); String[] parts=dirPath.split(File.separator); if (parts.length == 4 && parts[1].equals("in...
Predicate that tests whether a directory path might refer to an ODK Tables instance data directory (e.g., for media attachments).
protected TraceCase_Impl(){ super(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
@Override public Object clone() throws CloneNotSupportedException { DefaultMultiValueCategoryDataset clone=(DefaultMultiValueCategoryDataset)super.clone(); clone.data=(KeyedObjects2D)this.data.clone(); return clone; }
Returns a clone of this instance.
private StringBuilder DFS(StringBuilder sb,TreeNode node,int depth){ for (int i=0; i < 2 * depth; i++) { sb.append(' '); } sb.append(node).append('\n'); Enumeration<TreeNode> childEnum=node.getChildren(); while (childEnum.hasMoreElements()) { TreeNode child=childEnum.nextElement(); DFS(sb,child,de...
A preorder depth first traversal, printing node as visited
@Override public Iterator<ReferenceContainer<WordReference>> iterator(){ return this.containers.iterator(); }
get all containers from the entry. This method may be used to flush remaining entries if they had been finished transmission without success (not enough peers arrived)
private static Region split(Region t){ if (t.right.right.level == t.level) { t=rotateWithRightChild(t); t.level++; } return t; }
Split primitive for AA-trees.
public void addEntry(int severity,String msg,RefactoringStatusContext context,String pluginId,int code){ fEntries.add(new RefactoringStatusEntry(severity,msg,context,pluginId,code)); fSeverity=Math.max(fSeverity,severity); }
Adds a new entry filled with the given arguments to this status. The severity of this status is set to the maximum of <code>fSeverity</code> and <code>severity</code>.
private static <K,V>void putNew(Map<K,V> m,K key,V value){ if (key == null) { ErrorReporter.errorAbort("StubParser: key is null!"); return; } if (m.containsKey(key) && !m.get(key).equals(value)) { ErrorReporter.errorAbort("StubParser: key is already in map: " + LINE_SEPARATOR + " "+ key+ " => "+ m.ge...
Just like Map.put, but errs if the key is already in the map.
public void testPollFirst(){ LinkedBlockingDeque q=populatedDeque(SIZE); for (int i=0; i < SIZE; ++i) { assertEquals(i,q.pollFirst()); } assertNull(q.pollFirst()); }
pollFirst succeeds unless empty
public void addComponent(MultiblockComponent component){ if (getComponentForLocation(component.getRelativePosition()) != null) throw new IllegalArgumentException("Location in multiblock already occupied"); components.add(component); changeAxisForNewComponent(component.getRelativePosition()); calculateCostForN...
Adds a multiblock component to this multiblock. The component's x y z coords should be pivoted to the center of the structure.
public GenericAttrNS(String nsURI,String qname,AbstractDocument owner) throws DOMException { super(nsURI,qname,owner); setNodeName(qname); }
Creates a new Attr object.
private void sendTaskSchedulerServicePatch(){ TaskSchedulerService.State s=new TaskSchedulerService.State(); TaskSchedulerServiceHelper.sendPatchToOwner(this,getHost(),HousekeeperServiceGroup.getTaskSchedulerImageHostToHostServiceUri(),s,UriUtils.buildUri(getHost(),getSelfLink())); }
Sends post request to trigger TaskSchedulerService.
public static StringBuilder appendMap(StringBuilder buff,HashMap<String,?> map){ ArrayList<String> list=New.arrayList(map.keySet()); Collections.sort(list); for ( String k : list) { appendMap(buff,k,map.get(k)); } return buff; }
Append a map to the string builder, sorted by key.
private static void createEntriesK1andK2(){ try { Region r1=cache.getRegion(Region.SEPARATOR + REGION_NAME); assertNotNull(r1); if (!r1.containsKey("key1")) { r1.create("key1","key-1"); } if (!r1.containsKey("key2")) { r1.create("key2","key-2"); } assertEquals(r1.getEntry("key1...
Creates entries on the server
@Override public void transactionCommited(final long commitTime){ if (listeners.isEmpty()) { records.reset(); } else { records.flush(); listeners.forEach(null); } }
Notification of transaction committed.
public void addEventListener(WalletEventListener listener){ addChangeEventListener(Threading.USER_THREAD,listener); addCoinsReceivedEventListener(Threading.USER_THREAD,listener); addCoinsSentEventListener(Threading.USER_THREAD,listener); addKeyChainEventListener(Threading.USER_THREAD,listener); addReorganizeE...
Adds an event listener object. Methods on this object are called when something interesting happens, like receiving money. Runs the listener methods in the user thread.
@Override public int eBaseStructuralFeatureID(int derivedFeatureID,Class<?> baseClass){ if (baseClass == TypableElement.class) { switch (derivedFeatureID) { default : return -1; } } if (baseClass == IdentifiableElement.class) { switch (derivedFeatureID) { case N4JSPackage.VARIABLE__NAME: return TypesPacka...
<!-- begin-user-doc --> <!-- end-user-doc -->
public boolean isRoot(File dir){ return roots.contains(dir); }
Returns true if <code>dir</code> is on of the currenlty included roots.
public static <S extends HasMouseDownHandlers & HasHandlers>void fire(S source,JavaScriptObject jsObj){ if (TYPE != null) { MouseDownEvent event=new MouseDownEvent(jsObj); source.fireEvent(event); } }
Fires a open event on all registered handlers in the handler manager.If no such handlers exist, this method will do nothing.
public void info(String msg,Object arg0,Object arg1,Object arg2){ innerLog(Level.INFO,null,msg,arg0,arg1,arg2,null); }
Log a info message.
public static CommandResult execCommand(String[] commands,boolean isRoot,boolean isNeedResultMsg){ int result=-1; if (commands == null || commands.length == 0) { return new CommandResult(result,null,null); } Process process=null; BufferedReader successResult=null; BufferedReader errorResult=null; Stri...
execute shell commands
protected CCBitmapFontConfiguration(String FNTfile){ super(); kerningDictionary=new IntMap<tKerningHashElement>(); parseConfigFile(FNTfile); }
initializes a BitmapFontConfiguration with a FNT file
public BufferedImage createCompatibleDestImage(BufferedImage src,ColorModel destCM){ BufferedImage dest=null; if (destCM == null) destCM=src.getColorModel(); dest=new BufferedImage(destCM,destCM.createCompatibleWritableRaster(src.getWidth(),src.getHeight()),destCM.isAlphaPremultiplied(),null); return dest; }
Creates a destination image compatible with the source.
public void newVariable(Element var,JComponent col,GridBagLayout g,GridBagConstraints cs,boolean showStdName){ String name=var.getAttribute("item").getValue(); int i=_varModel.findVarIndex(name); if (i < 0) { log.trace("Variable \"{}\" not found, omitted",name); return; } Attribute attr; String layo...
Add the representation of a single variable. The variable is defined by a JDOM variable Element from the XML file.
public SelectionButtonDialogField(int buttonStyle){ super(); fIsSelected=false; fAttachedDialogFields=null; fButtonStyle=buttonStyle; }
Creates a selection button. Allowed button styles: SWT.RADIO, SWT.CHECK, SWT.TOGGLE, SWT.PUSH
public boolean isDirectory(){ if (file != null) { return file.isDirectory(); } if (linkFlag == LF_DIR) { return true; } if (getName().endsWith("/")) { return true; } return false; }
Return whether or not this entry represents a directory.
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); doReadObject(in); }
Read the map in using a custom routine.
private E xfer(E e,boolean haveData,int how,long nanos){ if (haveData && (e == null)) throw new NullPointerException(); Node s=null; retry: for (; ; ) { for (Node h=head, p=h; p != null; ) { boolean isData=p.isData; Object item=p.item; if (item != p && (item != null) == isData) { ...
Implements all queuing methods. See above for explanation.
public void testSynonymsPhrase() throws Exception { MultiPhraseQuery.Builder expectedQBuilder=new MultiPhraseQuery.Builder(); expectedQBuilder.add(new Term(FIELD,"old")); expectedQBuilder.add(new Term[]{new Term(FIELD,"dogs"),new Term(FIELD,"dog")}); QueryParser qp=new QueryParser(FIELD,new MockSynonymAnalyzer(...
forms multiphrase query
public static String byteArray2String(final byte[] array,final String prefix,final String delimiter,final boolean brackets,final int radix){ if (array == null) { return null; } final int maxlen=Integer.toString(0xFF,radix).length(); final String zero="00000000"; final String normDelim=delimiter == null ? ...
Convert a byte array into string representation
public SMIDAS(double eta,int epochs,double lambda,Loss loss,boolean reScale){ setEta(eta); setEpochs(epochs); setLambda(lambda); setLoss(loss); setReScale(reScale); }
Creates a new SMIDAS learner
public boolean isCumulative(){ return cumulative; }
Get cumulative flag.
protected String render(SQLSkin skin) throws RenderingException { return this.insert.render(skin); }
internal method we use when rendering a subselect
public SpanFirstQueryBuilder queryName(String queryName){ this.queryName=queryName; return this; }
Sets the query name for the filter that can be used when searching for matched_filters per hit.
public GitlabLabel createLabel(Serializable projectId,String name,String color) throws IOException { String tailUrl=GitlabProject.URL + "/" + projectId+ GitlabLabel.URL; return dispatch().with("name",name).with("color",color).to(tailUrl,GitlabLabel.class); }
Creates a new label.
private boolean isCollapsed(){ return mTabSpinner != null && mTabSpinner.getParent() == this; }
Indicates whether this view is collapsed into a dropdown menu instead of traditional tabs.
public DefaultMutableTreeNode(){ this(null); }
Creates a tree node that has no parent and no children, but which allows children.
public static double var(int[] a){ if (a.length == 0) return Double.NaN; double avg=mean(a); double sum=0.0; for (int i=0; i < a.length; i++) { sum+=(a[i] - avg) * (a[i] - avg); } return sum / (a.length - 1); }
Returns the sample variance in the specified array.
@HLEFunction(nid=0xC58BCD9E,version=150) public int sceNetAdhocMatchingGetMembers(@CheckArgument("checkMatchingId") int matchingId,TPointer32 sizeAddr,@CanBeNull TPointer buf){ final int matchingMemberSize=12; MatchingObject matchingObject=matchingObjects.get(matchingId); List<pspNetMacAddress> members=matchingOb...
Get a list of matching members
public synchronized int read(byte[] buf,int start,int count) throws InterruptedException { while (mSize == 0 && !mClosed) { wait(TIMEOUT); } if (mSize == 0 && mClosed) { return -1; } else { final boolean wasFull=mSize == mBuf.length; final int spaceUntilEnd=mBuf.length - mStart; final int c...
Copy some bytes out of the queue into <code>buf[start .. start+count-1]</code>. This may return less bytes that you asked for, but will never return 0 (unless you ask for 0 bytes!). It returns -1 on end of file or if close has been called.
public SparseIntArray(int initialCapacity){ mKeys=new int[initialCapacity]; mValues=new int[initialCapacity]; mSize=0; }
Creates a new SparseIntArray containing no mappings that will not require any additional memory allocation to store the specified number of mappings.
public void startDocument() throws org.xml.sax.SAXException { }
Receive notification of the beginning of a document. <p> The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator). </p>
public String toRFC1779String(){ return toRFC1779String(Collections.<String,String>emptyMap()); }
Returns a printable form of this attribute, using RFC 1779 syntax for individual attribute/value assertions. It only emits standardised keywords.
@CheckForNull public static Dotcake fromJson(FileObject dotcakeFile){ if (!isDotcake(dotcakeFile)) { return null; } try (InputStream inputStream=new BufferedInputStream(dotcakeFile.getInputStream())){ try (InputStreamReader reader=new InputStreamReader(inputStream,CakePHP3Constants.UTF8)){ Dotcake d...
Create an instance from json file.
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:14.184 -0500",hash_original_method="0B6FE6D01B20019581445CB40F5DED3F",hash_generated_method="EBBEEB29C41D0AA39444F5EA24292722") @Override protected Object clone(){ try { return super.clone(); } catc...
Returns the clone of this object.
public void clearBackground(){ mBackgroundManager.setThemeDrawableResourceId(mDefaultBackground); }
Clears the background immediately
public void discoverable(BluetoothAdapter adapter){ int mask=BluetoothReceiver.SCAN_MODE_CONNECTABLE_DISCOVERABLE_FLAG; if (!adapter.isEnabled()) { fail("discoverable() bluetooth not enabled"); } int scanMode=adapter.getScanMode(); if (scanMode == BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) { ...
Puts the local device into discoverable mode and checks to make sure that the local device is in discoverable mode and that the correct actions were broadcast.
public static void sort(int[] data,int start,int end,Comparator<? super DBIDRef> comp){ quickSort(data,start,end - 1,comp,new IntegerDBIDVar(),new IntegerDBIDVar(),new IntegerDBIDVar()); }
Sort the array using the given comparator.
private void createItemsLayout(){ if (itemsLayout == null) { itemsLayout=new LinearLayout(getContext()); itemsLayout.setOrientation(LinearLayout.VERTICAL); } }
Creates item layouts if necessary
public static <T>FutureW<T> fromPublisher(final Publisher<T> pub,final Executor ex){ final ValueSubscriber<T> sub=ValueSubscriber.subscriber(); pub.subscribe(sub); return sub.toFutureWAsync(ex); }
Construct a FutureW asyncrhonously that contains a single value extracted from the supplied reactive-streams Publisher
public static HttpServletResponse buildMockResponseObjectForResponse(final StringWriter sw) throws IOException { HttpServletResponse response=createMock(HttpServletResponse.class); response.setContentType("text/html"); expect(response.getWriter()).andReturn(new PrintWriter(sw)).anyTimes(); replay(response); r...
Return a mocked HttpServletResponse for successfully validating SSO or SLO response received. No message is expected to send out via this response.
public void testConnectExponentialBackoffStrategy() throws Throwable { ConnectionStrategy strategy=ConnectionStrategies.EXPONENTIAL_BACKOFF; ConnectionStrategy.Attempt attempt; attempt=mock(ConnectionStrategy.Attempt.class); when(attempt.attempt()).thenReturn(1); strategy.attemptFailed(attempt); verify(atte...
Tests the exponential backoff strategy.
public Message(ZulipApp app,JSONObject message,Map<String,Person> personCache,Map<String,Stream> streamCache) throws JSONException { this.setID(message.getInt("id")); this.setSender(Person.getOrUpdate(app,message.getString("sender_email"),message.getString("sender_full_name"),message.getString("avatar_url"),personC...
Populate a Message object based off a parsed JSON hash.
public GPUImage3x3ConvolutionFilter(){ this(new float[]{0.0f,0.0f,0.0f,0.0f,1.0f,0.0f,0.0f,0.0f,0.0f}); }
Instantiates a new GPUimage3x3ConvolutionFilter with default values, that will look like the original image.
@Override public boolean eIsSet(int featureID){ switch (featureID) { case UmplePackage.TRACE_OPTIONS___TRACE_OPTION_1: return traceOption_1 != null && !traceOption_1.isEmpty(); case UmplePackage.TRACE_OPTIONS___ANONYMOUS_TRACE_OPTIONS_11: return anonymous_traceOptions_1_1 != null && !anonymous_traceOptions_1_1.is...
<!-- begin-user-doc --> <!-- end-user-doc -->
public void end() throws ProcessorError { }
Called before building java file.
@Override public void initMutator(int id){ super.initMutator(id); mature.rebind(GenCopy.toSpace()); }
Called before the MutatorContext is used, but after the context has been fully registered and is visible to collection.
public String reverseVowels(String s){ if (s == null || s.isEmpty()) return s; StringBuilder sb=new StringBuilder(s); String vowels="aeiouAEIOU"; int i=0; int j=s.length() - 1; while (i < j) { while (i < j && vowels.indexOf(s.charAt(i)) == -1) { i++; } while (i < j && vowels.indexOf(s.ch...
Use two pointers, search for vowels from both ends
private static ValueLob createClob(Reader in,long length,DataHandler handler){ try { if (handler == null) { String s=IOUtils.readStringAndClose(in,(int)length); return createSmallLob(Value.CLOB,s.getBytes(Constants.UTF8)); } boolean compress=handler.getLobCompressionAlgorithm(Value.CLOB) != nu...
Create a CLOB value from a stream.
public DropboxVirtualVolume(String rootDirectory,DropboxConnector mDBCon) throws FileNotFoundException { super(new DropboxVirtualFile(rootDirectory,(DropboxVirtualVolume)null)); this.mDBCon=mDBCon; }
need unique DropboxConnector Instance DropboxVirtualFile works with it
public static String compXmlString(byte[] xml,int sitOff,int stOff,int strInd){ if (strInd < 0) return null; int strOff=stOff + LEW(xml,sitOff + strInd * 4); return compXmlStringAt(xml,strOff); }
Tool Method for decompressXML(); Compute binary XML to its string format Source: Source: http://stackoverflow.com/questions/2097813/how-to-parse-the-androidmanifest-xml-file-inside-an-apk-package/4761689#4761689
private Region findReplace(final FindReplaceOperationCode operationCode,int startOffset,String findString,String replaceText,boolean forwardSearch,boolean caseSensitive,boolean wholeWord) throws BadLocationException { if ((operationCode == REPLACE || operationCode == REPLACE_FIND_NEXT) && (fFindReplaceState != FIND_F...
Stateful findReplace executes a FIND, REPLACE, REPLACE_FIND or FIND_FIRST operation. In case of REPLACE and REPLACE_FIND it sends a <code>DocumentEvent</code> to all registered <code>IDocumentListener</code>.
public static void addScreenToHistory(String screeName){ if (BuildConfig.FABRIC_CONFIGURED) { addScreen(screeName); Crashlytics.setString(SCREEN_HISTORY,history.toString()); } }
this method adds a screen name to the history to be reported to crashlytics
@Deprecated public SimpleOrderedMap(List<Object> nameValuePairs){ super(nameValuePairs); }
Creates an instance backed by an explicitly specified list of pairwise names/values.
public static String readHostileExceptionMessage(Throwable e){ String errorMsg=e.getClass().getName(); if (e.getMessage() != null) { errorMsg+=": " + e.getMessage(); } Throwable cause=e.getCause(); int safetyCounter=0; while (cause != null && safetyCounter < 10) { safetyCounter++; errorMsg+=", c...
Converts an exception to a string message. Handles cases where the message in the exception is null and/or there are multiple nested cause exceptions.