Set parameters needed for list navigation
769186
protected function _setListNavigationParams()
    {
        // list navigation
        $showNavigation = false;
        $adminListSize = $this->_getViewListSize();
        if ($this->_iListSize > $adminListSize) {
            // yes, we need to build the navigation object
            $pageNavigation = new stdClass();
            $pageNavigation->pages = round((($this->_iListSize - 1) / $adminListSize) + 0.5, 0);
            $pageNavigation->actpage = ($pageNavigation->actpage > $pageNavigation->pages) ? $pageNavigation->pages : round(
                ($this->_iCurrListPos / $adminListSize) + 0.5,
                0
            );
            $pageNavigation->lastlink = ($pageNavigation->pages - 1) * $adminListSize;
            $pageNavigation->nextlink = null;
            $pageNavigation->backlink = null;

            $position = $this->_iCurrListPos + $adminListSize;
            if ($position < $this->_iListSize) {
                $pageNavigation->nextlink = $position = $this->_iCurrListPos + $adminListSize;
            }

            if (($this->_iCurrListPos - $adminListSize) >= 0) {
                $pageNavigation->backlink = $position = $this->_iCurrListPos - $adminListSize;
            }

            // calculating list start position
            $start = $pageNavigation->actpage - 5;
            $start = ($start <= 0) ? 1 : $start;

            // calculating list end position
            $end = $pageNavigation->actpage + 5;
            $end = ($end < $start + 10) ? $start + 10 : $end;
            $end = ($end > $pageNavigation->pages) ? $pageNavigation->pages : $end;

            // once again adjusting start pos ..
            $start = ($end - 10 > 0) ? $end - 10 : $start;
            $start = ($pageNavigation->pages <= 11) ? 1 : $start;

            // navigation urls
            for ($i = $start; $i <= $end; $i++) {
                $page = new stdclass();
                $page->selected = 0;
                if ($i == $pageNavigation->actpage) {
                    $page->selected = 1;
                }
                $pageNavigation->changePage[$i] = $page;
            }

            $this->_aViewData['pagenavi'] = $pageNavigation;

            if (isset($this->_iOverPos)) {
                $position = $this->_iOverPos;
                $this->_iOverPos = null;
            } else {
                $position = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('lstrt');
            }

            if (!$position) {
                $position = 0;
            }

            $this->_aViewData['lstrt'] = $position;
            $this->_aViewData['listsize'] = $this->_iListSize;
            $showNavigation = true;
        }

        // determine not used space in List
        $listSizeToShow = $this->_iListSize - $this->_iCurrListPos;
        $adminListSize = $this->_getViewListSize();
        $notUsed = $adminListSize - min($listSizeToShow, $adminListSize);
        $space = $notUsed * 15;

        if (!$showNavigation) {
            $space += 20;
        }

        $this->_aViewData['iListFillsize'] = $space;
    }
1260612
def setup_parameters(self):
        """"""
        t = self.template
        parameters = self.get_parameter_definitions()

        if not parameters:
            logger.debug("No parameters defined.")
            return

        for name, attrs in parameters.items():
            p = build_parameter(name, attrs)
            t.add_parameter(p)
702466
def set_lane_list(self, value):
        
        if value is None or not isinstance(value, list):
            raise TypeError("LaneList new value must be a list")
        else:
            for element in value:
                if not isinstance(element, lane.Lane):
                    raise TypeError("LaneList elements in variable must be of Lane class")
            self.__lane_list = value
900852
def common_cli_list_options(f):
    """"""

    @click.option(
        "-p",
        "--page",
        default=1,
        type=int,
        help="The page to view for lists, where 1 is the first page",
        callback=validators.validate_page,
    )
    @click.option(
        "-l",
        "--page-size",
        default=30,
        type=int,
        help="The amount of items to view per page for lists.",
        callback=validators.validate_page_size,
    )
    @click.pass_context
    @functools.wraps(f)
    def wrapper(ctx, *args, **kwargs):
        # pylint: disable=missing-docstring
        opts = config.get_or_create_options(ctx)
        kwargs["opts"] = opts
        return ctx.invoke(f, *args, **kwargs)

    return wrapper
462663
def set_parameters(self,parameters):
        
        
        for key,value in list(parameters.items()):
            if key in self.parameters:
                self.parameters[key] = value
107103
public void addNavButtons()
    {
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, UserGroup.USER_ICON, UserGroup.USER_DETAIL, null);
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.FORMDETAIL, MenuConstants.FORMDETAIL, null);
        super.addNavButtons();
    }
901705
def __create_lists_for_nav_bar(self):
        """"""
        
        nav_bar_section = []
        nav_bar_section_page = []
        for key in self.sections:
            nav_bar_section.append(key)
            nav_bar_page = []
            for page in self.sections[key].pages:
                nav_bar_page.append(page)
            nav_bar_section_page.append(nav_bar_page)
        
        nav_bar_section_page_len = [len(x) for x in nav_bar_section_page]
        
        self.nav_bar_section_page = nav_bar_section_page # create a variable for later
        
        # nav_bar_page is a list of lists
        return nav_bar_section, nav_bar_section_page, nav_bar_section_page_len
425901
public void addNavButtons()
    {
        SCannedBox box = new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.FORM, MenuConstants.FORMLINK, null);
        box.setRequestFocusEnabled(false);
        if ((m_iDisplayFieldDesc & ScreenConstants.SELECT_MODE) == ScreenConstants.SELECT_MODE)
            new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.SELECT, MenuConstants.SELECT, null);
    }
