Populate with thanks
298
private void populateStep4() {
        this.insertRoadmapItem(3, true, I18nLabelsLoader.REPORT_STEP_THANKS, 4);

        int y = 6;

        // thanks
        this.insertFixedTextBold(this, DEFAULT_PosX, y, DEFAULT_WIDTH_LARGE, STEP_THANKS, I18nLabelsLoader.REPORT_STEP_THANKS);
        y += 12; // plus one line

        // thanks msg
        this.insertMultilineFixedText(this, DEFAULT_PosX, y, DEFAULT_WIDTH_LARGE, 8*5, STEP_THANKS, I18nLabelsLoader.ADDON_THANKS_MESSAGE);
        y += 8*5 + 12; // plus 15 lines

        // status
        this.insertFixedText(this, DEFAULT_PosX, y, DEFAULT_WIDTH_LARGE, STEP_THANKS, I18nLabelsLoader.ADDON_THANKS_STATUS);
        this.thanksStatusLabel = this.insertHiddenFixedStatusText(this, DEFAULT_PosX + 40, y, DEFAULT_WIDTH_LARGE, STEP_THANKS, I18nLabelsLoader.ADDON_THANKS_STATUS, false);
        y += 12;
        
        // link
        this.thanksReportLink = this.insertFixedHyperlink(this, DEFAULT_PosX, y, DEFAULT_WIDTH_LARGE, STEP_THANKS, I18nLabelsLoader.ADDON_THANKS_LINK, Resources.getProperty("COMMUNITY_ROOT") + "/reports");

        this.thanksProgressBar = this.insertProgressBar(DEFAULT_PosX, DEFAULT_DIALOG_HEIGHT - 26 - 8, DEFAULT_WIDTH_LARGE, STEP_THANKS, 100);
    }
587611
private function populateResponseHeaders()
	{
		$done = FALSE;
		$line = NULL;
		$header = '';
		$buffer = NULL;

		// When using a file stream.
		if ( $this->resourceType === static::RESOURCE_TYPE_FILE ) {
			$done = \feof( $this->resource );
		}

		// Read the headers from the resource.
		while ( !$done )
		{
			$buffer = $this->readFromResource( 1 );
			// Update stream
			$this->content .= $buffer;
			$header = \strstr( $this->content, "\r\n\r\n", TRUE );
			// When you reach the end of the header, then exit the loop.
			if ( $buffer === '' || $header !== FALSE )
			{
				break;
			}
		}

		// Update cursor position.
		$this->position += \strlen( $this->content );
		// Parse header.
		if ( strlen(trim($header)) > 0 )
		{
			// Set header
			$this->wrapperData = explode( "\r\n", $header );
		}
	}
55535
def force_populate(self):
        
        if not os.path.exists(self.ref):
            raise FileNotFoundError("The reference file path '{}' does not exists.".format(self.ref))
        with open(self.ref, 'r') as f:
            for word in f:
                word = word.strip('\n')
                self.db.add(word)
        self.populated = True
995606
public function populate(): void
  {
    foreach ($this->data as $data)
    {
      $this->rowFactory->createRow($this, $data);
    }
  }
502353
private static function populate() {
    $arr = array();
    $epoch = 0;
    if (!isset(self::$BuildVer) || !is_array(self::$BuildVer)) {
      require __DIR__ .'/data.php';
      if (empty($arr) || !is_array($arr) || empty($epoch)) {
        throw new \Exception('Error fetching file data.php');
      }
      self::$DataTimestamp = $epoch;
      self::$BuildVer = $arr;
    }
  }
604461
private void fillResponseContext(UnitResponse.Context responseContext) {
        IdManager.makeSureMsgId(responseContext);
        responseContext.setNodeStatus(getSimpleStatus());
        responseContext.setMessageType(MessageType.response);
    }
1333604
function() {

			var self = this;

			// Populate table html
			var content = ['<table class="' + this.tableClass + '" data-instance="' + this.instanceCount + '"><thead>',
				'<tr>'];

			for (var i in this.source.columns) {

				var sortContent = this.source.columns[i].name,
					colDir = self.source.columns[i].dir;

				if (self.source.colSortIdx == i) {
					sortContent = self.formatSortHeader(this.source.columns[i].name, colDir)
				}
				
				content.push('<th class="col-' + i + '"><a data-col-idx="' + i + '" data-sort="sort" href="#" title="' + this.source.columns[i].name +'">' + sortContent + '</a></th>');
			}

			content.push('</tr></thead><tbody>');

			for (var i = 0, rows = this.source.data.length; i < rows; i++) {
				var datum = this.source.data[i];

				// Add in a reference to the data
				dataLookup[this.instanceCount][i] = datum

				content.push('<tr class="row-' + i + '"">');

				for (var j in this.source.columns) {
					content.push('<td class="col-' + j +'">' + this.source.columns[j].formatter(datum) + '</td>');
				}

				content.push('</tr>');
			}

			content.push('</tbody></table>');

			this.node.setHtml(content.join(''));

			this.node.one('table thead').on('click', function(e) {
				if (e.target.data('sort')) {
					self.sort(e.target);

					self.node.all('th a').item(e.target.data('col-idx'))._node.focus()
					e.stop();
				}
			});
			this.node.fire('render')
		}
