Returns a new instance of this fragment for the given section
number.
507134
public static PlaceholderFragment newInstance(int sectionNumber, @LayoutRes int layoutRes) {
        PlaceholderFragment fragment = new PlaceholderFragment();
        Bundle args = new Bundle();
        args.putInt(ARG_SECTION_NUMBER, sectionNumber);
        args.putInt(ARG_LAYOUT_RESOURCE, layoutRes);
        fragment.setArguments(args);
        return fragment;
    }
1103688
public function getSection()
    {
        if (null === $this->_section) {
            $this->setSection(new Section($this->getUid(), array('page' => $this)));
        }

        return $this->_section;
    }
941685
def create_section(self, name, overwrite=True):
        

        if overwrite:
            sect = ManifestSection(name)
            self.sub_sections[name] = sect

        else:
            sect = self.sub_sections.get(name, None)
            if sect is None:
                sect = ManifestSection(name)
                self.sub_sections[name] = sect

        return sect
41191
def add_section(self, section):
        
        # check if section already exists
        if not self.config.has_section(section):
            self.config.add_section(section)
            # return updated sections
            return (True, self.config.sections())
        return (False, 'Section: ' + section + ' already exists')
1197078
def derive_from(cls, section, name=None):
        
        new_section = deepcopy(section)

        if name:
            new_section.name = name

        return new_section
1363948
def add_section(self, section):
        

        if not issubclass(section.__class__, SubSection):
            raise TypeError("Argument should be a subclass of SubSection, \
                             not :" + str(section.__class__))
        self.sections[section.name] = section
        return section
370807
public Section addSection(float indentation, String title, int numberDepth) {
        return addSection(indentation, new Paragraph(title), numberDepth);
    }
1035910
def section(self, section):
        
        if isinstance(section, list):
            for h in section:
                self.add_section(h)
        else:
            self.add_section(section)
923580
public function findSection($section)
    {
        if (!isset($this->sectionMap[$section])) {
            throw new UnknownSection($section);
        }

        return $this->sectionMap[$section];
    }
1302207
public void addSection(final Section SECTION) {
        if (null == SECTION) return;
        getSections().add(SECTION);
        getSections().sort(new SectionComparator());
        fireTileEvent(SECTION_EVENT);
    }
1365278
public void addTo(String section, Object element)
    {
        Composite s = (Composite)sections.get(section);
        if (s==null)
            add(element);
        else
            s.add(element);
    }
892004
public function getSection($section)
    {
        $section = $this->get($section);

        if (!$section instanceof self) {
            if (is_array($section) || ($section instanceof \Traversable)) {
                $section = new static($section);
            } else {
                $section = new static();
            }
        }

        return $section;
    }
580845
def _get_section(self, name, type):
        
        for section in self.sections:
            if section['name'] == name and section['type'] == type:
                return section
        return None
1140017
public MarkedSection addMarkedSection() {
    	MarkedSection section = new MarkedSection(new Section(null, numberDepth + 1));
    	add(section);
    	return section;
    }
1220514
@Override
   public Section getIndex(String title, int nesting, List<? extends BaseStyler> stylers) throws VectorPrintException, InstantiationException, IllegalAccessException {
      if (nesting < 1) {
         throw new VectorPrintException("chapter numbering starts with 1, wrong number: " + nesting);
      }
      if (sections.get(nesting) == null) {
         sections.put(nesting, new ArrayList<>(10));
      }
      Section current;
      if (nesting == 1) {
         List<Section> chapters = sections.get(1);
         current = new Chapter(createElement(title, Paragraph.class, stylers), chapters.size() + 1);
         chapters.add(current);
      } else {
         List<Section> parents = sections.get(nesting - 1);
         Section parent = parents.get(parents.size() - 1);
         current = parent.addSection(createParagraph(title, stylers));
         sections.get(nesting).add(current);
      }
      return styleHelper.style(current, null, stylers);
   }
1242803
public synchronized void startSection(String section) {
		section = section.toLowerCase();

		if (this.startTime.containsKey(section))
			throw new IllegalArgumentException("Section \"" + section + "\" had already been started!");

		this.startTime.put(section, System.nanoTime());
		this.trace.push(section);
	}
743873
def load_child_sections_for_section(context, section, count=None):
    '''
    
    '''
    page = section.get_main_language_page()
    locale = context.get('locale_code')

    qs = SectionPage.objects.child_of(page).filter(
        language__is_main_language=True)

    if not locale:
        return qs[:count]
    return get_pages(context, qs, locale)