Scan the page for bitcoin addresses.

Create user interface for all bitcoin address elements on the page-.
You can call this function multiple times if new bitcoin addresses become available.
359913
function() {
        var self = this;

        var template = this.getTemplate();

        // Optionally bail out if the default selection
        // is not given (user calls applyTemplate() manually)
        if(!this.config.selector) {
            return;
        }

        $(this.config.selector).each(function() {

            var $this = $(this);

            // Template already applied
            if($this.hasClass("bitcoin-address-controls")) {
                return;
            }

            // Make sure we don't apply the template on the template itself
            if($this.parents("#" + self.config.template).size() > 0) {
                return;
            }

            // Don't reapply templates on subsequent scans

            self.applyTemplate($this, template);
        });
    }
426221
def auto_paging_each(&blk)
      return enum_for(:auto_paging_each) unless block_given?

      page = self
      loop do
        page.each(&blk)
        page = page.next_page
        break if page.empty?
      end
    end
809158
def _request_check(self, address):
        """"""
        server = self._servers.get(address)

        # "server" is None if another thread removed it from the topology.
        if server:
            server.request_check()
637541
def ProcessNewBlock(self, block):
        
        added = set()
        changed = set()
        deleted = set()

        try:
            # go through the list of transactions in the block and enumerate
            # over their outputs
            for tx in block.FullTransactions:

                for index, output in enumerate(tx.outputs):

                    # check to see if the outputs in the tx are in this wallet
                    state = self.CheckAddressState(output.ScriptHash)

                    if state & AddressState.InWallet > 0:

                        # if it's in the wallet, check to see if the coin exists yet
                        key = CoinReference(tx.Hash, index)

                        # if it exists, update it, otherwise create a new one
                        if key in self._coins.keys():
                            coin = self._coins[key]
                            coin.State |= CoinState.Confirmed
                            changed.add(coin)
                        else:
                            newcoin = Coin.CoinFromRef(coin_ref=key, tx_output=output, state=CoinState.Confirmed, transaction=tx)
                            self._coins[key] = newcoin
                            added.add(newcoin)

                        if state & AddressState.WatchOnly > 0:
                            self._coins[key].State |= CoinState.WatchOnly
                            changed.add(self._coins[key])

            # now iterate over the inputs of the tx and do the same
            for tx in block.FullTransactions:

                for input in tx.inputs:

                    if input in self._coins.keys():
                        if self._coins[input].Output.AssetId == Blockchain.SystemShare().Hash:
                            coin = self._coins[input]
                            coin.State |= CoinState.Spent | CoinState.Confirmed
                            changed.add(coin)

                        else:
                            deleted.add(self._coins[input])
                            del self._coins[input]

            for claimTx in [tx for tx in block.Transactions if tx.Type == TransactionType.ClaimTransaction]:

                for ref in claimTx.Claims:
                    if ref in self._coins.keys():
                        deleted.add(self._coins[ref])
                        del self._coins[ref]

            # update the current height of the wallet
            self._current_height += 1

            # in the case that another wallet implementation needs to do something
            # with the coins that have been changed ( ie persist to db ) this
            # method is called
            self.OnProcessNewBlock(block, added, changed, deleted)

            # this is not necessary at the moment, but any outside process
            # that wants to subscribe to the balance changed event could do
            # so from the BalanceChanged method
            if len(added) + len(deleted) + len(changed) > 0:
                self.BalanceChanged()

        except Exception as e:
            traceback.print_stack()
            traceback.print_exc()
            logger.error("could not process %s " % e)
962073
def spendables_for_address(self, address):
        
        spendables = []
        url_append = "?unspentOnly=true&token=%s&includeScript=true" % self.api_key
        url = self.base_url("addrs/%s%s" % (address, url_append))
        result = json.loads(urlopen(url).read().decode("utf8"))
        for txn in result.get("txrefs", []):
            coin_value = txn.get("value")
            script = h2b(txn.get("script"))
            previous_hash = h2b_rev(txn.get("tx_hash"))
            previous_index = txn.get("tx_output_n")
            spendables.append(Tx.Spendable(coin_value, script, previous_hash, previous_index))
        return spendables
909721
def bitcoin_address(self) -> str:
        
        type_ = self.random.choice(['1', '3'])
        letters = string.ascii_letters + string.digits
        return type_ + ''.join(
            self.random.choice(letters) for _ in range(33))
638725
public void check() {
        List<InetSocketAddress> newAddrs = getAddresses();
        if (newAddrs != null && !newAddrs.equals(currentAddrs)) {

            if (addressChangeListener != null) {
                currentAddrs = newAddrs;
                addressChangeListener.changeAddresses(newAddrs);
            } else {
                LOGGER.error("Address change listener is null for JNDI key {}, cannot notify about new value {}", getJndiKey(), newAddrs);
            }
        }
    }
412978
function loadPageRecursively( page, pageRef, extensionChain ) {

      const { definition, name } = page;

      if( extensionChain.indexOf( name ) !== -1 ) {
         return Promise.reject( formatError(
            page,
            `Cycle in page extension detected: ${extensionChain.concat( [ name ] ).join( ' -> ' )}`
         ) );
      }

      if( !validators.page( definition ) ) {
         return Promise.reject( validators.error(
            `Validation failed for page "${pageRef}"`,
            validators.page.errors
         ) );
      }

      if( !definition.areas ) {
         definition.areas = {};
      }

      return processExtends( page, extensionChain )
         .then( () => {
            generateMissingIds( page );
            // we need to check ids before and after expanding compositions
            checkForDuplicateIds( page );
            return processCompositions( page, pageRef );
         } )
         .then( () => {
            checkForDuplicateIds( page );
            validateWidgetItems( page, pageRef );
            return page;
         } );
   }