1373953
@GetMapping
    public ResponseEntity<Greeting> greetingSync(
            @RequestParam(value = "name", defaultValue = "World") String name) {
        return ResponseEntity.ok(new Greeting(String.format(template, name)));
    }
1221326
function populateSchema(result, schema) {
  var knex = this.knex;
  return knex.schema.hasTable(schema.tableName)
  .then(function (exists) {
    if (! exists || ! schema.populate) return result;
    return schema.populate(knex)
    .then(function () {
      return result.concat([schema]);
    });
  });
}
549440
public function populate()
    {
        if ($this->configurator) {
            call_user_func($this->configurator);
        }

        $this->populateListeners();
        $this->populateSubscribers();
    }
1222471
def populate_resobj(rexobj, mobj, loc):
    '''
    
    '''
    resobj = REXResult(mobj, loc)
    rexobj.matches.append(resobj)
    rexobj.res_count += 1
1331914
def accept(self, event):
        """"""

        self.log('Invitation accepted:', event.__dict__, lvl=debug)
        try:
            uuid = event.data
            enrollment = objectmodels['enrollment'].find_one({
                'uuid': uuid
            })

            if enrollment is not None:
                self.log('Enrollment found', lvl=debug)
                if enrollment.status == 'Open':
                    self.log('Enrollment is still open', lvl=debug)
                    if enrollment.method == 'Invited' and self.config.auto_accept_invited:
                        enrollment.status = 'Accepted'

                        data = 'You should have received an email with your new password ' \
                               'and can now log in to the system and start to use it. <br/>' \
                               'Please change your password immediately after logging in'
                        password = std_human_uid().replace(" ", '')

                        self._create_user(enrollment.name, password, enrollment.email, enrollment.method, uuid)
                        self._send_acceptance(enrollment, password, event)
                    elif enrollment.method == 'Enrolled' and self.config.auto_accept_enrolled:
                        enrollment.status = 'Accepted'
                        data = 'Your account is now activated.'

                        self._create_user(enrollment.name, enrollment.password, enrollment.email, enrollment.method,
                                          uuid)

                        # TODO: Evaluate if sending an acceptance mail makes sense
                        # self._send_acceptance(enrollment, "", event)
                    else:
                        enrollment.status = 'Pending'
                        data = 'Someone has to confirm your enrollment ' \
                               'first. Thank you, for your patience.'
                        # TODO: Alert admin users
                    enrollment.save()

                # Reaffirm acceptance to end user, when clicking on the link multiple times
                elif enrollment.status == 'Accepted':
                    data = 'You can now log in to the system and start to use it.'
                elif enrollment.status == 'Pending':
                    data = 'Someone has to confirm your enrollment ' \
                           'first. Thank you, for your patience.'
                else:
                    self.log('Enrollment has been closed already!', lvl=warn)
                    self._fail(event)
                    return
                packet = {
                    'component': 'hfos.enrol.enrolmanager',
                    'action': 'accept',
                    'data': {True: data}
                }
                self.fireEvent(send(event.client.uuid, packet))
            else:
                self.log('No enrollment available.', lvl=warn)
                self._fail(event)
        except Exception as e:
            self.log('Error during invitation accept handling:', e, type(e),
                     lvl=warn, exc=True)
674342
def post(method, hmc, uri, uri_parms, body, logon_required,
             wait_for_completion):
        """"""
        assert wait_for_completion is True  # async not supported yet
        try:
            resource = hmc.lookup_by_uri(uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        resource.update(body)
1133875
def add_response(self, req, resp):
        
        if self._cache is None:
            return
        signature = sign(req.allocateQuotaRequest)
        with self._cache as c:
            now = self._timer()
            item = c.get(signature)
            if item is None:
                c[signature] = CachedItem(
                    req, resp, self.service_name, now)
            else:
                # Update the cached item to reflect that it is updated
                item.last_check_time = now
                item.response = resp
                item.is_in_flight = False
                c[signature] = item
842450
def populate(self, other):
        """"""
        self.clear()
        self.update(other)
        self.reset_all_changes()
348977
private HttpEntity populateEntity(RequestElements intuitRequest) throws FMSException {
        byte[] compressedData = intuitRequest.getCompressedData();

        if (null == compressedData) {
            // use postString to create httpEntity
            try {
                return new StringEntity(intuitRequest.getPostString());
            } catch (UnsupportedEncodingException e) {
                throw new FMSException("UnsupportedEncodingException", e);
            }
        }

        // use compressed data to create httpEntity
        return new InputStreamEntity( new ByteArrayInputStream(compressedData) , compressedData.length);
    }
251687
def _populate_data(self):
        """"""
        if self.id is None:
            self.id = self.meta_data.get("id")
        self.is_anchor = self.meta_data.get("is_anchor")
        self.country_code = self.meta_data.get("country_code")
        self.description = self.meta_data.get("description")
        self.is_public = self.meta_data.get("is_public")
        self.asn_v4 = self.meta_data.get("asn_v4")
        self.asn_v6 = self.meta_data.get("asn_v6")
        self.address_v4 = self.meta_data.get("address_v4")
        self.address_v6 = self.meta_data.get("address_v6")
        self.prefix_v4 = self.meta_data.get("prefix_v4")
        self.prefix_v6 = self.meta_data.get("prefix_v6")
        self.geometry = self.meta_data.get("geometry")
        self.tags = self.meta_data.get("tags")
        self.status = self.meta_data.get("status", {}).get("name")