check if there are toolbar items required
337499
function (cb) {

                formtoolsAPI.list.renderToolbarItems(req, res, req.params.model, function (err, result) {

                    if (err) {
                        return cb(err);
                    }

                    req.linz.model.list.toolbarItems = result;

                    return cb(null);

                });

            }
445523
def check_inclusions(item, included=[], excluded=[]):
    """"""
    if (len(included) == 0):
        if len(excluded) == 0 or item not in excluded:
            return True
        else:
            return False
    else:
        if item in included:
            return True
    return False
954415
public void addToolbarButtons(ToolScreen toolScreen)
    {
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, MenuConstants.FORMDETAIL, MenuConstants.FORMDETAIL, MenuConstants.FORMDETAIL, null);
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, UserGroup.USER_DETAIL, UserGroup.USER_ICON, UserGroup.USER_DETAIL, null);
    }
428591
def CheckTemplates(self, base_dir, version):
    """"""
    major_minor = ".".join(version.split(".")[0:2])
    templates = glob.glob(
        os.path.join(base_dir, "templates/*%s*.zip" % major_minor))
    required_templates = set(
        [x.replace("maj.minor", major_minor) for x in self.REQUIRED_TEMPLATES])

    # Client templates have an extra version digit, e.g. 3.1.0.0
    templates_present = set([
        re.sub(r"_%s[^_]+_" % major_minor, "_%s_" % major_minor,
               os.path.basename(x)) for x in templates
    ])

    difference = required_templates - templates_present
    if difference:
      raise RuntimeError("Missing templates %s" % difference)
658844
def check(self):
        

        #for path in self.path.values():
        #    if not os.path.exists(path):
        #        raise RuntimeError("File '{}' is missing".format(path))

        for tool in ('cd-hit', 'prank', 'hmmbuild', 'hmmpress', 'hmmscan', 'phmmer', 'mafft', 'meme'):
            if not self.pathfinder.exists(tool):
                raise RuntimeError("Dependency {} is missing".format(tool))
1011218
def Requires(self, target, prerequisite):
        """"""
        tlist = self.arg2nodes(target, self.fs.Entry)
        plist = self.arg2nodes(prerequisite, self.fs.Entry)
        for t in tlist:
            t.add_prerequisite(plist)
        return tlist
188900
def _check_if_used(self, removes):
        """"""
        if "--check-deps" in self.extra:
            package, dependency, pkg_dep = [], [], []
            for pkg in find_package("", self.dep_path):
                deps = Utils().read_file(self.dep_path + pkg)
                for rmv in removes:
                    if GetFromInstalled(rmv).name() and rmv in deps.split():
                        pkg_dep.append(
                            "{0} is dependency of the package --> {1}".format(
                                rmv, pkg))
                        package.append(pkg)
                        dependency.append(rmv)
            if package:
                if "--checklist" in self.extra:
                    text = ("Press 'spacebar' to choose packages for the remove"
                            " exception")
                    backtitle = "{0} {1}".format(self.meta.__all__,
                                                 self.meta.__version__)
                    status = False
                    choose = DialogUtil(pkg_dep, text, " !!! WARNING !!! ",
                                        backtitle, status).checklist()
                    for pkg in choose:
                        self.skip.append(pkg.split()[0])
                else:
                    self.msg.template(78)
                    print("| {0}{1}{2}".format(
                        self.meta.color["RED"], " " * 30 + "!!! WARNING !!!",
                        self.meta.color["ENDC"]))
                    self.msg.template(78)
                    for p, d in zip(package, dependency):
                        print("| {0}{1}{2} is dependency of the package --> "
                              "{3}{4}{5}".format(self.meta.color["YELLOW"], d,
                                                 self.meta.color["ENDC"],
                                                 self.meta.color["GREEN"], p,
                                                 self.meta.color["ENDC"]))
                    self.msg.template(78)
                    self._skip_remove()
194820
def show_minimum_needs_configuration(self):
        """"""
        # import here only so that it is AFTER i18n set up
        from safe.gui.tools.minimum_needs.needs_manager_dialog import (
            NeedsManagerDialog)

        dialog = NeedsManagerDialog(
            parent=self.iface.mainWindow(),
            dock=self.dock_widget)
        dialog.exec_()
845324
protected static function checkRequirements()
    {
        if (self::$enabledPharData === null || self::$enabledPearTar === null) {
            self::$enabledPearTar = class_exists('\Archive_Tar');
            self::$enabledPharData = class_exists('\PharData');
        }
    }
570211
function() {
    this.jsonInit({
      "message0": Blockly.Msg.LISTS_ISEMPTY_TITLE,
      "args0": [
        {
          "type": "input_value",
          "name": "VALUE",
          "check": ['String', 'Array']
        }
      ],
      "output": 'Boolean',
      "colour": Blockly.Blocks.lists.HUE,
      "tooltip": Blockly.Msg.LISTS_ISEMPTY_TOOLTIP,
      "helpUrl": Blockly.Msg.LISTS_ISEMPTY_HELPURL
    });
  }
724635
public static List<MenuItem> getVisibleMenuItemList(@NonNull Toolbar toolbar) {
        List<MenuItem> list = new ArrayList<>();
        for (int i = 0; i < toolbar.getChildCount(); i++) {
            final View v = toolbar.getChildAt(i);
            if (v instanceof ActionMenuView) {
                int childCount = ((ActionMenuView) v).getChildCount();
                for (int j = 0; j < childCount; j++) {
                    final View innerView = ((ActionMenuView) v).getChildAt(j);
                    if (innerView instanceof ActionMenuItemView) {
                        list.add(((ActionMenuItemView) innerView).getItemData());
                    }
                }
            }
        }
        return list;
    }
904069
function checkThreshold(item, ctx) {
		if (item.count >= item.opts.minRequestCount) {
			const rate = item.failures / item.count;
			if (rate >= item.opts.threshold)
				trip(item, ctx);
		}
	}
1044659
def check_deps(deps):
        """"""
        if not isinstance(deps, list):
            deps = [deps]
        checks = list(Environment.has_apps(deps))
        if not all(checks):
            for name, available in list(dict(zip(deps, checks)).items()):
                if not available:
                    error_msg = "The required application/dependency '{0}'" \
                                " isn't available.".format(name)
                    raise SystemError(error_msg)
906688
def _update_show_toolbars_action(self):
        """"""
        if self.toolbars_visible:
            text = _("Hide toolbars")
            tip = _("Hide toolbars")
        else:
            text = _("Show toolbars")
            tip = _("Show toolbars")
        self.show_toolbars_action.setText(text)
        self.show_toolbars_action.setToolTip(tip)
1049135
def check(cls):
        
        attribs = [
            'app_version',
            'app_name',
            'config_file_path',
            'config_sep_str',
        ]
        for attrib in attribs:
            if getattr(cls, attrib) == 'not_set':
                raise IncompleteSetupError(f'elib_config setup is incomplete; missing: {attrib}')
1105576
def is_required(action):
  ''' '''
  return not action.option_strings and not isinstance(action, _SubParsersAction) or action.required == True
349146
def OnFindToolbarToggle(self, event):
        """"""

        self.main_window.find_toolbar.SetGripperVisible(True)

        find_toolbar_info = self.main_window._mgr.GetPane("find_toolbar")

        self._toggle_pane(find_toolbar_info)

        event.Skip()