Loop through submissions and fill up the content page.
969551
def _draw_content(self):
        
        n_rows, n_cols = self.term.stdscr.getmaxyx()
        window = self.term.stdscr.derwin(n_rows - self._row - 1, n_cols, self._row, 0)
        window.erase()
        win_n_rows, win_n_cols = window.getmaxyx()

        self._subwindows = []
        page_index, cursor_index, inverted = self.nav.position
        step = self.nav.step

        # If not inverted, align the first submission with the top and draw
        # downwards. If inverted, align the first submission with the bottom
        # and draw upwards.
        cancel_inverted = True
        current_row = (win_n_rows - 1) if inverted else 0
        available_rows = win_n_rows
        top_item_height = None if inverted else self.nav.top_item_height
        for data in self.content.iterate(page_index, step, win_n_cols - 2):
            subwin_n_rows = min(available_rows, data['n_rows'])
            subwin_inverted = inverted
            if top_item_height is not None:
                # Special case: draw the page as non-inverted, except for the
                # top element. This element will be drawn as inverted with a
                # restricted height
                subwin_n_rows = min(subwin_n_rows, top_item_height)
                subwin_inverted = True
                top_item_height = None
            subwin_n_cols = win_n_cols - data['h_offset']
            start = current_row - subwin_n_rows + 1 if inverted else current_row
            subwindow = window.derwin(subwin_n_rows, subwin_n_cols, start, data['h_offset'])
            self._subwindows.append((subwindow, data, subwin_inverted))
            available_rows -= (subwin_n_rows + 1)  # Add one for the blank line
            current_row += step * (subwin_n_rows + 1)
            if available_rows <= 0:
                # Indicate the page is full and we can keep the inverted screen.
                cancel_inverted = False
                break

        if len(self._subwindows) == 1:
            # Never draw inverted if only one subwindow. The top of the
            # subwindow should always be aligned with the top of the screen.
            cancel_inverted = True

        if cancel_inverted and self.nav.inverted:
            # In some cases we need to make sure that the screen is NOT
            # inverted. Unfortunately, this currently means drawing the whole
            # page over again. Could not think of a better way to pre-determine
            # if the content will fill up the page, given that it is dependent
            # on the size of the terminal.
            self.nav.flip((len(self._subwindows) - 1))
            self._draw_content()
            return

        if self.nav.cursor_index >= len(self._subwindows):
            # Don't allow the cursor to go over the number of subwindows
            # This could happen if the window is resized and the cursor index is
            # pushed out of bounds
            self.nav.cursor_index = len(self._subwindows) - 1

        # Now that the windows are setup, we can take a second pass through
        # to draw the text onto each subwindow
        for index, (win, data, inverted) in enumerate(self._subwindows):
            if self.nav.absolute_index >= 0 and index == self.nav.cursor_index:
                win.bkgd(str(' '), self.term.attr('Selected'))
                with self.term.theme.turn_on_selected():
                    self._draw_item(win, data, inverted)
            else:
                win.bkgd(str(' '), self.term.attr('Normal'))
                self._draw_item(win, data, inverted)

        self._row += win_n_rows
194040
def get_content(self):
        """"""
        url = self.build_url()
        try:
            self.content_page = requests.get(url)
            if not(self.content_page.status_code == requests.codes.ok):
                self.content_page.raise_for_status()
        except requests.exceptions.RequestException as ex:
            logging.info('A requests exception has ocurred: ' + str(ex))
            logging.error(traceback.format_exc())
            sys.exit(0)
617117
def recent_submissions(self):
        
        for group in self.groups:
            submission = Submission.most_recent_submission(self, group)
            if submission:
                yield submission
457543
public void fillContent(final CmsGallerySearchBean searchObj, List<CmsSearchParamPanel> paramPanels) {

        removeNoParamMessage();

        // in case there is a single type selected and the current sort order is not by type,
        // hide the type ascending and type descending sort order options
        SortParams currentSorting = SortParams.valueOf(searchObj.getSortOrder());
        if ((searchObj.getTypes().size() == 1)
            && !((currentSorting == SortParams.type_asc) || (currentSorting == SortParams.type_desc))) {
            m_sortSelectBox.setItems(getSortList(false));
        } else {
            m_sortSelectBox.setItems(getSortList(true));
        }
        m_sortSelectBox.selectValue(searchObj.getSortOrder());
        displayResultCount(getResultsDisplayed(searchObj), searchObj.getResultCount());
        m_hasMoreResults = searchObj.hasMore();
        if (searchObj.getPage() == 1) {
            m_preset = null;
            getList().scrollToTop();
            clearList();
            showParams(paramPanels);
            m_backwardScrollHandler.updateSearchBean(searchObj);
            getList().getElement().getStyle().clearDisplay();
            scrollToPreset();

        } else {
            showParams(paramPanels);
            addContent(searchObj);
        }
        showUpload(searchObj);
    }