735394
public function new_page()
    {
        $this->_page_number++;
        $this->_page_count++;

        $this->_img = imagecreatetruecolor($this->_actual_width, $this->_actual_height);

        $this->_bg_color = $this->_allocate_color($this->_bg_color_array);
        imagealphablending($this->_img, true);
        imagesavealpha($this->_img, true);
        imagefill($this->_img, 0, 0, $this->_bg_color);

        $this->_imgs[] = $this->_img;
    }
440798
function tinf_read_bits(d, num, base) {
  if (!num)
    return base;

  while (d.bitcount < 24) {
    d.tag |= d.source[d.sourceIndex++] << d.bitcount;
    d.bitcount += 8;
  }

  var val = d.tag & (0xffff >>> (16 - num));
  d.tag >>>= num;
  d.bitcount -= num;
  return val + base;
}
186220
function _readMyAddress( pfnCallback )
{
	_db.query
	(
		"SELECT address FROM my_addresses",
		[],
		arrRows =>
		{
			if ( 0 === arrRows.length )
			{
				return pfnCallback( "no addresses" );
			}
			if ( arrRows.length > 1 )
			{
				return pfnCallback( "more than 1 address" );
			}

			//	...
			pfnCallback( null, arrRows[ 0 ].address );
		}
	);
}
584191
function Index(keySize, block) {
  var reader = new SbonReader(block.buffer);

  this.level = reader.readUint8();

  // Number of keys in this index.
  this.keyCount = reader.readInt32();

  // The blocks that the keys point to. There will be one extra block in the
  // beginning of this list that points to the block to go to if the key being
  // searched for is left of the first key in this index.
  this.blockIds = new Int32Array(this.keyCount + 1);
  this.blockIds[0] = reader.readInt32();

  this.keys = [];

  // Load all key/block reference pairs.
  for (var i = 1; i <= this.keyCount; i++) {
    this.keys.push(reader.readByteString(keySize));
    this.blockIds[i] = reader.readInt32();
  }
}
905748
private void checkTransactions(final int height, final EnumSet<VerifyFlag> flags)
            throws VerificationException {
        // The first transaction in a block must always be a coinbase transaction.
        if (!transactions.get(0).isCoinBase())
            throw new VerificationException("First tx is not coinbase");
        if (flags.contains(Block.VerifyFlag.HEIGHT_IN_COINBASE) && height >= BLOCK_HEIGHT_GENESIS) {
            transactions.get(0).checkCoinBaseHeight(height);
        }
        // The rest must not be.
        for (int i = 1; i < transactions.size(); i++) {
            if (transactions.get(i).isCoinBase())
                throw new VerificationException("TX " + i + " is coinbase when it should not be.");
        }
    }
1330965
def search_page(page)
      raise "Search must be multipage to search pages" if !multipage?
      raise "Page must be a valid, positive integer" if page.class != Fixnum || page < 0
      raise "Invalid page range" if page > @pages

      self.search(page)
    end
250445
def get_bitcoind( new_bitcoind_opts=None, reset=False, new=False ):
   
   global bitcoind

   if reset:
       bitcoind = None

   elif not new and bitcoind is not None:
      return bitcoind

   if new or bitcoind is None:
      if new_bitcoind_opts is not None:
         set_bitcoin_opts( new_bitcoind_opts )

      bitcoin_opts = get_bitcoin_opts()
      new_bitcoind = None
      try:

         try:
             new_bitcoind = virtualchain.connect_bitcoind( bitcoin_opts )
         except KeyError, ke:
             log.exception(ke)
             log.error("Invalid configuration: %s" % bitcoin_opts)
             return None

         if new:
             return new_bitcoind

         else:
             # save for subsequent reuse
             bitcoind = new_bitcoind
             return bitcoind

      except Exception, e:
         log.exception( e )
         return None
1149780
function list(callback, limit, offset) {
  if(!util.isFunction(callback)) {
    throw new Error('callback must be a function');
  }

  var resource = this.coinjar.merchant.api_endpoint + '/v1/orders.json',
    order_url = this.coinjar.merchant.orders_endpoint + '/',
    query = {};

  if(limit) { query.limit = limit; }
  if(offset) { query.offset = offset; }

  request.get(resource)
    .auth(this.coinjar.merchant.uuid, this.coinjar.merchant.secret)
    .query(query)
    .end(function (response) {
      if(isResponseError(response, callback)) { return; }
      // build the payment page url for each order object
      var i = response.body.orders.length;
      while (i--) {
        response.body.orders[i].payment_page_url = order_url + response.body.orders[i].uuid;
      }
      return callback(null, response.body.orders);
    });
}
1227743
def scan(self):
        """"""
        found = []
        for addr in range(0,0x80):
            try:
                self._i2c_bus.read_byte(addr)
            except OSError:
                continue
            found.append(addr)
        return found