Load block's working data before rendering.
512984
private function loadCustomerData()
    {
        $custId = $this->registry->registry(\Magento\Customer\Controller\RegistryConstants::CURRENT_CUSTOMER_ID);
        if ($custId) {
            $query = $this->qLoad->build();
            $conn = $query->getConnection();
            $bind = [
                QLoad::BND_CUST_ID => $custId
            ];
            $rs = $conn->fetchAll($query, $bind);
            $this->cacheCustData = reset($rs);
        }
    }
928011
def read_data(self, block_samples=1024):
        """"""
        old_width = self._file.getsampwidth()

        while True:
            data = self._file.readframes(block_samples)
            if not data:
                break

            # Make sure we have the desired bitdepth and endianness.
            data = audioop.lin2lin(data, old_width, TARGET_WIDTH)
            if self._needs_byteswap and self._file.getcomptype() != 'sowt':
                # Big-endian data. Swap endianness.
                data = byteswap(data)
            yield data
79464
def render
      raise ArgumentError, "Block required" unless block_given?
      raise Error, "Can't nest rendering" if rendering?

      $window.flush # Ensure that any drawing _before_ the render block is drawn to screen, rather than into the buffer.

      render_

      @rendering = true

      # Project onto the texture itself, using Gosu (inverted) coordinates.
      Gl.glPushMatrix
      Gl.glMatrixMode Gl::GL_PROJECTION
      Gl.glLoadIdentity
      Gl.glViewport 0, 0, width, height
      Gl.glOrtho 0, width, height, 0, -1, 1

      begin
        yield self
      ensure
        $window.flush # Force all the drawing to draw now!
        Gl.glBindFramebufferEXT Gl::GL_FRAMEBUFFER_EXT, 0

        @rendering = false

        Gl.glPopMatrix

        cache.refresh # Force lazy reloading of the cache.
      end

      self
    end
1106627
function load(err, data){
            if (err) throw err
            _.log('view added: '+name+': '+source)
            views[name] = compile(''+data)
        }
1197521
def _field_data(self, block, name):
        """"""
        scope = block.fields[name].scope

        if scope not in self._scope_mappings:
            raise InvalidScopeError(scope)

        return self._scope_mappings[scope]
145605
def prepare_everything(self):
        """"""
        self.prepare_network()
        self.init_models()
        self.load_conditions()
        with hydpy.pub.options.warnmissingobsfile(False):
            self.prepare_nodeseries()
        self.prepare_modelseries()
        self.load_inputseries()
1298292
def render(&block)
      raise LocalJumpError, "no block given" unless block_given?

      options = @options.dup
      open_tabs_options  = options.delete(:open_tabs)  || {}
      close_tabs_options = options.delete(:close_tabs) || {}

      "".tap do |html|
        html << open_tabs(open_tabs_options).to_s
        html << @context.capture(self, &block)
        html << close_tabs(close_tabs_options).to_s
      end.html_safe
    end
600794
def render(self):
        """"""
        context = GLOBAL_TEMPLATE_CONTEXT.copy()
        context['tag'] = self
        entries = list(self.entries)
        entries.sort(key=operator.attrgetter('date'), reverse=True)
        context['entries'] = entries

        # render html page
        render_to = os.path.join(CONFIG['output_to'], 'tags', self.slug)
        if not os.path.exists(render_to):  # pragma: no coverage
            os.makedirs(render_to)
        _render(context, 'tag_index.html', os.path.join(render_to, 'index.html'))  # noqa

        # render atom.xml
        context['entries'] = context['entries'][:10]
        context['last_build'] = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%SZ")  # noqa

        _render(context, 'atom.xml', os.path.join(render_to, 'atom.xml'))
        return True
348493
def load(self, model):
        """"""
        self._dawg.load(find_data(model))
        self._loaded_model = True
1142755
def read_next_block(infile, block_size=io.DEFAULT_BUFFER_SIZE):
    """"""
    chunk = infile.read(block_size)

    while chunk:
        yield chunk

        chunk = infile.read(block_size)
1298565
public function on_before_render()
    {
        $pageTitle = $this->get('pageTitle');
        if (!$pageTitle) {
            $this->set('pageTitle', t($this->c->getCollectionName()));
        }
        $dbConfig = $this->app->make('config/database');
        $this->set('showPrivacyPolicyNotice', !$dbConfig->get('app.privacy_policy_accepted'));
        $this->set('token', $this->token);
        $this->set('error', $this->error);
    }
1207831
private void requestBlock() {
    next = ByteBuffer.allocate(blockSizeBytes);
    long requestTimeout = retryParams.getRequestTimeoutMillisForCurrentAttempt();
    pendingFetch = raw.readObjectAsync(next, filename, fetchPosition, requestTimeout);
  }
31379
def load(self):
        """"""
        LOGGER.debug('%s: start checking: %s', self.name, self.query)
        if self.waiting:
            self.notify('warning', 'Process takes too much time', target='waiting', ntype='common')
        else:
            self.waiting = True
            try:
                response = yield self.client.fetch(self.url, auth_username=self.auth_username,
                                                   auth_password=self.auth_password,
                                                   request_timeout=self.request_timeout,
                                                   connect_timeout=self.connect_timeout,
                                                   validate_cert=self.validate_cert)
                records = (
                    GraphiteRecord(line, self.default_nan_value, self.ignore_nan)
                    for line in response.buffer)
                data = [
                    (None if record.empty else getattr(record, self.method), record.target)
                    for record in records]
                if len(data) == 0:
                    raise ValueError('No data')
                self.check(data)
                self.notify('normal', 'Metrics are loaded', target='loading', ntype='common')
            except Exception as e:
                self.notify(
                    self.loading_error, 'Loading error: %s' % e, target='loading', ntype='common')
            self.waiting = False
97901
def _iter_blocks(self):
        """"""
        lines = []
        for line in self._iter_unfolded_lines():
            if line:
                lines.append(line)
            elif lines:
                self.records_read += 1
                yield lines
                lines = []
        if lines:
            self.records_read += 1
            yield lines
527451
function render(content) {
  var deferred = q.defer();

  var blockType = "normal";
  var lines = content.split("\n");
  var blocks = {};
  for (var i=0; i<lines.length; i++) {
    var line = lines[i];

    if (line.substr(0,1) == "@") {
      blockType = line.substr(1).trim();
      if (blockType === "end") blockType = "normal";
      continue;
    }
    if (blocks[blockType])
      blocks[blockType] += line + "\n";
    else
      blocks[blockType] = line + "\n";
  }

  for (var key in blocks) {
    if (blocks.hasOwnProperty(key)) {
      try {
        blocks[key] = metaMarked(blocks[key]);
      } catch(err) {
        return deferred.reject(new Error(err));
      }
    }
    deferred.resolve(blocks);
  }

  return deferred.promise;
}
541717
def load_for(self, model: str) -> Tuple[list, list]:
        """"""
        inject_params(model)
        if self.prev_cache != pr.vectorization_md5_hash():
            self.prev_cache = pr.vectorization_md5_hash()
            self.data = self.loader()
        return self.data
329866
def load(data)
      data = DEFAULTS.merge(data)

      @args, @worker, @queue         = data.values_at('args', 'worker', 'queue')
      @status, @at, @total, @message = data.values_at('status', 'at', 'total', 'message')
      @payload                       = data['payload']
      @last_updated_at               = data['last_updated_at'] && Time.at(data['last_updated_at'].to_i)
    end