code
stringlengths
10
174k
nl
stringlengths
3
129k
public void clear(){ mRecords.clear(); mCallbacks.onDatasetChanged(mBluetoothDevice); }
Clears the records list locally
protected void init(){ checkLegal(); calcMinMax(mLastStart,mLastEnd); calcYValueSum(); calcYValueCount(); calcXValAverageLength(); }
performs all kinds of initialization calculations, such as min-max and value count and sum
public static Method findStaticMethod(Class<?> type,String name,Class<?>... args) throws NoSuchMethodException { Method method=findMethod(type,name,args); if (!Modifier.isStatic(method.getModifiers())) { throw new NoSuchMethodException("Method '" + name + "' is not static"); } return method; }
Finds public static method that is accessible from public class.
public boolean replaceValues(float value,float newValue){ boolean changed=false; if (Float.isNaN(value)) { for (int i=0; i < count; i++) { if (Float.isNaN(data[i])) { data[i]=newValue; changed=true; } } } else { for (int i=0; i < count; i++) { if (data[i] == value) {...
Replace all instances of a particular value
public int[] matchRowIndices(String regexp,int column){ int[] outgoing=new int[rowCount]; int count=0; checkColumn(column); if (columnTypes[column] == STRING) { String[] stringData=(String[])columns[column]; for (int row=0; row < rowCount; row++) { if (stringData[row] != null && PApplet.match(stri...
Return a list of rows that contain the String passed in. If there are no matches, a zero length array will be returned (not a null array).
public Item(Intent intent){ mText=null; mHtmlText=null; mIntent=intent; mUri=null; }
Create an Item consisting of an arbitrary Intent.
public S2Loop(final List<S2Point> vertices){ this.numVertices=vertices.size(); this.vertices=new S2Point[numVertices]; this.bound=S2LatLngRect.full(); this.depth=0; vertices.toArray(this.vertices); initOrigin(); initBound(); initFirstLogicalVertex(); }
Initialize a loop connecting the given vertices. The last vertex is implicitly connected to the first. All points should be unit length. Loops must have at least 3 vertices.
@Override public boolean canWrite(){ return getDelegate().canWrite(); }
Returns true if this is a writable stream.
public boolean isStateActive(State state){ switch (state) { case main_region_A: return stateVector[0] == State.main_region_A; default : return false; } }
Returns true if the given state is currently active otherwise false.
protected void checkCompatibleScriptURL(String scriptType,ParsedURL scriptPURL){ userAgent.checkLoadScript(scriptType,scriptPURL,docPURL); }
Checks that the script URLs and the document url are compatible. A SecurityException is thrown if loading the script is not allowed.
@Override public BigInteger[] batchInsert(List<Map<String,Object>> datas,String tabNameSuffix){ if (logger.isDebugEnabled()) { logger.debug("batchInsert(List<Map<String,Object>>, String) - start"); } validate(datas); Map<String,Object> cols=this.merge(datas); BigInteger[] returnBigIntegerArray=batchInsert...
Logger for this class
private int measureShort(int measureSpec){ int result; int specMode=MeasureSpec.getMode(measureSpec); int specSize=MeasureSpec.getSize(measureSpec); if (specMode == MeasureSpec.EXACTLY) { result=specSize; } else { result=(int)(2 * mRadius + getPaddingTop() + getPaddingBottom() + 1); if (specMode ...
Determines the height of this view
public char nextNonWS(){ skipWS(); return next(); }
Skips whitespaces and returns next non-whitespace.
private void handleError(EnumerationContext ctx,Throwable e){ logSevere(e); ctx.error=e; ctx.stage=EnumerationStages.ERROR; handleEnumerationRequest(ctx); }
Error handler if there are exceptions during the enumeration.
public synchronized void start(){ if (!running) { running=true; new Thread(this).start(); } }
This is the normal way to start the MasterClock asynchronously. Does nothing if the clock is not already running.
protected void initiateWorking(){ if (_activeTrain.getStatus() != ActiveTrain.WORKING) { if (_autoEngineer != null) { _autoEngineer.setHalt(true); waitUntilStopped(); _autoEngineer.abort(); InstanceManager.throttleManagerInstance().releaseThrottle(_throttle,this); _autoEngineer=null;...
Initiates running in manual mode with external throttle This method is triggered by an action in the Transit The throttle in use for automatic operation is dispatched
private boolean validateOldProduct(MProduct product){ if (!product.isBOM()) return true; if (m_products.contains(product)) { log.warning(m_product.getName() + " recursively includes " + product.getName()); return false; } m_products.add(product); log.fine(product.getName()); MProductBOM[] products...
Validate Old BOM Product structure
public String maxDefaultTipText(){ return "The default value to replace values that are above the maximum threshold."; }
Returns the tip text for this property
protected double calculateCategorySize(int categoryCount,Rectangle2D area,RectangleEdge edge){ double result; double available=0.0; if ((edge == RectangleEdge.TOP) || (edge == RectangleEdge.BOTTOM)) { available=area.getWidth(); } else if ((edge == RectangleEdge.LEFT) || (edge == RectangleEdge.RIGHT)) { ...
Calculates the size (width or height, depending on the location of the axis) of a category.
private static void startNewSearch(final Window parent,final ComboBoxEditor editor,final ZyGraph graph,final GraphSearcher searcher,final String searchString,final boolean zoomToResult){ try { searcher.search(GraphHelpers.getNodes(graph),GraphHelpers.getEdges(graph),searchString); if (searcher.getResults().is...
Cycles through an existing search operation.
public static URLClassLoader createJarAndLoad(JarEntry... entries) throws IOException { Validate.notNull(entries); Validate.noNullElements(entries); File jarFile=createJar(entries); return URLClassLoader.newInstance(new URL[]{jarFile.toURI().toURL()},TestUtils.class.getClassLoader()); }
Writes entries to a JAR and loads it up.
private void diff(DevMachine devMachine,DiffRequest diffRequest,@NotNull String projectPath,AsyncRequestCallback<String> callback){ String url=appContext.getDevMachine().getWsAgentBaseUrl() + DIFF + "?projectPath="+ projectPath; asyncRequestFactory.createPostRequest(url,diffRequest).loader(loader).send(callback); }...
Make diff request.
@Inline @Override public final Word wordRead(ObjectReference ref,Word offset,Word location,int mode){ return Magic.getWordAtOffset(ref.toObject(),offset.toOffset(),location.toInt()); }
Perform the actual read of the read barrier, returning the value as a raw Word.
public AsyncHttpClient(int httpPort,int httpsPort){ this(false,httpPort,httpsPort); }
Creates a new AsyncHttpClient.
public void testSetF13(){ boolean f13=false; AbstractThrottle instance=new AbstractThrottleImpl(); instance.setF13(f13); jmri.util.JUnitAppender.assertErrorMessage("Can't send F13-F20 since no command station defined"); }
Test of setF13 method, of class AbstractThrottle.
@Override public boolean equals(Object o){ return this == o; }
Equals is based on a reference test.
@DSSafe(DSCat.DATA_STRUCTURE) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:26.806 -0500",hash_original_method="66B88A01F8296942609EF87ACA0E012C",hash_generated_method="EF54B80F0E76445F1731B727231203AB") public Collection<V> values(){ if (values == null) { values=new Valu...
Returns a collection view of the values
public final boolean isStatic(){ return Modifier.isStatic(getModifiers()); }
Returns true if the element is static.
@Override public void onAdd(Collection<? extends IDataType> dataTypes) throws AtlasException { AtlasGraphManagement management=provider.get().getManagementSystem(); for ( IDataType dataType : dataTypes) { LOG.debug("Creating indexes for type name={}, definition={}",dataType.getName(),dataType.getClass()); ...
This is upon adding a new type to Store.
public UserRoleAssignmentException(String message,Object[] params){ super(message,params); }
Constructs a new exception with the specified detail message and message parameters.
public static boolean isNetworkAvailable(Context context){ boolean available=false; if (context.checkCallingOrSelfPermission(Manifest.permission.INTERNET) == PackageManager.PERMISSION_GRANTED) { ConnectivityManager connMgr=(ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkI...
Function for check the network connectivity
@Override public void run() throws IOException { Result result=compiler.compile(arguments.toArray(new String[arguments.size()])); handleExitCode(result.exitCode,compiler.exitState); }
Run the compilation
public void add(final int series,final Number xValue,final BoxAndWhiskerItem item){ List<Tuple<Number,BoxAndWhiskerItem>> seriesItems=getItems(series); seriesItems.add(new Tuple<Number,BoxAndWhiskerItem>(xValue,item)); }
adds a box to the specified x value
protected void removeFromPortMap(IOFSwitch sw,long mac,short vlan){ if (vlan == (short)0xffff) { vlan=0; } Map<MacVlanPair,Short> swMap=macVlanToSwitchPortMap.get(sw); if (swMap != null) swMap.remove(new MacVlanPair(mac,vlan)); }
Removes a host from the MAC/VLAN->SwitchPort mapping
@Override public void run(){ amIActive=true; if (args.length <= 0) { showFeedback("Plugin parameters have not been set."); return; } String fiducialHeader=args[0]; String outputHeader=args[1]; if (fiducialHeader.isEmpty() || outputHeader.isEmpty()) { showFeedback("One or more of the input parame...
Used to execute this plugin tool.
public String resultToString(int res){ String resultString=""; switch (res) { case POSSIBLE: resultString="Certificate to be tried.\n"; break; case BACK: resultString="Certificate backed out since path does not " + "satisfy build requirements.\n"; break; case FOLLOW: resultString="Certificate satisfies conditio...
return a string representing the meaning of the result code associated with this build step.
public void update(final long item){ if (itemsSeen_ == MAX_ITEMS_SEEN) { throw new SketchesStateException("Sketch has exceeded capacity for total items seen: " + MAX_ITEMS_SEEN); } if (itemsSeen_ < reservoirSize_) { if (itemsSeen_ >= currItemsAlloc_) { growReservoir(); } assert itemsSeen_ < ...
Randomly decide whether or not to include an item in the sample set.
public Type attribType(JCTree tree,Env<AttrContext> env){ Type result=attribType(tree,env,Type.noType); return result; }
Derived visitor method: attribute a type tree.
public static boolean isMinus(BOp node){ return node instanceof IJoinNode && ((IJoinNode)node).isMinus(); }
Checks whether a given node is a MINUS node.
protected void processCloudletResume(int cloudletId,int userId,int vmId,boolean ack){ double eventTime=getVmAllocationPolicy().getHost(vmId,userId).getVm(vmId,userId).getCloudletScheduler().cloudletResume(cloudletId); boolean status=false; if (eventTime > 0.0) { status=true; if (eventTime > CloudSim.clock...
Processes a Cloudlet resume request.
public DistinguishedNameException(String message){ super(message); }
Constructs a new exception with the specified detail message. The cause is not initialized.
public URLLabel(Action action){ setAction(action); }
Constructs a new clickable label whose text is in the hex color described.
@Override public void close(){ appiumDriver.quit(); }
AppiumDriver close
public void add(URI uri,Cookie cookie){ String origin=buildOrigin(uri); Set<Cookie> byOrigin=this.cookiesByOrigin.get(origin); if (byOrigin == null) { this.cookiesByOrigin.putIfAbsent(origin,new ConcurrentSkipListSet<>()); byOrigin=this.cookiesByOrigin.get(origin); } byOrigin.add(cookie); }
Adds cookie to the jar.
public CSVParser(char separator,char quotechar,char escape){ this(separator,quotechar,escape,DEFAULT_STRICT_QUOTES); }
Constructs CSVParser with supplied separator and quote char.
public boolean isRemove(){ boolean is; if (m_editFlag == FolderEditFlag.REMOVE) is=true; else is=false; return is; }
Devuelve <tt>true</tt> si el nodo ha sido eliminado
public static <T>Predicate<T> and(Predicate<? super T>... components){ return and(Arrays.asList(components)); }
Returns a Predicate that evaluates to true iff each of its components evaluates to true. The components are evaluated in order, and evaluation will be "short-circuited" as soon as the answer is determined.
public void addHeader(String line){ header.add(line); }
Add a header line to this result.
@Override protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException { processRequest(request,response); }
Handles the HTTP <code>GET</code> method.
private void updateSegmentContent(Segment segment,String content){ final int lengthBefore=xml.length; xml=insertBetween(xml,segment.left,segment.right,content); shiftSegments(segment.left,xml.length - lengthBefore); segment.right=segment.left + content.length() - 1; }
Inserts content bytes between left and right segment bounds and shifts segments on offset equal to difference between new and old source bytes length
private void changePlaylistCover(){ List<Integer> tracks=getTracks(); if (!tracks.isEmpty()) { Optional<Integer> trackWithCover=tracks.stream().filter(null).filter(null).findAny(); if (trackWithCover.isPresent()) { int trackId=trackWithCover.get(); musicLibrary.getTrack(trackId).ifPresent(null);...
Search in the contained tracks for one that has cover and sets it as the cove of the playlist. If there is no track or any of them has cover, the default cover is used.
protected void pushRight(BinarySearchTreeNode<E> node){ while (node != null) { this.stack.push(node); node=node.right; } }
Pushes the right most nodes of the given subtree onto the stack.
public static int calcBitSize(final boolean optDensity,final int alloc,final int minReserve,final int modAllocation){ final int intAllocation=32 * alloc; int nints=optDensity ? 8 : 1; while ((nints * intAllocation) < minReserve) nints++; while ((nints * intAllocation) % modAllocation != 0) nints++; return...
This determines the size of the reservation required in terms of the number of ints each holding bits for 32 slots. The minimum return value will be 1, for a single int holiding 32 bits. The maximum value will be the number of ints required to fill the minimum reservation. The minimum reservation will be some multiple ...
public void handleMeta(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException { if (target.equals(Constants.API_ENDPOINT_META)) { baseRequest.setHandled(true); } else { return; } response.setHeader("Access-Control-Allow-Origin","*...
Handle Metadata updating
protected final static void initHardCodedProperties(Properties p){ StringTokenizer tokenizer; tokenizer=new StringTokenizer(title,"="); tokenizer.nextToken(); p.put(Title,tokenizer.nextToken()); tokenizer=new StringTokenizer(version,"="); tokenizer.nextToken(); p.put(Version,tokenizer.nextToken()); toke...
Hardcoded default properties. <p> These should be edited before each new version/installation of OpenMap. They are declared in such a way that they can be easily edited from a build script.
public String toFormattedString(){ return "CUDA resource descriptor:\n " + createString("\n "); }
Creates and returns a formatted (aligned, multi-line) String representation of this object
protected void parseV() throws ParseException, IOException { current=reader.read(); skipSpaces(); boolean expectNumber=true; for (; ; ) { switch (current) { default : if (expectNumber) reportUnexpected(current); return; case '+': case '-': case '.': case '0': case '1': case '2': case '3': case '...
Parses a 'V' command.
public DefaultVcfWriter(VcfHeader header,File outputFile,OutputStream stdout,boolean compress,boolean createIndexIfPossible,boolean writeHeader) throws IOException { this(header,outputFile,stdout,compress,createIndexIfPossible); mHeaderWritten=!writeHeader; }
Creates a new VCF writer, using on-the-fly indexing, and can optionally skip writing the header
@Override public Boolean visitTypevar_Typevar(final AnnotatedTypeVariable type1,final AnnotatedTypeVariable type2,final VisitHistory visited){ if (visited.contains(type1,type2)) { return true; } visited.add(type1,type2); if (InternalUtils.isCaptured(type1.getUnderlyingType()) || InternalUtils.isCaptured(typ...
Two type variables are equal if: 1) Their bounds are equal Note: Primary annotations will be taken into account when the bounds are retrieved
public float filter(float sample){ insert(sample); float accumulator=0; accumulator+=mCoefficients[mCenterCoefficient] * mBuffer[mIndexMap[mBufferPointer][mCenterCoefficientMapIndex]]; for (int x=0; x < mCenterCoefficientMapIndex; x+=2) { accumulator+=mCoefficients[x] * (mBuffer[mIndexMap[mBufferPointer][x]...
Calculate the filtered value by applying the coefficients against the complex samples in mBuffer
public HostAddressService(boolean autoEnable) throws HostException { addMethod(DEFAULT,InetAddressPing.class.getName(),autoEnable); addMethod(PING,OsUtilityPing.class.getName(),autoEnable); addMethod(ECHO,EchoPing.class.getName(),autoEnable); }
Creates a new service.
WalkingIteratorSorted(Compiler compiler,int opPos,int analysis,boolean shouldLoadWalkers) throws javax.xml.transform.TransformerException { super(compiler,opPos,analysis,shouldLoadWalkers); }
Create a WalkingIterator iterator, including creation of step walkers from the opcode list, and call back into the Compiler to create predicate expressions.
protected SelectorList parseSelectorsInternal() throws CSSException, IOException { nextIgnoreSpaces(); SelectorList ret=parseSelectorList(); scanner=null; return ret; }
Parses selectors using the current scanner.
private void assertSerializeAndDesDateTime(String dateTimeString) throws RyaTypeResolverException { assertSerializeAndDesDateTime(dateTimeString,dateTimeString); }
Do the test on the DateTime
public void testConnectInput(){ int iterations=BluetoothTestRunner.sConnectInputIterations; if (iterations == 0) { return; } BluetoothAdapter adapter=BluetoothAdapter.getDefaultAdapter(); BluetoothDevice device=adapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress); mTestUtils.disable(adapter); m...
Stress test for connecting and disconnecting with a HID device. <p> In this test, the local device plays the role of a HID host, and initiates connections and disconnections with a HID device.
private boolean isFunctionCall(int from,int to){ if (!isIdentifier(tokenArray[from]) && !isToken("(",from + 1)) { return false; } return findClosingIndex(from + 1,to) > from + 1; }
Checks if tokens in specified range represents valid function call.
public SAXParser newSAXParser() throws ParserConfigurationException { SAXParserMMImpl saxParserImpl; try { saxParserImpl=new SAXParserMMImpl(this,features,fSecureProcess); } catch ( SAXException se) { throw new ParserConfigurationException(se.getMessage()); } return saxParserImpl; }
Creates a new instance of <code>SAXParser</code> using the currently configured factory parameters.
public final void add(FilterParamIndexBase index){ indizes.add(index); }
Add an index. The same index can be added twice - there is no checking done. NOTE: the client to this method must use the read-write lock of this object to lock, if required by the client code.
@Override public boolean equals(Object obj){ if (obj == this) { return true; } if (!(obj instanceof DefaultMultiValueCategoryDataset)) { return false; } DefaultMultiValueCategoryDataset that=(DefaultMultiValueCategoryDataset)obj; return this.data.equals(that.data); }
Tests this dataset for equality with an arbitrary object.
public CudaException(String message,Throwable cause){ super(message,cause); }
Creates a new CudaException with the given error message and the given Throwable as the cause.
private void newLineIfLastWasNotEmpty(int align){ if (!lastWasEmpty) { newLine(align); } }
Same as newLine, but only if the last line container was not empty
private void visitDirectInvocation(Tree.InvocationExpression that){ Tree.Term primary=unwrapExpressionUntilTerm(that.getPrimary()); if (primary == null) { return; } Tree.MemberOrTypeExpression mte=(Tree.MemberOrTypeExpression)primary; Reference prf=mte.getTarget(); Declaration dec=mte.getDeclaration(); ...
Typecheck a direct invocation.
public static void initBrowsing(){ if (browserStorage == null && tabSwitcher == null) { browserStorage=new BrowserStorage(getContext()); tabSwitcher=new TabSwitcherWrapper(new BlueListedTabSwitcher(getContext(),staticRootView).setTabStorage(new TabStorage())); BlueListedTabSwitcher.cast(getTabSwitcher())....
Initialize essential browsing components
public UniformSelection(){ super(); }
Constructs a uniform selection operator.
public void traverse(Node pos,Node top) throws org.xml.sax.SAXException { this.m_contentHandler.startDocument(); while (null != pos) { startNode(pos); Node nextNode=pos.getFirstChild(); while (null == nextNode) { endNode(pos); if ((null != top) && top.equals(pos)) break; nextNode...
Perform a pre-order traversal non-recursive style. Note that TreeWalker assumes that the subtree is intended to represent a complete (though not necessarily well-formed) document and, during a traversal, startDocument and endDocument will always be issued to the SAX listener.
public static <T,C extends Collection<T>>C requireNonNullElements(C collection){ requireNonNull(collection,"The provided collection is null."); collection.forEach(null); return collection; }
Checks if this set is non null and also that all members are non-null. If a null is detected a NullPointerException is thrown.
public static void recordOmniboxNavigation(String destinationUrl,int transitionType){ if ((transitionType & PageTransition.CORE_MASK) == PageTransition.GENERATED) { recordAction(ACTION_SEARCHED_USING_OMNIBOX); } else { if (UrlUtilities.nativeIsGoogleHomePageUrl(destinationUrl)) { recordAction(ACTION_...
Record that the user has navigated away from the NTP using the omnibox.
public ObjectRepository createRepository(Repository delegate) throws RepositoryConfigException, RepositoryException { return createRepository(getConfig(),delegate); }
Wrap a previously initialised repository in an ObjectRepository.
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 testSetNamedItemNS1() throws Throwable { Document doc; NodeList elementList; Node anotherElement; NamedNodeMap anotherMap; Node arg; Node testAddress; NamedNodeMap map; doc=(Document)load("staffNS",builder); elementList=doc.getElementsByTagName("address"); anotherElement=elementList.item...
Runs the test case.
public ConfigurationInfo(int argcount,String argname){ this.argcount=argcount; this.argnames=new String[]{argname}; }
Use this ctor when you want to set a single list of some number of identically named args
public XYStepAreaRenderer(){ this(AREA); }
Constructs a new renderer.
public boolean isClusterDefined(){ return notNullNorEmpty(getClusterSize()) && notNullNorEmpty(getMasterTemplateId()) && notNullNorEmpty(getSlaveTemplateId()); }
Returns whether all necessary settings for clustering (horizontal scaling) are defined.
public static void main(String[] args){ int num; int[] numbers=new int[10000]; for (int i=0; i < numbers.length; i++) { numbers[i]=getRandomInt(); } int key=getRandomInt(); int searchResult; long startTime=System.currentTimeMillis(); searchResult=linearSearch(numbers,key); long endTime=System.curr...
Main Method
public Import(String importUri,String absoluteUri,String contents,String sourceMap) throws URISyntaxException { URI tempImportUri; try { tempImportUri=new URI(importUri); } catch ( URISyntaxException e) { tempImportUri=new File(importUri).toURI(); } this.importUri=tempImportUri; URI tempAbsoluteUr...
Create a string import.
public static float deserializeFloat(byte[] buffer,MutableInt offset){ int offsetInt=offset.intValue(); int val=((((int)buffer[0 + offsetInt]) & 0xFF) << 24) | ((((int)buffer[1 + offsetInt]) & 0xFF) << 16) | ((((int)buffer[2 + offsetInt]) & 0xFF) << 8)| (((int)buffer[3 + offsetInt]) & 0xFF); offset.add(Type.FLOAT...
This method deserializes a float from the given byte array from the given offset, and increments the offset appropriately.
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:56:19.157 -0500",hash_original_method="CAF92C1590742750040007716FD6D4B6",hash_generated_method="B1071BF34EE08892A09AC1DB1A0B09B2") public static short reverseBytes(short s){ ...
Reverses the bytes of the specified short.
@Override public void run(){ amIActive=true; String inputHeader=null; String outputHeader=null; double slope; double z, z2; int c, i; int progress; int[] dY={-1,0,1,1,1,0,-1,-1}; int[] dX={1,1,1,0,-1,-1,-1,0}; int row, col, x, y; double dist; double minSlope=0; double minZChange=0; if (args....
Used to execute this plugin tool.
public String docType(Properties ctx,int WindowNo,GridTab mTab,GridField mField,Object value){ Integer C_DocType_ID=(Integer)value; if (C_DocType_ID == null || C_DocType_ID.intValue() == 0) return ""; String sql="SELECT d.IsSoTrx " + "FROM C_DocType d WHERE C_DocType_ID=?"; String docSOTrx=DB.getSQLValueStrin...
docType - set document properties based on document type.
public void push(final boolean value){ push(value ? 1 : 0); }
Generates the instruction to push the given value on the stack.
@Override public void run(){ amIActive=true; String inputHeader=null; String outputHeader=null; WhiteboxRaster image; WhiteboxRaster output; int cols, rows; int progress=0; int col, row; double value; if (args.length <= 0) { showFeedback("Plugin parameters have not been set."); return; } ...
Used to execute this plugin tool.
public void addHandler(String path,ElementHandler handler){ getDispatchHandler().addHandler(path,handler); }
Adds the <code>ElementHandler</code> to be called when the specified path is encounted.
public void actionPerformed(ActionEvent e){ JTextComponent target=getTextComponent(e); boolean beep=true; if ((target != null) && (target.isEditable())) { try { Document doc=target.getDocument(); Caret caret=target.getCaret(); int dot=caret.getDot(); int mark=caret.getMark(); if ...
The operation to perform when this action is triggered.
public Poly1305(){ this.cipher=null; }
Constructs a Poly1305 MAC, where the key passed to init() will be used directly.
public static double sigmoid(double input,double cutoff,double rate){ return 1.0 / (1 + Math.pow(Math.E,-rate * (input - cutoff))); }
Pass an input trust score through a sigmoid between 0 and 1, and return the result.
public synchronized void update(final byte[] primarykey,final Map<String,String> row){ for ( Map.Entry<String,Map<String,Collection<byte[]>>> entry : this.index.entrySet()) { String value=row.get(entry.getKey()); if (value == null) continue; indexupdate(primarykey,entry.getValue(),value); } }
update an index entry
public static int verifyPubKeyProto(ConiksUser user,AuthPath authPath){ String keyData=user.getKeyData(); AuthPath.UserLeafNode apUln=authPath.getLeaf(); String pk=apUln.getPublickey(); if (pk.equals(keyData)) { return ConsistencyErr.CHECK_PASSED; } else { return ConsistencyErr.UNEXPECTED_KEY_ERR; ...
Tries to retrieve the public key for the given user from disk and checks if the retrieved key is consistent with the public key received in the auth path.
private void editSubscriptions(){ String packageName=getPackageName(); Intent i=new Intent(Intent.ACTION_VIEW,Uri.parse("market://details?id=" + packageName)); startActivity(i); }
List subscriptions for this package in Google Play This allows users to unsubscribe from this apps subscriptions. Subscriptions are listed on the Google Play app detail page, so this should only be called if subscriptions are known to be present.
public static void main(final String[] args){ DOMTestCase.doMain(importNode03.class,args); }
Runs this test from the command line.
private void appendMultiPolygonTaggedText(MultiPolygon multiPolygon,int level,Writer writer) throws IOException { writer.write("MULTIPOLYGON "); appendMultiPolygonText(multiPolygon,level,writer); }
Converts a <code>MultiPolygon</code> to &lt;MultiPolygon Tagged Text&gt; format, then appends it to the writer.