code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public void deleteInstanceAt(int rowIndex){
((ArffTableModel)getModel()).deleteInstanceAt(mIndices[rowIndex]);
}
| deletes the instance at the given index |
public SpecialInvokeExpr newSpecialInvokeExpr(Local base,SootMethodRef method,Value arg1,Value arg2){
return new JSpecialInvokeExpr(base,method,Arrays.asList(new Value[]{arg1,arg2}));
}
| Constructs a NewSpecialInvokeExpr(Local base, SootMethodRef method, List of Immediate) grammar chunk. |
public void dupX2(){
mv.visitInsn(Opcodes.DUP_X2);
}
| Generates a DUP_X2 instruction. |
public RemoteAttributeServiceImpl(final DtoAttributeService dtoAttributeService){
super(dtoAttributeService);
}
| Construct remote service. |
public Builder throwableFormatter(ThrowableFormatter throwableFormatter){
this.throwableFormatter=throwableFormatter;
return this;
}
| Set the throwable formatter used when log a message with throwable. |
public void decode(byte[] data,int length){
try {
decoder=new BerDecoder(data,0,length);
}
catch ( Exception e) {
log.log(Level.SEVERE,data.toString(),e);
return;
}
try {
decoder.parseSeq(null);
msgId=decoder.parseInt();
m_protocolOp=decoder.parseSeq(null);
if (m_protocolOp == BIND... | Decode Message |
public CCFadeTransition(float d,CCScene s){
this(d,s,new ccColor3B(0,0,0));
}
| initializes the transition with a duration |
static void testSetUp() throws Exception {
InstallSDE.install(new File(System.getProperty("test.classes","."),"TemperatureTableServlet.class"),new File(System.getProperty("test.src","."),"TemperatureTable.sde"));
}
| test set-up |
@Override public int clipSecondaryFacing(int dir){
return dir;
}
| Infantry can face freely |
public IllegalAccessException(){
super();
}
| Constructs an <code>IllegalAccessException</code> without a detail message. |
public synchronized void unregister(StreamScope<?> streamScope){
List<String> names=byStreamScopeMap.get(streamScope);
if (names == null) return;
names=new ArrayList<>(names);
for ( String name : names) unregister(name);
}
| remove all name registrations of the StreamScope. no-op if no registrations for the StreamScope |
MyDate(long elapsedTime){
setDate(elapsedTime);
}
| Creates a MyDate object with a specified elapsed time since midnight, January 1, 1970, in milliseconds |
protected FeatureCallImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static final String asciiBoard(Position pos){
StringBuilder ret=new StringBuilder(400);
String nl=String.format(Locale.US,"%n");
ret.append(" +----+----+----+----+----+----+----+----+");
ret.append(nl);
for (int y=7; y >= 0; y--) {
ret.append(" |");
for (int x=0; x < 8; x++) {
ret.a... | Create an ascii representation of a position. |
private float[] convertUnpacked(byte[] data){
float[] samples=new float[data.length / 2];
int pointer=0;
for (int x=0; x < data.length; x+=2) {
samples[pointer++]=scale((data[x] & 0xFF) | (data[x + 1] << 8));
}
return samples;
}
| Converts the byte array containing unsigned 12-bit short values into signed float values in the range -1 to 1; |
public static void checkArgument(boolean expression){
if (!expression) {
throw new IllegalArgumentException();
}
}
| Ensures the truth of an expression involving one or more parameters to the calling method. |
private void resolveUserTransaction(UserTransaction userTransaction){
if (userTransaction != null) {
try {
if (userTransaction.getStatus() == Status.STATUS_MARKED_ROLLBACK) {
userTransaction.rollback();
}
else {
userTransaction.commit();
}
}
catch ( Throwable t) {
... | If the given UserTransaction is not null, it is committed/rolledback, and then returned to the UserTransactionHelper. |
public STGroupFile(String fileName){
this(fileName,'<','>');
}
| Load a file relative to current directory or from root or via CLASSPATH. |
private boolean zzRefill(){
return zzCurrentPos >= s.offset + s.count;
}
| Refills the input buffer. |
public static DBIDs randomSample(DBIDs ids,double rate,RandomFactory random){
return randomSample(ids,rate,random.getSingleThreadedRandom());
}
| Produce a random sample of the given DBIDs. |
private void evict(Entry<K,V> newCold){
while ((queueSize << 5) < mapSize) {
convertOldestHotToCold();
}
if (stackSize > 0) {
addToQueue(queue,newCold);
}
while (usedMemory > maxMemory && queueSize > 1) {
Entry<K,V> e=queue.queuePrev;
usedMemory-=e.memory;
removeFromQueue(e);
e.value=n... | Evict cold entries (resident and non-resident) until the memory limit is reached. The new entry is added as a cold entry, except if it is the only entry. |
public String evaluateTemplate(String template,Map<String,String> variables){
if (template == null) {
return template;
}
StringBuffer result=new StringBuffer();
int startIndex=template.indexOf(VAR_START);
int endIndex=-1;
while (startIndex >= 0 && startIndex < template.length()) {
result.append(temp... | Evaluates string template for specified map of variables. Template string can contain dynamic parts in the form of ${VARNAME}. Each such part is replaced with value of the variable if such exists in the map, or with empty string otherwise. |
public void moveToNext(){
checkWidget();
final int index=this.selection + 1;
if (index == this.controls.size()) {
return;
}
changeSelectionTo(index);
}
| Move selection to the next control |
public StunServerTransaction(StunStack stackCallback,TransactionID tranID,TransportAddress localListeningAddress,TransportAddress requestSource){
this.stackCallback=stackCallback;
this.transactionID=tranID;
this.localListeningAddress=localListeningAddress;
this.requestSource=requestSource;
}
| Creates a server transaction |
private static void arrayStoreBarrierHelper(Assembler asm,BaselineCompilerImpl compiler,NormalMethod barrier){
MethodReference method=barrier.getMemberRef().asMethodReference();
compiler.genParameterRegisterLoad(method,false);
asm.generateJTOCcall(barrier.getOffset());
}
| Helper function for primitive array stores |
public void render(Graphics g){
super.render(g);
drawingAttributes.setFrom(this);
if (subCircles != null) {
for (int i=subCircles.length - 1; i >= 0; i--) {
drawingAttributes.setTo(subCircles[i]);
drawingAttributes.setTo(labels[i]);
labels[i].setLinePaint(drawingAttributes.getLinePaint());
... | Paint the circles. |
@Override public Response listPlacementStrategies(){
return Response.ok(JsonUtil.toJson(strategyManager.getPlacementStrategyTitles())).build();
}
| Peers strategy **************************************************** |
void removeNodeReferences(Node<T> node){
layout.remove(node.stringID);
node.disconnectFromDividers();
}
| Called by the engine to remove Node references and linked infrastructure. |
public AtomicCounter(long seqno){
this.seqno=seqno;
}
| Creates a new <code>Sequencer</code> object with a starting value. |
public static Color stringToColor(String str){
int icol=SVG_COLOR_NAMES.get(str.toLowerCase());
if (icol != NO_VALUE) {
return new Color(icol,false);
}
return colorLookupStylesheet.stringToColor(str);
}
| Convert a color name from SVG syntax to an AWT color object. |
private void updateCheckedItems(){
for ( TableItem item : tableViewer.getTable().getItems()) {
Profile data=(Profile)item.getData();
item.setChecked(environment.getProfileIds().contains(data.getId()));
}
}
| Updates states of the check boxes next to the elements. |
protected static String extractEncoding(String line){
Pattern p=Pattern.compile(EXTRACT_ENCODING_REGEX);
String[] matches=p.split(line);
String value=matches[1];
String[] cleanup=value.split("\"");
String encoding=cleanup[0];
return encoding.toLowerCase();
}
| Helper method to extract the XML file encoding |
public boolean areAllItemsEnabled(){
final ListAdapter adapter=mListAdapter;
if (adapter != null) {
return adapter.areAllItemsEnabled();
}
else {
return true;
}
}
| If the wrapped SpinnerAdapter is also a ListAdapter, delegate this call. Otherwise, return true. |
public boolean isConfigurable(){
return configurable;
}
| Checks whether the parameter can be configured by a customer. |
public long time(){
return this.time;
}
| Returns snapshot processing time |
public boolean isIDRSlice(){
if (FUI_TYPE == (byte)0x05) {
return true;
}
if (isFrameNonInterleaved() && FUH_TYPE == (byte)0x05) {
return true;
}
return false;
}
| Verifies if packet is a code slice of a IDR picture |
public boolean hasSymbol(){
return getSymbol() != null;
}
| Returns whether it has the stock symbol for the company or mutual fund. |
@Override public String decode(String input){
return input;
}
| No decoding. |
public static <K,V>Map<K,V> asImmutable(Map<K,V> self){
return Collections.unmodifiableMap(self);
}
| A convenience method for creating an immutable map. |
public boolean removeColumn(String recordKey,Column<CompositeColumnName> column,RowMutator mutator,Map<String,List<Column<CompositeColumnName>>> fieldColumnMap){
CompositeColumnName columnName=column.getName();
mutator.getRecordColumnList(_parentType.getCF(),recordKey).deleteColumn(columnName);
if (_index == null... | Generate queries for removing given column. Caller is expected to execute generated queries |
private void closeDeletion(int d){
Object[] tab=table;
int len=tab.length;
Object item;
for (int i=nextKeyIndex(d,len); (item=tab[i]) != null; i=nextKeyIndex(i,len)) {
int r=hash(item,len);
if ((i < r && (r <= d || d <= i)) || (r <= d && d <= i)) {
tab[d]=item;
tab[d + 1]=tab[i + 1];
t... | Rehash all possibly-colliding entries following a deletion. This preserves the linear-probe collision properties required by get, put, etc. |
public static void showCallgraphSettingsDialog(final JFrame parent){
final ZyGraphViewSettings settings=ConfigManager.instance().getDefaultCallGraphSettings();
final CGraphSettingsDialog dlg=new CGraphSettingsDialog(parent,"Initial Call graph Settings",settings,true,true);
dlg.setVisible(true);
ConfigManager.in... | Shows the initial call graph settings dialog. |
final public void write(char[] buf){
try {
_out.print(buf,0,buf.length);
}
catch ( IOException e) {
log.log(Level.FINE,e.toString(),e);
}
}
| Writes a character buffer. |
private void push(final int type){
if (outputStack == null) {
outputStack=new int[10];
}
int n=outputStack.length;
if (outputStackTop >= n) {
int[] t=new int[Math.max(outputStackTop + 1,2 * n)];
System.arraycopy(outputStack,0,t,0,n);
outputStack=t;
}
outputStack[outputStackTop++]=type;
int... | Pushes a new type onto the output frame stack. |
public Y le(String value){
if (value == null || value.trim().length() == 0) {
return super.le((Integer)null);
}
else {
return super.le(Integer.parseInt(value.trim()));
}
}
| SQL: <code><=</code> |
public void comment(char ch[],int start,int length) throws org.xml.sax.SAXException {
if (ch == null || start < 0 || length >= (ch.length - start) || length < 0) return;
append(m_doc.createComment(new String(ch,start,length)));
}
| Report an XML comment anywhere in the document. This callback will be used for comments inside or outside the document element, including comments in the external DTD subset (if read). |
private static String createRegExpStringForWildcardPattern(String wildcardPattern){
String escaped=regexpWildcardEscape.replace(wildcardPattern,"\\$&");
RegExp mimicLookbehind=RegExp.compile("([\\\\]*)([?*])","g");
StringBuilder wildcardStr=new StringBuilder(escaped);
for (MatchResult match=mimicLookbehind.exec... | Creates a regular expression which will match the given wildcard pattern <p/> Backslashes can be used to escape a wildcard character and make it a literal; likewise, backslashes before wildcard characters can be escaped. |
public cudaIpcMemHandle(){
}
| Creates a new, uninitialized cudaIpcMemHandle |
public static boolean verify(byte[] data,ECDSASignature signature,byte[] pub){
if (FAKE_SIGNATURES) return true;
if (Secp256k1Context.isEnabled()) {
try {
return NativeSecp256k1.verify(data,signature.encodeToDER(),pub);
}
catch ( NativeSecp256k1Util.AssertFailException e) {
log.error("Caug... | <p>Verifies the given ECDSA signature against the message bytes using the public key bytes.</p> <p>When using native ECDSA verification, data must be 32 bytes, and no element may be larger than 520 bytes.</p> |
public void loadFromStream(InputStream inStr){
BufferedReader rdr;
String currLine;
String[] params;
Conversion[] currCnvSet;
EcuDataItem newItm;
int line=0;
try {
rdr=new BufferedReader(new InputStreamReader(inStr));
while ((currLine=rdr.readLine()) != null) {
if (++line == 1 || currLine.st... | read data from input stream (csv) into data structure |
public synchronized void openDriver(SurfaceHolder holder) throws IOException {
Camera theCamera=camera;
if (theCamera == null) {
theCamera=new OpenCameraManager().build().open();
if (theCamera == null) {
throw new IOException();
}
camera=theCamera;
}
theCamera.setPreviewDisplay(holder);
... | Opens the camera driver and initializes the hardware parameters. |
protected Injector createInjector(List<Module> modules){
return Guice.createInjector(modules);
}
| Shortcut to create the Injector given a list of Modules. |
protected ParameterizedTypeRefStructuralImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override public boolean supportsSchemasInPrivilegeDefinitions(){
debugCodeCall("supportsSchemasInPrivilegeDefinitions");
return true;
}
| Returns whether the schema name in GRANT is supported. |
@Override public int hashCode(){
return 83 + start + 7 * end + (negated ? 1 : 0);
}
| <p>Gets a hashCode compatible with the equals method.</p> |
public Entry withDisposition(Disposition disposition){
if (disposition == this.disposition) {
return this;
}
return new Entry(address,disposition,spec);
}
| Returns an instance just like this one but with the disposition set as given. |
@Override protected void drawGuiContainerBackgroundLayer(float f,int mouseX,int mouseY){
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
containerWidth=(this.width - this.xSize) / 2;
containerHeight=(this.height - this.ySize) / 2;
this.drawTextur... | Draw the background layer for the GuiContainer (everything behind the items) |
public boolean isResident(){
return (status != Status.NONRES);
}
| Returns true if this entry is resident in the cache, false otherwise. |
public Object clone(){
DVector clone=null;
try {
clone=(DVector)super.clone();
}
catch ( Exception e) {
System.err.println("Error cloning " + getClass().getName() + ":");
e.printStackTrace();
System.exit(1);
}
clone.vector=(double[])vector.clone();
return clone;
}
| Returns a deep clone of this vector. |
Operation endOperation(int threadId,String className,LoadedClass loadedClass,long time){
LinkedList<Operation> stack=stacks.get(threadId);
if (stack == null || stack.isEmpty()) {
didNotStart(className);
return null;
}
Operation o=stack.getLast();
if (loadedClass != o.loadedClass) {
didNotStart(cla... | Ends an operation. |
public boolean isEmpty(){
return tanks.isFluidTankEmpty(index);
}
| Is the slot empty? |
public static InlineMenuBuilder builder(TelegramBot bot){
return new InlineMenuBuilder(bot);
}
| Create a new inline menu builder |
public KeyProtector(char[] password) throws NoSuchAlgorithmException {
int i, j;
if (password == null) {
throw new IllegalArgumentException("password can't be null");
}
md=MessageDigest.getInstance(DIGEST_ALG);
passwdBytes=new byte[password.length * 2];
for (i=0, j=0; i < password.length; i++) {
pas... | Creates an instance of this class, and initializes it with the given password. <p>The password is expected to be in printable ASCII. Normal rules for good password selection apply: at least seven characters, mixed case, with punctuation encouraged. Phrases or words which are easily guessed, for example by being found i... |
protected void drawText(DrawContext dc){
TextRenderer tr=this.getTextRenderer(dc);
Point2D point=this.getOffset().computeOffset(this.textBounds.getWidth(),this.textBounds.getHeight(),null,null);
int x=(int)point.getX();
int y=(int)point.getY();
try {
tr.begin3DRendering();
Color bgColor=this.determine... | Draw the text. |
public void testGetServletElementWithOneServlet() throws Exception {
String xml=WEBAPP_TEST_HEADER + " <servlet>".trim() + " <servlet-name>s1</servlet-name>".trim()+ " <servlet-class>sclass1</servlet-class>".trim()+ " </servlet>".trim()+ "</web-app>";
WebXml webXml=WebXmlIo.parseWebXml(new ByteArrayInputStr... | Tests whether a servlet element is correctly retrieved from a descriptor containing only one servlet definition. |
public DgAnalysisPopulation(){
table=new LinkedHashMap<Id<Person>,DgPersonData>();
}
| Creates a PlanComparison Object with the initial size |
void doDie(int x,int y){
destroyCreature(x,y);
}
| Kills off creature in position X, Y, replacing it with an empty square. |
public final int size(){
int count=0;
for ( E ignored : myIterable) {
count++;
}
return count;
}
| Returns the number of elements in this fluent iterable. |
private void interruptIdleWorkers(boolean onlyOne){
final ReentrantLock mainLock=this.mainLock;
mainLock.lock();
try {
for ( Worker w : workers) {
Thread t=w.thread;
if (!t.isInterrupted() && w.tryLock()) {
try {
t.interrupt();
}
catch ( SecurityException ignor... | Interrupts threads that might be waiting for tasks (as indicated by not being locked) so they can check for termination or configuration changes. Ignores SecurityExceptions (in which case some threads may remain uninterrupted). |
@SuppressWarnings("serial") @Test public final void testFire(){
final StendhalRPZone zone=new StendhalRPZone("test");
final Area ar=new Area(zone,new Rectangle(-2,-2,4,4){
}
);
final PlayerInAreaCondition cond=new PlayerInAreaCondition(ar);
final Player player=PlayerTestHelper.createPlayer("player");
assert... | Tests for fire. |
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 String removeFormattingAndColors(String line){
return removeFormatting(removeColors(line));
}
| Removes all formatting and colours from a line of IRC text. |
public void deleteImageSharings(ContactId contact) throws RcsServiceNotAvailableException, RcsGenericException {
if (mApi == null) {
throw new RcsServiceNotAvailableException();
}
try {
mApi.deleteImageSharings2(contact);
}
catch ( Exception e) {
RcsIllegalArgumentException.assertException(e);
... | Deletes image sharing with a given contact from history and abort/reject any associated ongoing session if such exists |
private void offsetChildrenLeftAndRight(int offset){
for (int i=getChildCount() - 1; i >= 0; i--) {
getChildAt(i).offsetLeftAndRight(offset);
}
}
| Offset the horizontal location of all children of this view by the specified number of pixels. |
protected void copyBindings() throws StandardException {
for ( QueryTreeNode node : bindingsToCopy) {
Object userData=node.getUserData();
if (userData instanceof TableBinding) userData=new TableBinding((TableBinding)userData);
else if (userData instanceof ColumnBinding) {
ColumnBinding cb=(Col... | Do the actual binding copies. Deferred like this so that it does not matter what order the tree is traversed during the node copy. |
@Override protected void finalize() throws Throwable {
close();
super.finalize();
}
| Overridden to close the datagram socket. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:47.718 -0400",hash_original_method="307DABE77B65556975D712DF7F2D3DF0",hash_generated_method="BC48B88DF10CE450AA1C6373806B3AF8") public void trace(Object message,Throwable t){
}
| Do nothing |
public boolean isPc(){
return isProgramCounter;
}
| Returns whether the register is the program counter register or not. |
public LongArray(int capacity){
this(true,capacity);
}
| Creates an ordered array with the specified capacity. |
@Override public int eBaseStructuralFeatureID(int derivedFeatureID,Class<?> baseClass){
if (baseClass == PropertyAssignment.class) {
switch (derivedFeatureID) {
default :
return -1;
}
}
if (baseClass == AnnotablePropertyAssignment.class) {
switch (derivedFeatureID) {
case N4JSPackage.PROPERTY_GETTER_DECLARATI... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public void reset(ActionMapping mapping,HttpServletRequest request){
query="";
listSize="";
}
| Method reset |
@Override public void eUnset(int featureID){
switch (featureID) {
case ExpressionsPackage.TYPE_CAST_EXPRESSION__OPERAND:
setOperand((Expression)null);
return;
case ExpressionsPackage.TYPE_CAST_EXPRESSION__TYPE:
setType((Type)null);
return;
}
super.eUnset(featureID);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
private double toDouble(byte[] data){
if (data == null || data.length != 8) return 0;
return Double.longBitsToDouble(convertBinaryDoubleToLong(data));
}
| Convert the byte array into a 64 bit double |
protected void findNumBins(int index){
double min=Double.MAX_VALUE, max=-Double.MAX_VALUE, binWidth=0, entropy, bestEntropy=Double.MAX_VALUE, currentVal;
double[] distribution;
int bestNumBins=1;
Instance currentInstance;
for (int i=0; i < getInputFormat().numInstances(); i++) {
currentInstance=getInputFo... | Optimizes the number of bins using leave-one-out cross-validation. |
synchronized public int size(){
return mapping.size();
}
| The current multi-programming level. This is simply the #of distinct transactions in the WAITS_FOR relationship or alternatively the #of vertices in the DAG. |
public JSONObject extract(JSONObject choice){
if (this.selectionMapping == null) return choice;
JSONObject json=new JSONObject(true);
for ( Map.Entry<String,String> c : selectionMapping.entrySet()) {
String key=c.getKey();
int p=key.indexOf('.');
if (p > 0) {
String k0=key.substring(0,p);
... | transfer mappings can be used to extract specific information from a json object to create a new json object. In the context of Susi this is applied on choices from thought data |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:35:49.824 -0500",hash_original_method="7B93ED55B73724A8D927AFB13EC86251",hash_generated_method="CB02D8B39A62AE9F494D3453E700A589") public void writeToParcel(Parcel dest,int flags){
dest.writeString(exceptionClassName);
dest.writeSt... | Save a CrashInfo instance to a parcel. |
@DSSafe(DSCat.SAFE_OTHERS) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:42.066 -0500",hash_original_method="37495B10D833FDE07627744A97E6F360",hash_generated_method="1C9A247DEF15CC56BBB62F24F77B8BB7") public void close() throws IOException {
if (!closed) {
try {
byt... | <p>Reads until the end of the known length of content.</p> <p>Does not close the underlying socket input, but instead leaves it primed to parse the next response.</p> |
private static String capitalize(String s){
if (s == null || s.length() == 0) {
return "";
}
char first=s.charAt(0);
if (Character.isUpperCase(first)) {
return s;
}
else {
return Character.toUpperCase(first) + s.substring(1);
}
}
| INTERNAL method that capitalizes the first character of a string |
public void addSGraphic(SGraphic g){
graphics.addElement(g);
}
| Add a new SGraphic to the GraphicList |
private void put122(final int b,final int s1,final int s2){
pool.put12(b,s1).putShort(s2);
}
| Puts one byte and two shorts into the constant pool. |
@ObjectiveCName("changeNotificationSoundEnabledWithValue:") public void changeNotificationSoundEnabled(boolean val){
modules.getSettingsModule().changeNotificationSoundEnabled(val);
}
| Change notification sounds enabled |
SolrInputField field(String name,float boost,Object... values){
SolrInputField f=new SolrInputField(name);
for ( Object v : values) {
f.addValue(v,1.0F);
}
f.setBoost(boost);
return f;
}
| Convenience method for building up SolrInputFields |
public boolean containsValue(double val){
byte[] states=_states;
double[] vals=_values;
for (int i=vals.length; i-- > 0; ) {
if (states[i] == FULL && val == vals[i]) {
return true;
}
}
return false;
}
| checks for the presence of <tt>val</tt> in the values of the map. |
public ParameterBlock add(char c){
return add(new Character(c));
}
| Adds a Character to the list of parameters. |
private static boolean isXLargeTablet(Context context){
return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
}
| Helper method to determine if the device has an extra-large screen. For example, 10" tablets are extra-large. |
public static void writeTokenFile(File tokenFile,String value) throws IOException {
writeToken(tokenFile.getParentFile(),tokenFile.getName(),value);
}
| Writes a token file containing the given value. |
public static void mixInBands(File f1,File f2,File dest,int nrowsband,boolean increaseband){
PngReader pngr1=new PngReader(f1);
PngReader pngr2=new PngReader(f2);
if (!pngr2.imgInfo.equals(pngr1.imgInfo)) throw new RuntimeException("must be same type");
PngWriter pngw=new PngWriter(dest,pngr1.imgInfo,false);
... | intermixes two images (same size!) n rows from each |
public int indexOf(int elem){
if (null == m_map) return -1;
for (int i=0; i < m_firstFree; i++) {
int node=m_map[i];
if (node == elem) return i;
}
return -1;
}
| Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method. |
public GmlEnvelope(){
}
| Constructs an empty gml:Envelope element. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.