3757
@Override
	protected void initEvalParams() {
		_sParam = new BackwardEvalParam(_acronym._shortForm);
		_lParam = new BackwardEvalParam(_acronym._longForm);
		_partialWordParam = null;
	}
952396
def apply_scopes(params = nil, pagination = true)
      raise ::AbstractController::ActionNotFound.new("List config is turn off") if without_index?
      params ||= @request_params
      
      scope = default_scope(params)

      if current_list == :tree
        scope = scope.roots
      elsif pagination
        scope = page_scope(scope, params[:page], params[:per])
      end

      scope
    end
986803
def update_list(self):
        """"""
        self.listwidget.clear()
        for name in self.pathlist+self.ro_pathlist:
            item = QListWidgetItem(name)
            item.setIcon(ima.icon('DirClosedIcon'))
            if name in self.ro_pathlist:
                item.setFlags(Qt.NoItemFlags | Qt.ItemIsUserCheckable)
                item.setCheckState(Qt.Checked)
            elif name in self.not_active_pathlist:
                item.setFlags(item.flags() | Qt.ItemIsUserCheckable)
                item.setCheckState(Qt.Unchecked)
            else:
                item.setFlags(item.flags() | Qt.ItemIsUserCheckable)
                item.setCheckState(Qt.Checked)
            self.listwidget.addItem(item)
        self.refresh()
511193
function (navigationInstruction, callbackName, list, router) {
        if (list === void 0) { list = []; }
        var plan = navigationInstruction.plan;
        Object
            .keys(plan)
            .forEach(function (viewPortName) {
            var viewPortPlan = plan[viewPortName];
            var viewPortInstruction = navigationInstruction.viewPortInstructions[viewPortName];
            var viewPortComponent = viewPortInstruction.component;
            var viewModel = viewPortComponent.viewModel;
            if ((viewPortPlan.strategy === activationStrategy.invokeLifecycle
                || viewPortPlan.strategy === activationStrategy.replace)
                && callbackName in viewModel) {
                list.push({
                    viewModel: viewModel,
                    lifecycleArgs: viewPortInstruction.lifecycleArgs,
                    router: router
                });
            }
            var childNavInstruction = viewPortPlan.childNavigationInstruction;
            if (childNavInstruction) {
                findActivatable(childNavInstruction, callbackName, list, viewPortComponent.childRouter || router);
            }
        });
        return list;
    }
800630
function navigation(summary, files) {
    // Support single files as well as list
    files = _.isArray(files) ? files : (_.isString(files) ? [files] : null);

    // List of all navNodes
    // Flatten chapters
    var navNodes = flattenChapters(summary.chapters);

    // Mapping of prev/next for a give path
    var mapping = _.chain(navNodes)
    .map(function(current, i) {
        var prev = null, next = null;

        // Skip if no path
        if(!current.exists) return null;

        // Find prev
        prev = _.chain(navNodes.slice(0, i))
            .reverse()
            .find(function(node) {
                return node.exists && !node.external;
            })
            .value();

        // Find next
        next = _.chain(navNodes.slice(i+1))
            .find(function(node) {
                return node.exists && !node.external;
            })
            .value();

        return [current.path, {
            index: i,
            title: current.title,
            introduction: current.introduction,
            prev: prev,
            next: next,
            level: current.level,
        }];
    })
    .compact()
    .object()
    .value();

    // Filter for only files we want
    if(files) {
        return _.pick(mapping, files);
    }

    return mapping;
}
1292817
public void setItemList(FSArray v) {
    if (List_Type.featOkTst && ((List_Type)jcasType).casFeat_itemList == null)
      jcasType.jcas.throwFeatMissing("itemList", "de.julielab.jules.types.List");
    jcasType.ll_cas.ll_setRefValue(addr, ((List_Type)jcasType).casFeatCode_itemList, jcasType.ll_cas.ll_getFSRef(v));}
20785
private static void setListParam(Field field, List<?> values) {
        try {
            // Find method: clear() and call it
            Class<?> fieldClass = field.getType();
            Method clearMethod = fieldClass.getMethod("clear");
            clearMethod.invoke(field.get(config));
            
            // Find List method: add(Object) 
            Method addMethod = fieldClass.getMethod("add", Object.class);
            
            // Add each map key/value to field value
            for (Object subParam : values) {
                if (subParam instanceof String) {
                    addMethod.invoke(field.get(config), subParam);
                } else {
                    throw new RuntimeException("Unexpected parameter type for '" + field.getName() + ":" + subParam);
                }
            }
        } catch (NoSuchMethodException  | IllegalArgumentException | InvocationTargetException | IllegalAccessException e) {
            throw new RuntimeException("Error setting configuration parameter '" + field.getName() + "'", e);
        }
    }
1127282
def _set_params(self, p):
        
        if self.force_norm:
            params = [value.n for key, value in p.items()]
        else:
            params = [value for key, value in p.items()]
        return params
479031
protected function _setSortingParameters()
    {
        $sSortingParameters = $this->getViewParameter('sorting');
        if ($sSortingParameters) {
            list($sSortBy, $sSortDir) = explode('|', $sSortingParameters);
            $this->setItemSorting($this->getSortIdent(), $sSortBy, $sSortDir);
        }
    }