Disallow any board that has insufficient tile count to solve.
340127
def _is_impossible_by_count(self, state):
        """"""
        # count all the tile types and name them for readability
        counts = {tile_type: 0 for tile_type in base.Tile._all_types}
        standard_wildcard_type = '2'
        for p, tile in state.board.positions_with_tile():
            # count all wildcards as one value
            tile_type = tile._type
            try:
                int(tile_type)
                counts[standard_wildcard_type] += 1
            except ValueError:
                counts[tile_type] += 1
        skullbomb = counts['*']
        skull = counts['s']
        wildcard = counts[standard_wildcard_type]
        red = counts['r']
        green = counts['g']
        blue = counts['b']
        yellow = counts['y']
        exp = counts['x']
        money = counts['m']
        # always allow skullbomb with enough skulls
        if skullbomb and skullbomb + skull >= 3:
            return False
        # always allow wildcard with enough of one color
        if wildcard:
            if any(wildcard + color >= 3
                   for color in (red, green, blue, yellow)):
                return False
        # disallow simple cases since special cases didn't occur
        if any(tile and tile < 3 for tile in (red, green, blue, yellow,
                                              exp, money, skull)):
            return True
        # allow the state if counts seem ok
        return False
486022
function preventDouble(validator) {
  return function validate(props, propName, ...others) {
    let err = validator(props, propName, ...others);
    if (err && props.__superSecreteProp) {
      err = null;
    }

    return err;
  };
}
946643
def skip(self, num_bytes):
        """"""
        if num_bytes is None:
            self._offset = len(self._data)
        else:
            self._offset += num_bytes
1318158
private void disableRed() throws IOException {
		byte[] dis = "\u001B[0m".getBytes();
		super.write(dis, 0, dis.length);
		writing = false;
	}
768903
def discard(key, matcher)
      @items.reject! {|i| (i[key] =~ matcher) ? true : false }
    end
1236120
def suppress_unifurcations(self):
        ''''''
        q = deque(); q.append(self.root)
        while len(q) != 0:
            node = q.popleft()
            if len(node.children) != 1:
                q.extend(node.children); continue
            child = node.children.pop()
            if node.is_root():
                self.root = child; child.parent = None
            else:
                parent = node.parent; parent.remove_child(node); parent.add_child(child)
            if node.edge_length is not None:
                if child.edge_length is None:
                    child.edge_length = 0
                child.edge_length += node.edge_length
            if child.label is None and node.label is not None:
                child.label = node.label
            q.append(child)
1254764
void removeTileData(Tile from, Tile to) {
        if (overlapData.containsKey(from)) {
            overlapData.get(from).remove(to);
        }

    }
81742
def clear(board, term, height):
    """"""
    for y in xrange(height):
        print term.move(y, 0) + term.clear_eol,
393432
def negate(self):
        """"""
        self.from_value, self.to_value = self.to_value, self.from_value
        self.include_lower, self.include_upper = self.include_upper, self.include_lower
647244
def disable():
    
    Benchmark.enable = False
    ComparisonBenchmark.enable = False
    BenchmarkedFunction.enable = False
    BenchmarkedClass.enable = False
685675
def boards(hwpack='arduino'):
    
    bunch = read_properties(boards_txt(hwpack))

    bunch_items = list(bunch.items())

    # remove invalid boards
    for bid, board in bunch_items:
        if 'build' not in board.keys() or 'name' not in board.keys():
            log.debug('invalid board found: %s', bid)
            del bunch[bid]

    return bunch
1009803
@Override
  public void disableTwoPhaseIterator() {
    super.disableTwoPhaseIterator();
    for (MtasSpanSequenceItem item : items) {
      item.getQuery().disableTwoPhaseIterator();
    }
    if (ignoreQuery != null) {
      ignoreQuery.disableTwoPhaseIterator();
    }
  }
1145407
def reject_batch(self):
        
        prev_size = 0
        if len(self.un_committed) == 0:
            raise LogicError("No items to return")
        if len(self.un_committed) > 0:
            _, _, prev_size = self.un_committed.pop()
        if len(self.un_committed) == 0:
            committed_hash, committed_root, committed_size = self.last_committed
            return committed_hash, committed_root, prev_size - committed_size
        else:
            lhash, ltxn_root, lsize = self.un_committed[-1]
            return lhash, ltxn_root, prev_size - lsize
905493
def neg(self):
        """"""
        self.x = -self.x
        self.y = -self.y
        self.z = -self.z
412095
protected function rejectVirtualColumns()
    {
        $this->columns = array_filter($this->columns, function ($column) {
            return !isset($column['Extra']) || !Str::contains($column['Extra'], 'VIRTUAL');
        });
    }
354074
def reject_all_values_if_none(source_list)
      if source_list.length > 1
        source_list.reject { |value| value == NONE }
      else
        source_list
      end
    end
283809
function(){
		if(!this.puzzle.execConfig('allowempty')){
			var bd = this.board;
			if(bd.sblkmgr.enabled){
				if(bd.sblkmgr.components.length>0){ return;}
			}
			else if(bd.ublkmgr.enabled){
				if(bd.ublkmgr.components.length===0 || bd.ublkmgr.components[0].nodes.length!==bd.cell.length){ return;}
			}
			else{
				if(bd.cell.some(function(cell){ return cell.isShade();})){ return;}
			}
			this.failcode.add("brNoShade");
		}
	}