181506
def list_submissions():
    """"""
    submissions = []
    try:
        submissions = session.query(Submission).all()
    except SQLAlchemyError as e:
        session.rollback()
    return render_template('list_submissions.html', submissions=submissions)
1320063
private function fill()
    {
        foreach ($this->attributes as $key => $value) {
            $key = $this->camelCase($key);

            $this->{$key} = $value;
        }
    }
923296
def fill_out_and_submit(self, data, prefix='', turbo=False):
        
        return self.get_elm(tag_name='form').fill_out_and_submit(data, prefix, turbo)
1172264
def get_submissions(self, limit=None):
        """"""
        url = (self._imgur._base_url + "/3/account/{0}/submissions/"
               "{1}".format(self.name, '{}'))
        resp = self._imgur._send_request(url, limit=limit)
        return [_get_album_or_image(thing, self._imgur) for thing in resp]
1128513
def fill_out(session)
      session['scope'] = "attachments"
      if @digest
        session['resource'] = @digest
      else
        session['resource'] = to_hash
        session['url'] = @url
        session['etag'] = @etag
      end
      @token = session.to_s
    end
760078
public function run()
    {
        $post = $this->findPost('lorem-ipsum-post');
        if (!$post->exists) {
            $post->fill([
                'title'            => 'Lorem Ipsum Post',
                'author_id'        => 0,
                'seo_title'        => null,
                'excerpt'          => 'This is the excerpt for the Lorem Ipsum Post',
                'body'             => '<p>This is the body of the lorem ipsum post</p>',
                'image'            => 'posts/nlje9NZQ7bTMYOUG4lF1.jpg',
                'slug'             => 'lorem-ipsum-post',
                'meta_description' => 'This is the meta description',
                'meta_keywords'    => 'keyword1, keyword2, keyword3',
                'status'           => 'PUBLISHED',
                'featured'         => 0,
            ])->save();
        }

        $post = $this->findPost('my-sample-post');
        if (!$post->exists) {
            $post->fill([
                'title'     => 'My Sample Post',
                'author_id' => 0,
                'seo_title' => null,
                'excerpt'   => 'This is the excerpt for the sample Post',
                'body'      => '<p>This is the body for the sample post, which includes the body.</p>
                <h2>We can use all kinds of format!</h2>
                <p>And include a bunch of other stuff.</p>',
                'image'            => 'posts/7uelXHi85YOfZKsoS6Tq.jpg',
                'slug'             => 'my-sample-post',
                'meta_description' => 'Meta Description for sample post',
                'meta_keywords'    => 'keyword1, keyword2, keyword3',
                'status'           => 'PUBLISHED',
                'featured'         => 0,
            ])->save();
        }

        $post = $this->findPost('latest-post');
        if (!$post->exists) {
            $post->fill([
                'title'            => 'Latest Post',
                'author_id'        => 0,
                'seo_title'        => null,
                'excerpt'          => 'This is the excerpt for the latest post',
                'body'             => '<p>This is the body for the latest post</p>',
                'image'            => 'posts/9txUSY6wb7LTBSbDPrD9.jpg',
                'slug'             => 'latest-post',
                'meta_description' => 'This is the meta description',
                'meta_keywords'    => 'keyword1, keyword2, keyword3',
                'status'           => 'PUBLISHED',
                'featured'         => 0,
            ])->save();
        }

        $post = $this->findPost('yarr-post');
        if (!$post->exists) {
            $post->fill([
                'title'     => 'Yarr Post',
                'author_id' => 0,
                'seo_title' => null,
                'excerpt'   => 'Reef sails nipperkin bring a spring upon her cable coffer jury mast spike marooned Pieces of Eight poop deck pillage. Clipper driver coxswain galleon hempen halter come about pressgang gangplank boatswain swing the lead. Nipperkin yard skysail swab lanyard Blimey bilge water ho quarter Buccaneer.',
                'body'      => '<p>Swab deadlights Buccaneer fire ship square-rigged dance the hempen jig weigh anchor cackle fruit grog furl. Crack Jennys tea cup chase guns pressgang hearties spirits hogshead Gold Road six pounders fathom measured fer yer chains. Main sheet provost come about trysail barkadeer crimp scuttle mizzenmast brig plunder.</p>
<p>Mizzen league keelhaul galleon tender cog chase Barbary Coast doubloon crack Jennys tea cup. Blow the man down lugsail fire ship pinnace cackle fruit line warp Admiral of the Black strike colors doubloon. Tackle Jack Ketch come about crimp rum draft scuppers run a shot across the bow haul wind maroon.</p>
<p>Interloper heave down list driver pressgang holystone scuppers tackle scallywag bilged on her anchor. Jack Tar interloper draught grapple mizzenmast hulk knave cable transom hogshead. Gaff pillage to go on account grog aft chase guns piracy yardarm knave clap of thunder.</p>',
                'image'            => 'posts/yuk1fBwmKKZdY2qR1ZKM.jpg',
                'slug'             => 'yarr-post',
                'meta_description' => 'this be a meta descript',
                'meta_keywords'    => 'keyword1, keyword2, keyword3',
                'status'           => 'PUBLISHED',
                'featured'         => 0,
            ])->save();
        }
    }
