code
stringlengths
10
174k
nl
stringlengths
3
129k
public cudaIpcMemHandle(){ }
Creates a new, uninitialized cudaIpcMemHandle
public SortedArrayList(){ comparator=null; }
Constructs a new <code>SortedArrayList</code> expecting elements are comparable.
protected void updateView(View view){ try { mStatusText=(TextView)view.findViewById(R.id.seekBarPrefValue); mStatusText.setText(String.valueOf(mCurrentValue)); mStatusText.setMinimumWidth(30); mSeekBar.setProgress(mCurrentValue - mMinValue); } catch ( Exception e) { Log.e(TAG,"Error updating s...
Update a SeekBarPreference view with our current state
public static JSONObject toJSONObject(String string) throws JSONException { JSONObject jo=new JSONObject(); JSONTokener x=new JSONTokener(string); while (x.more()) { String name=Cookie.unescape(x.nextTo('=')); x.next('='); jo.put(name,Cookie.unescape(x.nextTo(';'))); x.next(); } return jo; }
Convert a cookie list into a JSONObject. A cookie list is a sequence of name/value pairs. The names are separated from the values by '='. The pairs are separated by ';'. The names and the values will be unescaped, possibly converting '+' and '%' sequences. To add a cookie to a cooklist, cookielistJSONObject.put(cookieJ...
public ItemCollectionRequest(final String requestUrl,final IOneDriveClient client,final List<Option> options){ super(requestUrl,client,options); }
The request for this collection of Item
protected Expression neg(int opPos) throws TransformerException { return compileUnary(new Neg(),opPos); }
Compile a unary '-' operation.
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case N4JSPackage.N4_TYPE_DEFINITION__DEFINED_TYPE: if (resolve) return getDefinedType(); return basicGetDefinedType(); } return super.eGet(featureID,resolve,coreType); }
<!-- begin-user-doc --> <!-- end-user-doc -->
static void appendBytes(String content,Mode mode,BitArray bits,String encoding) throws WriterException { switch (mode) { case NUMERIC: appendNumericBytes(content,bits); break; case ALPHANUMERIC: appendAlphanumericBytes(content,bits); break; case BYTE: append8BitBytes(content,bits,encoding); break; case KANJI: app...
Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits".
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:57:11.635 -0500",hash_original_method="A905F7DF70B1EDD8621789C3C3A6CD84",hash_generated_method="B003E144846289E0AEB6814A85C77E68") public CopyOnWriteArraySet(Collection<? exte...
Creates a set containing all of the elements of the specified collection.
private static void TestMultipleFD() throws Exception { RandomAccessFile raf=null; FileOutputStream fos=null; FileInputStream fis=null; FileChannel fc=null; FileLock fileLock=null; File test1=new File("test1"); try { raf=new RandomAccessFile(test1,"rw"); fos=new FileOutputStream(raf.getFD()); ...
Exercise FileDispatcher close()/preClose()
protected PrettyPrinter _defaultPrettyPrinter(){ return new DefaultPrettyPrinter(); }
Helper method that should return default pretty-printer to use for generators constructed by this mapper, when instructed to use default pretty printer.
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.
@Override public boolean equals(Object obj){ if (obj == this) { return true; } if (!(obj instanceof DefaultKeyedValue)) { return false; } DefaultKeyedValue that=(DefaultKeyedValue)obj; if (!this.key.equals(that.key)) { return false; } if (this.value != null ? !this.value.equals(that.value) :...
Tests this key-value pair for equality with an arbitrary object.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:54:59.837 -0500",hash_original_method="0268276F0AF2F185A8A983DF4EA54EFF",hash_generated_method="B6B9664ACA374B7893607D0B90FFC14C") public boolean hasFromTag(){ return hasParameter(ParameterNames.FROM_TAG); }
Boolean function
public static <A>EvalTValue<A> fromAnyM(final AnyMValue<A> anyM){ return of(anyM.map(null)); }
Construct an MaybeT from an AnyM that contains a monad type that contains type other than Maybe The values in the underlying monad will be mapped to Maybe<A>
public int deleteById(DatabaseConnection databaseConnection,ID id,ObjectCache objectCache) throws SQLException { try { Object[] args=new Object[]{convertIdToFieldObject(id)}; int rowC=databaseConnection.delete(statement,args,argFieldTypes); logger.debug("delete data with statement '{}' and {} args, change...
Delete the object from the database.
private Entry(T elem,double priority){ mNext=mPrev=this; mElem=elem; mPriority=priority; }
Constructs a new Entry that holds the given element with the indicated priority.
public InputStream newInputStream(int index) throws IOException { synchronized (DiskLruCache.this) { if (entry.currentEditor != this) { throw new IllegalStateException(); } if (!entry.readable) { return null; } return new FileInputStream(entry.getCleanFile(index)); } }
Returns an unbuffered input stream to read the last committed value, or null if no value has been committed.
public AccountHeaderBuilder withSelectionListEnabled(boolean selectionListEnabled){ this.mSelectionListEnabled=selectionListEnabled; return this; }
enable or disable the selection list
private Round(Context context,int number,int priorErrors,int priorWarnings,Log.DeferredDiagnosticHandler deferredDiagnosticHandler){ this.context=context; this.number=number; compiler=JavaCompiler.instance(context); if (compiler instanceof LanguageCompiler) { ((LanguageCompiler)compiler).setAddModuleTrees(f...
Create a round (common code).
public Equals(){ super(Boolean.class,Number.class,Number.class); }
Constructs a new node for comparing two numbers for equality.
public static String encode(User user){ StringBuilder out=new StringBuilder(); out.append(user.id).append(FIELD_SEPARATOR); out.append(user.isEnabled()).append(FIELD_SEPARATOR); out.append(Base64.encodeBase64String(user.name.getBytes())).append(FIELD_SEPARATOR); out.append(user.getContext().getAuthenticationM...
Encodes the User in a String. Fields that contain strings are Base64 encoded.
private long nextPowerOf2(long val){ long po2=1; while (po2 < val) { po2*=2; } return (po2); }
Get the next power of two greater than the given value
public StereoOptionSceneController(){ String stereo=System.getProperty(AVKey.STEREO_MODE); if ("redblue".equalsIgnoreCase(stereo)) this.setStereoMode(AVKey.STEREO_MODE_RED_BLUE); else if ("device".equalsIgnoreCase(stereo)) this.setStereoMode(AVKey.STEREO_MODE_DEVICE); }
Constructs an instance and initializes its stereo mode to
synchronized public ICommitRecord findNext(final long timestamp){ if (timestamp == ITx.UNISOLATED) { throw new IllegalArgumentException("Can not specify 'UNISOLATED' as timestamp"); } if (timestamp == ITx.READ_COMMITTED) { throw new IllegalArgumentException("Can not specify 'READ_COMMITTED' as timestamp")...
Find the first commit record strictly greater than the timestamp.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:35:28.161 -0500",hash_original_method="5BF2BF9E6EAB3A672A6E4C279ED476B8",hash_generated_method="3C20053C0BADAEBF831FEE2F33201756") public void expand(){ try { final IStatusBarService svc=getService(); if (svc != null) { ...
Expand the status bar.
public void fireNodeRemoved(SessionNode node){ SessionEvent event=new SessionEvent(this.source,node,SessionEvent.NODE_REMOVED); fireSessionEvent(event); }
Fires an event indicating that a sesison node has been removed from the session.
protected static void enableJndiMock() throws NamingException { if (!NamingManager.hasInitialContextFactoryBuilder()) { NamingManager.setInitialContextFactoryBuilder(new TestNamingContextFactoryBuilder()); } }
Tries to register a mocked <code>NamingContextFactoryBuilder</code> to enable basic JNDI functionality in the test code.
@Override public String prettyPrintIdentifier(){ Metric metric=value.getMetric(); if (metric != null && metric.getOid() != null) { String id=PrettyPrintConstant.IDENTIFIER_TAG + PrettyPrintConstant.OPEN_IDENT + metric.getOid()+ PrettyPrintConstant.CLOSE_IDENT; Space parent=value.getParent(); while (pare...
todo: need to correct that code...
public void executeQuery(){ KeyNamePair docTypeKNPair=cmbDocType.getSelectedItem().toKeyNamePair(); executeQuery(docTypeKNPair,form.getMiniTable()); form.getMiniTable().repaint(); form.invalidate(); }
Query Info
public void removeListener(final ISPARQLUpdateListener l){ if (isReadOnly()) throw new UnsupportedOperationException(); if (l == null) throw new IllegalArgumentException(); listeners.remove(l); }
Remove a SPARQL UDPATE listener.
protected void debugCodeAssign(String className,int newType,int newId,String value){ if (trace.isDebugEnabled()) { trace.debugCode(className + " " + PREFIX[newType]+ newId+ " = "+ getTraceObjectName()+ "."+ value+ ";"); } }
Write trace information as an assignment in the form className prefixId = objectName.value.
public static ArrayBasedEscaperMap create(Map<Character,String> replacements){ return new ArrayBasedEscaperMap(createReplacementArray(replacements)); }
Returns a new ArrayBasedEscaperMap for creating ArrayBasedCharEscaper or ArrayBasedUnicodeEscaper instances.
public void onWatched(EntityPlayerMP player){ }
Called when a player starts watching the chunk
private static byte[] min(byte[] ip1,byte[] ip2){ for (int i=0; i < ip1.length; i++) { if ((ip1[i] & 0xFFFF) < (ip2[i] & 0xFFFF)) { return ip1; } } return ip2; }
Returns the minimum IP address.
public String toString(){ return this.getClass().getName() + "(" + mean+ ")"; }
Returns a String representation of the receiver.
Writer write(Writer writer,int indentFactor,int indent) throws JSONException { try { boolean commanate=false; int length=this.length(); writer.write('['); if (length == 1) { JSONObject.writeValue(writer,this.myArrayList.get(0),indentFactor,indent); } else if (length != 0) { final ...
Write the contents of the JSONArray as JSON text to a writer. For compactness, no whitespace is added. <p> Warning: This method assumes that the data structure is acyclical.
public int color(Context ctx,@AttrRes int colorStyle,@ColorRes int colorDefaultRes){ int color=color(ctx); if (color == 0) { return UIUtils.getThemeColorFromAttrOrRes(ctx,colorStyle,colorDefaultRes); } else { return color; } }
a small helper class to get the color from the colorHolder or from the theme or from the default color value
void checkDestroyed(){ throwIfDestroyed(isDestroyed()); }
Throws LockGrantorDestroyedException if this grantor has been destroyed.
@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:14.459 -0500",hash_original_method="355F47F7AE472993E3A2C68F4F83F8CB",hash_generated_method="7DAE11C94B3B5FFEA81184E8A7CC2D91") @Override public void send(HandshakeIODataStream out){ i...
Sends message
@Override public <K>Eval<Map<K,List<T>>> groupBy(final Function<? super T,? extends K> classifier){ return Eval.later(null); }
Perform an asyncrhonous groupBy operation
@Deprecated public static <N,E>ImmutableNetwork<N,E> copyOf(ImmutableNetwork<N,E> graph){ return checkNotNull(graph); }
Simply returns its argument.
@Override public void execute(){ if (event.has("expire")) { GroupPanelController.get().expireInvite(event.get("leader")); } else { GroupPanelController.get().receiveInvite(event.get("leader")); } }
executes the event
public PolynomialGF2mSmallM modSquareMatrix(PolynomialGF2mSmallM[] matrix){ int length=matrix.length; int[] resultCoeff=new int[length]; int[] thisSquare=new int[length]; for (int i=0; i < coefficients.length; i++) { thisSquare[i]=field.mult(coefficients[i],coefficients[i]); } for (int i=0; i < length; ...
Square this polynomial using a squaring matrix.
public Builder enableHomeAsUp(boolean enabled){ this.enableHomeAsUp=enabled; return this; }
Enables the up button in the ActionBar. Defaults to true.
public static void w(String tag,String msg,Object... args){ if (sLevel > LEVEL_WARNING) { return; } if (args.length > 0) { msg=String.format(msg,args); } Log.w(tag,msg); }
Send a WARNING log message
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:28:38.470 -0500",hash_original_method="C177E80799F9F51057A5F361D4C5571B",hash_generated_method="BA62DAC4F150FFE24970E26679C6A589") public long replace(ContentValues values){ return insertInternal(values,true); }
Performs an insert, adding a new row with the given values. If the table contains conflicting rows, they are deleted and replaced with the new row.
public void ignoreRecursion(final boolean ignoreRecursion){ this.ignoreRecursion=ignoreRecursion; }
do not cascade down whole tree
private boolean updateRatios(){ if (!MEASURETYPE_Ratio.equals(getMeasureType())) return false; return false; }
Update/save Goals with Ratios
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
protected boolean doDoneAction(){ _parent.reset(); _parent._currentIconMap=_iconMap; if (!_parent.isUpdate()) { ItemPalette.removeIconMap(_type,_family); if (!ItemPalette.addFamily(_parent._paletteFrame,_type,_family,_iconMap)) { return false; } else { _parent.updateFamiliesPanel(); ...
Action for both create new family and change existing family
public int index(){ return currentBufferIndex; }
Returns current index of inner <code>int</code> array chunk. Represents the index of last used inner array chunk.
@Inline @Entrypoint public static void booleanFieldWrite(Object ref,boolean value,Offset offset,int locationMetadata){ if (NEEDS_BOOLEAN_GC_WRITE_BARRIER) { ObjectReference src=ObjectReference.fromObject(ref); Selected.Mutator.get().booleanWrite(src,src.toAddress().plus(offset),value,offset.toWord(),Word.from...
Barrier for writes of booleans into fields of instances (i.e. putfield).
@Override public String toString(){ return "[SSLServerSocketImpl]"; }
Returns the string representation of the object.
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
public PlatformDotNetCacheStore(){ nativeFactory=null; }
Default ctor.
public static void translate(MapWidget v,int x,int y,Location location){ MapCalibrationData calibration=v.getConfig().getGpsConfig().getCalibration(); if (calibration == null) { Log.w("GeoUtils","Can't translate. No calibration data!"); } calibration.translate(x,y,location); }
Helper function to translate position on the map to geographic coordinates. Map should be calibrated in order for this method to take effect. Result will be returned in last parameter.
public Set<String> keys(){ Set<String> keys=new HashSet<String>(); keys.addAll(pmap.keySet()); return keys; }
Returns all current keys.
public double distanceSquared(double x,double y,double z){ double xd=this.x - x; double yd=this.y - y; double zd=this.z - z; return xd * xd + yd * yd + zd * zd; }
Returns the distance from this point to the given point squared.
public boolean isConnected(){ return (m_Connection != null); }
Returns true if a database connection is active.
public boolean hasSortingRules(){ return !requestScope.getSorting().isDefaultInstance(); }
Returns true if pagination limits were added to this query. NOTE: This method is often used in GET transaction implementations
public static boolean shouldUpdateStyle(PropertyChangeEvent event){ String eName=event.getPropertyName(); if ("name" == eName) { return true; } else if ("componentOrientation" == eName) { return true; } else if ("ancestor" == eName && event.getNewValue() != null) { LookAndFeel laf=UIManager.ge...
Returns true if the Style should be updated in response to the specified PropertyChangeEvent. This forwards to <code> shouldUpdateStyleOnAncestorChanged</code> as necessary.
public void removePanListener(PanListener listener){ if (mPan != null) { mPan.removePanListener(listener); } }
Removes a pan listener.
public TObjectDoubleHashMapDecorator(TObjectDoubleHashMap<V> map){ super(); this._map=map; }
Creates a wrapper that decorates the specified primitive map.
protected static void incrementValue(FloatMatrix value,FloatMatrix step,final float gamma,final float lambda){ value.addi(value.mul(-gamma * lambda).addi(step)); }
Increments a vector according to the formula v:= v + step - gamma*lambda*v
private void convertInstance(Instance instance){ if (!m_needToTransform) { push(instance); return; } double[] vals=new double[outputFormatPeek().numAttributes()]; int attSoFar=0; for (int j=0; j < getInputFormat().numAttributes(); j++) { Attribute att=getInputFormat().attribute(j); if (!att.is...
Convert a single instance over if the class is nominal. The converted instance is added to the end of the output queue.
public static String hex(ByteBuffer bytes){ return hex(bytes,0,bytes.position()); }
Convert a full byte buffer from 0 to position to a human readable string of nicely formatted hex numbers. Output looks like: <p> 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02...
public void memberJoined(InternalDistributedMember id){ }
MembershipListener Implementation
public static String createName(){ return createName(GENSYM_PREFIX); }
Creates a new unsused attribute name.
public SocketCommandServer(int defaultPort,int defaultBacklog,boolean triesEphemeralPort){ if (defaultPort < 0) defaultPort=0; this.defaultPort=defaultPort; this.defaultBacklog=defaultBacklog; this.triesEphemeralPort=triesEphemeralPort; }
Constructs a new instance with specified configurations.
public static CFGBuilder create(@Nonnull MethodDescriptor descriptor,@Nonnull MethodGen methodGen){ return new BetterCFGBuilder2(descriptor,methodGen); }
Create a CFGBuilder to build a CFG for given method.
public void valueOf(final Type type){ if (type.getSort() == Type.OBJECT || type.getSort() == Type.ARRAY) { return; } if (type == Type.VOID_TYPE) { push((String)null); } else { Type boxed=getBoxedType(type); invokeStatic(boxed,new Method("valueOf",boxed,new Type[]{type})); } }
Generates the instructions to box the top stack value using Java 5's valueOf() method. This value is replaced by its boxed equivalent on top of the stack.
public DoubleProperty yShiftProperty(){ return this.mapArea.getView().translateYProperty(); }
Return the vertical translation of the backing map
public static void listenForRequests(boolean isFullOp){ ServerSocket s=null; try { if (isFullOp) { SSLServerSocketFactory sslSrvFact=(SSLServerSocketFactory)SSLServerSocketFactory.getDefault(); s=(SSLServerSocket)sslSrvFact.createServerSocket(ServerConfig.getPort()); } else { s=new Server...
Listens for incoming requests. Uses an SSL connection if the server is running in full operating mode.
public static boolean isBinaryVersionCompatible(int consumerMajor,int consumerMinor,int major,int minor){ return consumerMajor == major; }
Can the given consumer binary version consume modules compiled for the given binary version
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:29.719 -0500",hash_original_method="51142E64B42932805E0B604E9F91CFAD",hash_generated_method="C303AAB7EA511965A225079A754DF7E1") public CipherParameters generateDerivedParameters(int keySize,int ivSize){ keySize=keySize / 8; ivSi...
Generate a key with initialisation vector parameter derived from the password, salt, and iteration count we are currently initialised with.
public static void decimate(double[] y,int decrate,double[] ydecimated){ int n=Math.min(ydecimated.length,y.length / decrate); for (int i=0; i < n; i++) ydecimated[i]=y[i * decrate]; }
Decimates a sequence by a specified rate.
public boolean showDialog(){ setVisible(true); return continueQueue; }
Shows the dialog and returns whether the work on the queue should be continued.
public GraphBuilder<N> expectedNodeCount(int expectedNodeCount){ checkArgument(expectedNodeCount >= 0,"The expected number of nodes can't be negative: %s",expectedNodeCount); this.expectedNodeCount=Optional.of(expectedNodeCount); return this; }
Specifies the expected number of nodes in the graph.
public final void testRemoveAllHelperTexts(){ CharSequence helperText1="helperText1"; CharSequence helperText2="helperText2"; PasswordEditText passwordEditText=new PasswordEditText(getContext()); passwordEditText.addHelperText(helperText1); passwordEditText.addHelperText(helperText2); passwordEditText.remov...
Tests the functionality of the method, which allows to remove all helper texts.
public static String saveChartAsPNG(JFreeChart chart,int width,int height,HttpSession session) throws IOException { return ServletUtilities.saveChartAsPNG(chart,width,height,null,session); }
Saves the chart as a PNG format file in the temporary directory.
void resume(){ imageLoader.resume(); }
Resumes the NoxItem downloads if was previously paused.
public static String readFully(Reader reader) throws IOException { try { StringWriter writer=new StringWriter(); char[] buffer=new char[1024]; int count; while ((count=reader.read(buffer)) != -1) { writer.write(buffer,0,count); } return writer.toString(); } finally { reader.close...
Returns the remainder of 'reader' as a string, closing it when done.
public void schemaUrlChanged(String url){ dataObject.getAttributes().put(Constants.JSON_EXAMPLE_SCHEMA_REF_ATTRIBUTE,Collections.singletonList(url)); }
Updates the current value of the schema URL.
public static void exportContent(DialogueSystem system,String file,String tag){ Document doc=XMLUtils.newXMLDocument(); Set<String> parameterIds=new HashSet<String>(system.getState().getParameterIds()); Set<String> otherVarsIds=new HashSet<String>(system.getState().getChanceNodeIds()); otherVarsIds.removeAll(pa...
Exports a dialogue state or prior parameter distributions.
private byte readAndCheckByte() throws IOException, EOFException { int b1=in.read(); if (-1 == b1) { throw new EOFException(); } return (byte)b1; }
Reads a byte from the input stream checking that the end of file (EOF) has not been encountered.
private static void protectPassword(String field){ String passwordFieldName=field + ".value"; String confirmFieldName=field + ".confirm"; if (Validation.hasError(passwordFieldName) || Validation.hasError(confirmFieldName)) { params.remove(passwordFieldName); params.remove(confirmFieldName); } else { ...
Protects a password field by erasing it if there are validation errors, or encrypting it if there aren't.
@SuppressWarnings("unchecked") private void updateTaskbarProgress(@Nullable Double progress){ if (taskBarRelatedPointer == null || taskBarList == null) { return; } threadPoolExecutor.execute(null); }
Updates the progress in the Windows 7+ task bar, if available.
public final void yybegin(int newState){ zzLexicalState=newState; }
Enters a new lexical state
public boolean isExpired(){ return expired; }
Returns whether the session was expired by a leader.
public void addTokenOffset(TLAToken tok,int offset){ Vector lastLine=(Vector)tokens.elementAt(tokens.size() - 1); int newCol=offset; if (lastLine.size() > 0) { TLAToken lastTok=(TLAToken)lastLine.elementAt(lastLine.size() - 1); newCol=newCol + lastTok.column + lastTok.string.length(); } ; tok.column...
The addTokenOffset method was added by LL on 30 Aug 2007 to fix the following bug. When a prime or "[self]" is appended to a variable v, the sustituteForAll() method is called to replace the token "v" with an expression consisting of a line having the sequence of tokens ...
public double distanceSq(final MutableInt2D p){ final double dx=(double)this.x - p.x; final double dy=(double)this.y - p.y; return (dx * dx + dy * dy); }
Returns the squared distance FROM this MutableInt2D TO the specified point.
public boolean verify(String challenge) throws SpkacException { if (!challenge.equals(getChallenge())) { return false; } return verify(); }
Verify SPKAC including the challenge.
private RealConnection findHealthyConnection(int connectTimeout,int readTimeout,int writeTimeout,boolean connectionRetryEnabled,boolean doExtensiveHealthChecks) throws IOException, RouteException { while (true) { RealConnection candidate=findConnection(connectTimeout,readTimeout,writeTimeout,connectionRetryEnable...
Finds a connection and returns it if it is healthy. If it is unhealthy the process is repeated until a healthy connection is found.
public static int indexOfAny(String str,String[] searchStrs){ if ((str == null) || (searchStrs == null)) { return -1; } int sz=searchStrs.length; int ret=Integer.MAX_VALUE; int tmp=0; for (int i=0; i < sz; i++) { tmp=str.indexOf(searchStrs[i]); if (tmp == -1) { continue; } if (tmp ...
<p> Find the first index of any of a set of potential substrings. </p> <p/> <p> <code>null</code> String will return <code>-1</code>. </p>
public ResultSetRow next() throws SQLException { nextRecord(); if (this.nextRow == null && !this.streamerClosed && !this.moreResultsExisted) { this.io.closeStreamer(this); this.streamerClosed=true; } if (this.nextRow != null) { if (this.index != Integer.MAX_VALUE) { this.index++; } } r...
Returns the next row.
public T longClicked(Object handler,String method){ Common common=new Common().forward(handler,method,true,ON_CLICK_SIG); return longClicked(common); }
Register a callback method for when the view is long clicked. Method must have signature of method(View view).
public MethodData(DerValue encoding) throws Asn1Exception, IOException { DerValue der; if (encoding.getTag() != DerValue.tag_Sequence) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der=encoding.getData().getDerValue(); if ((der.getTag() & 0x1F) == 0x00) { BigInteger bint=der.getData().getBigInteger()...
Constructs a MethodData object.
protected static double sunEclipticLongitude(double M0){ double E=eccentricAnomaly(M0); double v=2 * Math.atan(Math.sqrt((1 + ECCENTRICITY) / (1 - ECCENTRICITY)) * Math.tan(E / 2.0)); double ret=v + omega_bar_g; ret=adjustWithin2PI(ret); return ret; }
Calculate the ecliptic longitude of sun, in radians. From Duffett-Smith, chapter 47.
public final boolean isReadFinished(){ return dataSourceStream.isEndOfStream(); }
Whether the whole of the data has been consumed.