Test if bit at given index of given value is = 1.

@param pVal
value to test
@param pBitIndex
bit index between 0 and 31
@return true bit at given index of give value is = 1
488162
public static boolean matchBitByBitIndex(final int pVal, final int pBitIndex) {
		if (pBitIndex < 0 || pBitIndex > MAX_BIT_INTEGER) {
			throw new IllegalArgumentException(
					"parameter 'pBitIndex' must be between 0 and 31. pBitIndex=" + pBitIndex);
		}
		return (pVal & 1 << pBitIndex) != 0;
	}
488571
protected boolean isZero( int index ) {
        double bottom = Math.abs(diag[index])+Math.abs(diag[index+1]);

        return( Math.abs(off[index]) <= bottom*UtilEjml.EPS);
    }
498402
function (a, b) {
    if (sjcl.bitArray.bitLength(a) !== sjcl.bitArray.bitLength(b)) {
      return false;
    }
    var x = 0, i;
    for (i=0; i<a.length; i++) {
      x |= a[i]^b[i];
    }
    return (x === 0);
  }
1138782
public boolean contains0(int idx) {
      if (idx < 0) throw new IndexOutOfBoundsException("idx < 0: " + idx);
      idx -= _bitoff;
      return (idx >= 0) && (idx < _nbits) &&
              (_val[_byteoff + (idx >> 3)] & ((byte)1 << (idx & 7))) != 0;
    }
475020
boolean get(int bitIndex) {
        int wordIndex = wordIndex(bitIndex);
        long bitMask = 1L << bitIndex;
        return (words[wordIndex] & bitMask) != 0;
    }
1073898
private void checkSmallBin(int index) {
    long h = smallBins[index];

    boolean empty = (smallMap & (1 << index)) == 0;
    if (h == -1 && !empty) {
      throw new AssertionError("Small bin chain " + index + " is marked as occupied but has an invalid head pointer");
    }
    if (!empty) {
      long p = h;
      do {
        long size = chunkSize(p);
        /* each chunk claims to be free */
        checkFreeChunk(p);
        /* chunk belongs in bin */
        if (smallBinIndex(size) != index)
          throw new AssertionError("Chunk " + p + " is the wrong size to be in bin " + index);
        if (backward(p) != p && chunkSize(backward(p)) != chunkSize(p))
          throw new AssertionError("Chunk " + p + " is the linked to a chunk of the wrong size");
        /* chunk is followed by an inuse chunk */
        checkInUseChunk(nextChunk(p));

        p = backward(p);
      } while (p != h);
    }
  }
714598
public static int getNumValuesPerBlock(int bitsPerValue, int blockSize)
  {
    int ret = 1;
    while (getSerializedSize(bitsPerValue, ret) <= blockSize) {
      ret *= 2;
    }
    return ret / 2;
  }
916619
protected final <T> boolean isArrContains(final T pVal,
    final T[] pArr) {
    for (T val : pArr) {
      if (val.equals(pVal)) {
        return true;
      }
    }
    return false;
  }
636883
public static boolean get(long[] bits, int pos) {
    int offset = pos >> LONG_SHIFT;
    if (offset >= bits.length)
      return false;
    return (bits[offset] & (1L << pos)) != 0;
  }
781619
static int readInt(final byte[] b, final int index) {
        return ((b[index] & 0xFF) << 24) | ((b[index + 1] & 0xFF) << 16)
                | ((b[index + 2] & 0xFF) << 8) | (b[index + 3] & 0xFF);
    }
1068622
public static Bit valueOf(String bit) throws NumberFormatException {
    final int i = ParseUtil.parseIntBase10(bit);
    if(i != 0 && i != 1) {
      throw new NumberFormatException("Input \"" + bit + "\" must be 0 or 1.");
    }
    return (i > 0) ? TRUE : FALSE;
  }
1341373
public static boolean isBitOn(int value, int bitNumber) {
    if (bitNumber <= 0 || bitNumber > 8) {
      throw new IllegalArgumentException("Only bits 1 through 8 are supported");
    }

    return ((value & MASKS[bitNumber - 1]) == MASKS[bitNumber - 1]);
  }
488812
def p_BIT(p):
    
    bit = p[2].eval()
    if bit < 0 or bit > 7:
        error(p.lineno(3), 'Invalid bit position %i. Must be in [0..7]' % bit)
        p[0] = None
        return

    p[0] = Asm(p.lineno(3), '%s %i,%s' % (p[1], bit, p[4]))
589290
private boolean checkForFullTabularDataRepresentation(JSONObject pValue, TabularType pType) {
        if (pValue.containsKey("indexNames") && pValue.containsKey("values") && pValue.size() == 2) {
            Object jsonVal = pValue.get("indexNames");
            if (!(jsonVal instanceof JSONArray)) {
                throw new IllegalArgumentException("Index names for tabular data must given as JSON array, not " + jsonVal.getClass());
            }
            JSONArray indexNames = (JSONArray) jsonVal;
            List<String> tabularIndexNames = pType.getIndexNames();
            if (indexNames.size() != tabularIndexNames.size()) {
                throw new IllegalArgumentException("Given array with index names must have " + tabularIndexNames.size() + " entries " +
                                                   "(given: " + indexNames + ", required: " + tabularIndexNames + ")");
            }
            for (Object index : indexNames) {
                if (!tabularIndexNames.contains(index.toString())) {
                    throw new IllegalArgumentException("No index with name '" + index + "' known " +
                                                       "(given: " + indexNames + ", required: " + tabularIndexNames + ")");
                }
            }
            return true;
        }
        return false;
    }
1024409
function isIndex$1(value, length) {
  length = length == null ? MAX_SAFE_INTEGER : length;
  return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
}
622329
@Override
    public void set(int index, boolean value) {
        int i = Arrays.binarySearch(trueBits, index);
        // bit at index is set to true and shall be set to false
        if (i >= 0 && !value) {
            int[] tmp = new int[trueBits.length - 1];
            System.arraycopy(trueBits, 0, tmp, 0, i);
            System.arraycopy(trueBits, i + 1, tmp, i, trueBits.length - i - 1);
            trueBits = tmp;
        }
        // bit at index is set to false and shall be set to true
        else if (i < 0 && value) {
            int[] tmp = new int[trueBits.length + 1];
            System.arraycopy(trueBits, 0, tmp, 0, trueBits.length);
            tmp[tmp.length - 1] = index;
            trueBits = tmp;
            Arrays.sort(trueBits);
        }
    }
1259043
public static boolean contains(ByteBuffer buf, int position, short x, final int numRuns) {
    int index = bufferedUnsignedInterleavedBinarySearch(buf, position, 0, numRuns, x);
    if (index >= 0) {
      return true;
    }
    index = -index - 2; // points to preceding value, possibly -1
    if (index != -1) {// possible match
      int offset = toIntUnsigned(x)
          - toIntUnsigned(buf.getShort(position + index * 2 * 2));
      int le = toIntUnsigned(buf.getShort(position + index * 2 * 2 + 2));
      if (offset <= le) {
        return true;
      }
    }
    return false;

  }