1232914
def add_content(self, more_content):
        """"""
        sourcename = self.get_sourcename()

        if self.object.docs:
            self.add_line('', sourcename)
            for line in self.object.docs.splitlines():
                self.add_line(line, sourcename)

        # add additional content (e.g. from document), if present
        if more_content:
            self.add_line('', sourcename)
            for line, src in zip(more_content.data, more_content.items):
                self.add_line(line, src[0], src[1])
837533
def submit(self):

        
        futures = []
        while self.submitted < 4 and not self.done():
            part = self.parts.pop(0)
            part_number = part['part']
            part_read_offset = part['offset']
            part_read_limit = part['limit']

            self.fp.seek(part_read_offset)
            part_data = self.fp.read(part_read_limit - part_read_offset)

            futures.append(
                self.pool.submit(
                    _upload_part, self.api, self.session,
                    self._URL['upload_part'], self.upload_id,
                    part_number, part_data, self.retry, self.timeout
                )
            )

            self.submitted += 1
            self.total_submitted += 1

        return futures
853433
function next() {
		
		var data = new Object();
		// Submit content of all forms -- except those with class 'ignore-form' -- before going to next page.
		$('#container form:not(.ignore-form)').each(function(index) {
			//console.log("Form no. "+index + " with the ID #" + $(this).attr('id') );
			//console.log($( this ).serializeArray() );
			data[$(this).attr('id')] = $( this ).serializeArray(); // Add each form's data to the data object.
		});
		
		if(isEmpty(data)) 
			cloak.message('next');
		else
			cloak.message('next', data);
	}
819036
void submit() {

        CmsObject cms = A_CmsUI.getCmsObject();
        try {
            List<CmsUUID> changedIds = Lists.newArrayList();
            CmsResourceDeleteMode mode = (CmsResourceDeleteMode)m_deleteSiblings.getValue();
            for (CmsResource resource : m_context.getResources()) {
                changedIds.add(resource.getStructureId());
                CmsLockActionRecord lockRecord = CmsLockUtil.ensureLock(cms, resource);
                try {
                    cms.deleteResource(cms.getSitePath(resource), mode);
                } finally {
                    if (lockRecord.getChange().equals(LockChange.locked)) {
                        if (!resource.getState().isNew()) {
                            try {
                                cms.unlockResource(resource);
                            } catch (CmsVfsResourceNotFoundException e) {
                                LOG.warn(e.getLocalizedMessage(), e);
                            } catch (CmsLockException e) {
                                LOG.warn(e.getLocalizedMessage(), e);
                            }
                        }
                    }
                }
            }
            m_context.finish(changedIds);
        } catch (Exception e) {
            m_context.error(e);
        }
    }
656011
def populate_pages(self, parent=None, child=5, depth=5):
        """"""
        User = get_user_model()
        from basic_cms.models import Content
        author = User.objects.all()[0]
        if depth == 0:
            return
        p = self.model(parent=parent, author=author, status=self.model.PUBLISHED)
        p.save()
        p = self.get(id=p.id)
        Content(body='page-' + str(p.id), type='title', language=settings.PAGE_DEFAULT_LANGUAGE, page=p).save()
        Content(body='page-' + str(p.id), type='slug', language=settings.PAGE_DEFAULT_LANGUAGE, page=p).save()
        for child in range(1, child + 1):
            self.populate_pages(parent=p, child=child, depth=(depth - 1))
475167
def _fill(self):
    """"""
    try:
      self._head = self._iterable.next()
    except StopIteration:
      self._head = None
421374
public List<ISubmission> include(List<ISubmission> submissions, List<String> submitters){
		ArrayList<ISubmission> filteredSubmissions = new ArrayList<ISubmission>();
		for (ISubmission submission: submissions){
			if (submission.getSubmitter() != null){
				if (submitters.contains(submission.getSubmitter().getSubmitter()))
					filteredSubmissions.add(submission);
			}
		}
		return filteredSubmissions;
	}