Checks for zero height or zero width blocks and flags the occurrence.

        Returns:
            True if the block is size 0.
483781
def _check_zero_size(self):
        '''
        
        '''
        block_zero = self.end[0] <= self.start[0] or self.end[1] <= self.start[1]
        if block_zero:
            self.flag_change(self.flags, 'fatal', worksheet=self.worksheet,
                             message=self.FLAGS['0-size'])
        return block_zero
336916
function isBlockNode(node) {
        if (!node) {
            return false;
        }
        var nodeType = node.nodeType;
        return nodeType == 1 && !inlineDisplayRegex.test(getComputedStyleProperty(node, "display"))
            || nodeType == 9 || nodeType == 11;
    }
526397
def pad(self, data, block_size):
		
		padding_symbol = self.padding_symbol()

		blocks_count = (len(data) // block_size)
		if (len(data) % block_size) != 0:
			blocks_count += 1

		total_length = blocks_count * block_size
		return self._fill(data, total_length, padding_symbol)
992933
private final boolean matchChildBlock(int bufferIndex)
   {
      //
      // Match the pattern we see at the start of the child block
      //
      int index = 0;
      for (byte b : CHILD_BLOCK_PATTERN)
      {
         if (b != m_buffer[bufferIndex + index])
         {
            return false;
         }
         ++index;
      }

      //
      // The first step will produce false positives. To handle this, we should find
      // the name of the block next, and check to ensure that the length
      // of the name makes sense.
      //
      int nameLength = FastTrackUtility.getInt(m_buffer, bufferIndex + index);

//      System.out.println("Name length: " + nameLength);
//      
//      if (nameLength > 0 && nameLength < 100)
//      {
//         String name = new String(m_buffer, bufferIndex+index+4, nameLength, CharsetHelper.UTF16LE);
//         System.out.println("Name: " + name);
//      }
      
      return nameLength > 0 && nameLength < 100;
   }
371256
def _right_zero_blocks(self, r):
    """"""
    if not self._include_off_diagonal:
      return self._block_rows - r - 1
    elif self._upper:
      return 0
    elif self._include_diagonal:
      return self._block_rows - r - 1
    else:
      return self._block_rows - r
448067
public boolean isEmpty() {
        switch(size()) {
            case 0:
                return true;
            case 1:
                Element element = (Element) get(0);
                if (element.type() == Element.CHUNK && ((Chunk) element).isEmpty()) {
                    return true;
                }
                return false;
                default:
                    return false;
        }
    }
1325836
private boolean blockEquals(Block target, Block source)
    {
        boolean found = false;
        if (source instanceof SpecialSymbolBlock && target instanceof SpecialSymbolBlock) {
            if (((SpecialSymbolBlock) target).getSymbol() == ((SpecialSymbolBlock) source).getSymbol()) {
                found = true;
            }
        } else if (source instanceof WordBlock && target instanceof WordBlock) {
            if (((WordBlock) target).getWord().equals(((WordBlock) source).getWord())) {
                found = true;
            }
        } else if (source.equals(target)) {
            found = true;
        }
        return found;
    }
717379
def GetBlockByHeight(self, height):
        
        hash = self.GetBlockHash(height)
        if hash is not None:
            return self.GetBlockByHash(hash)
408564
def check_block_spacing(
        self,
        first_block_type: LineType,
        second_block_type: LineType,
        error_message: str,
    ) -> typing.Generator[AAAError, None, None]:
        
        numbered_lines = list(enumerate(self))
        first_block_lines = filter(lambda l: l[1] is first_block_type, numbered_lines)
        try:
            first_block_lineno = list(first_block_lines)[-1][0]
        except IndexError:
            # First block has no lines
            return

        second_block_lines = filter(lambda l: l[1] is second_block_type, numbered_lines)
        try:
            second_block_lineno = next(second_block_lines)[0]
        except StopIteration:
            # Second block has no lines
            return

        blank_lines = [
            bl for bl in numbered_lines[first_block_lineno + 1:second_block_lineno] if bl[1] is LineType.blank_line
        ]

        if not blank_lines:
            # Point at line above second block
            yield AAAError(
                line_number=self.fn_offset + second_block_lineno - 1,
                offset=0,
                text=error_message.format('none'),
            )
            return

        if len(blank_lines) > 1:
            # Too many blank lines - point at the first extra one, the 2nd
            yield AAAError(
                line_number=self.fn_offset + blank_lines[1][0],
                offset=0,
                text=error_message.format(len(blank_lines)),
            )
466637
static boolean isEmptyBlock(Node block) {
    if (!block.isBlock()) {
      return false;
    }

    for (Node n = block.getFirstChild(); n != null; n = n.getNext()) {
      if (!n.isEmpty()) {
        return false;
      }
    }
    return true;
  }
464031
function checkBadness() {
    var b, b1, bad, big, bw, count, h, x, y;
    bad = bw = count = 0;

    // Blocks of same colour.
    for (y = 0; y < width - 1; y++) {
      for (x = 0; x < width - 1; x++) {
            // All foreground colour.
        if ((frameBuffer[x + width * y] &&
             frameBuffer[(x + 1) + width * y] &&
             frameBuffer[x + width * (y + 1)] &&
             frameBuffer[(x + 1) + width * (y + 1)]) ||
            // All background colour.
            !(frameBuffer[x + width * y] ||
              frameBuffer[(x + 1) + width * y] ||
              frameBuffer[x + width * (y + 1)] ||
              frameBuffer[(x + 1) + width * (y + 1)])) {
          bad += N2;
        }
      }
    }

    // X runs.
    for (y = 0; y < width; y++) {
      badBuffer[0] = 0;

      for (h = b = x = 0; x < width; x++) {
        if ((b1 = frameBuffer[x + width * y]) === b) {
          badBuffer[h]++;
        } else {
          badBuffer[++h] = 1;
        }

        b   = b1;
        bw += b ? 1 : -1;
      }

      bad += getBadRuns(h);
    }

    if (bw < 0) bw = -bw;

    big   = bw;
    big  += big << 2;
    big <<= 1;

    while (big > width * width) {
      big -= width * width;
      count++;
    }

    bad += count * N4;

    // Y runs.
    for (x = 0; x < width; x++) {
      badBuffer[0] = 0;

      for (h = b = y = 0; y < width; y++) {
        if ((b1 = frameBuffer[x + width * y]) === b) {
          badBuffer[h]++;
        } else {
          badBuffer[++h] = 1;
        }

        b = b1;
      }

      bad += getBadRuns(h);
    }

    return bad;
  }
774015
function checkBlock(i) {
  return i < tokensLength && tokens[i].block_end ?
      tokens[i].block_end - i + 1 : 0;
}
804546
def is_empty(self):
        
        if(((self.channels == []) and (not self.shape == (0, 0))) or
           ((not self.channels == []) and (self.shape == (0, 0)))):
            raise RuntimeError("Channels-shape mismatch.")
        return self.channels == [] and self.shape == (0, 0)
73616
def contains_empty(features):
    
    if not features:
        return True
    for feature in features:
        if feature.shape[0] == 0:
            return True
    return False
8272
def is_empty(self):
        
        if self.properties:
            # Rules containing CSS properties are never empty
            return False

        if not self.descendants:
            for header in self.ancestry.headers:
                if header.is_atrule and header.directive != '@media':
                    # At-rules should always be preserved, UNLESS they are @media
                    # blocks, which are known to be noise if they don't have any
                    # contents of their own
                    return False

        return True
439096
public static boolean bidiagOuterBlocks( final int blockLength ,
                                             final DSubmatrixD1 A ,
                                             final double gammasU[],
                                             final double gammasV[])
    {
//        System.out.println("---------- Orig");
//        A.original.print();

        int width = Math.min(blockLength,A.col1-A.col0);
        int height = Math.min(blockLength,A.row1-A.row0);

        int min = Math.min(width,height);

        for( int i = 0; i < min; i++ ) {
            //--- Apply reflector to the column

            // compute the householder vector
            if (!computeHouseHolderCol(blockLength, A, gammasU, i))
                return false;

            // apply to rest of the columns in the column block
            rank1UpdateMultR_Col(blockLength,A,i,gammasU[A.col0+i]);

            // apply to the top row block
            rank1UpdateMultR_TopRow(blockLength,A,i,gammasU[A.col0+i]);

            System.out.println("After column stuff");
            A.original.print();

            //-- Apply reflector to the row
            if(!computeHouseHolderRow(blockLength,A,gammasV,i))
                return false;
            
            // apply to rest of the rows in the row block
            rank1UpdateMultL_Row(blockLength,A,i,i+1,gammasV[A.row0+i]);

            System.out.println("After update row");
            A.original.print();

            // apply to the left column block
            // TODO THIS WON'T WORK!!!!!!!!!!!!!
            // Needs the whole matrix to have been updated by the left reflector to compute the correct solution
//            rank1UpdateMultL_LeftCol(blockLength,A,i,i+1,gammasV[A.row0+i]);

            System.out.println("After row stuff");
            A.original.print();
        }

        return true;
    }
616105
def p_namedblock_empty(self, p):
        ''
        p[0] = Block((), p[3], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))