Returns whether the field is visible in a given mode
426137
def isVisible(self, field, mode="view", default="visible"):
        
        if mode != "edit":
            return default

        # If this is a Secondary Analysis Request, this field is not editable
        if IAnalysisRequestSecondary.providedBy(self.context):
            return "invisible"

        return self.context.isOpen() and "visible" or "invisible"
45771
def detect_mode(cls, **params):
        
        modes = []
        for mode in cls.modes:
            if params.get(mode) is not None:
                modes.append(mode)
        if len(modes) > 1:
            error_message = 'ambiguous mode, must be one of {}'
            modes_csv = ', '.join(list(cls.modes))
            raise ValueError(error_message.format(modes_csv))
        return modes[0] if modes else cls.default_mode
1313578
public boolean recordVisibility(Visibility visibility) {
    if (currentInfo.getVisibility() == null) {
      populated = true;
      currentInfo.setVisibility(visibility);
      return true;
    } else {
      return false;
    }
  }
658718
def visible(self):
        
        if not self.in_workspace():
            return False

        if not self.context.join_policy == "self":
            return False

        user = api.user.get_current()
        workspace = IWorkspace(self.context.acquire_workspace())
        if user.getUserName() in workspace.members:
            return False

        return True
111525
def detect_mode(term_hint="xterm-256color"):
    """"""
    if "ANSICON" in os.environ:
        return 16
    elif os.environ.get("ConEmuANSI", "OFF") == "ON":
        return 256
    else:
        term = os.environ.get("TERM", term_hint)
        if term.endswith("-256color") or term in ("xterm", "screen"):
            return 256
        elif term.endswith("-color") or term in ("rxvt",):
            return 16
        else:
            return 256
1153167
public boolean getDisplayFieldDesc(ScreenField sField)
    {
        if (sField == this)
            return false; // Panels generally do not have descriptions
        if (sField instanceof SButtonBox)
            if (((SButtonBox)sField).getImageButtonName() != null)
                return false;    // Buttons don't need their field descriptions (if there is a icon) in base screens
        return true;    // But the controls in them generally do.
    }
572339
public boolean getDisplayFieldDesc(ScreenField sField)
    {
        boolean bDisplayDesc = ((m_iDisplayFieldDesc & ScreenConstants.DISPLAY_MASK) != ScreenConstants.DONT_DISPLAY_DESC);   // yes if yes, otherwise no!
        if (m_screenParent != null) if ((m_iDisplayFieldDesc & ScreenConstants.DISPLAY_MASK) == ScreenConstants.DEFAULT_DISPLAY)
            bDisplayDesc = m_screenParent.getDisplayFieldDesc(sField);
        return bDisplayDesc;
    }
1236645
def isVisible( self ):
        
        layer = self.layer()
        if layer and not layer.isVisible():
            return False
        
        return self._visible
843545
def visible(self):
        
        query_results = self.map(lambda el: el.is_displayed(), 'visible').results
        if query_results:
            return all(query_results)
        return False
336038
function(fieldName) {
                return _.has(this.filterableFields, fieldName) &&
                    !_.isUndefined(this.filterableFields[fieldName].displayName);
            }
938341
def mode(self):
        """"""
        mu = self.mean()
        sigma = self.std()
        ret_val = math.exp(mu - sigma**2)
        if math.isnan(ret_val):
            ret_val = float("inf")
        return ret_val
336489
def valid_modes(self):
        """"""
        default_mode = (self.mode,) if self.mode is not None else None
        return getattr(self, '_valid_mode', default_mode)
1013473
public function is_visible() {
        global $USER;

        $context = ($this->userid > 0) ? context_user::instance($this->userid) : context_system::instance();

        switch ($this->field->visible) {
            case PROFILE_VISIBLE_ALL:
                return true;
            case PROFILE_VISIBLE_PRIVATE:
                if ($this->is_signup_field() && (empty($this->userid) || isguestuser($this->userid))) {
                    return true;
                } else if ($this->userid == $USER->id) {
                    return true;
                } else {
                    return has_capability('moodle/user:viewalldetails', $context);
                }
            default:
                return has_capability('moodle/user:viewalldetails', $context);
        }
    }
951883
def visible(self, request):
        '''
        
        '''
        return self.apply_visible(self.get_queryset(), request) if self.check_visible(self.model, request) is not False else self.get_queryset().none()
116897
private boolean isTop(I_CmsFormField field) {

        String propName = field.getLayoutData().get(LD_PROPERTY);
        return m_individualDisplay.contains(propName) || m_sharedDisplay.contains(propName);
    }
460341
function (mode) {
            var state = this.state,
                val = parseFloat(mode);
            if (val) {
                return val;
            }
            if (mode === Crocodoc.ZOOM_FIT_WIDTH) {
                return state.viewportDimensions.clientWidth / state.widestPage.totalActualWidth;
            }
            else if (mode === Crocodoc.ZOOM_FIT_HEIGHT) {
                return state.viewportDimensions.clientHeight / state.tallestPage.totalActualHeight;
            }
            else if (mode === Crocodoc.ZOOM_AUTO) {
                return this.calculateZoomAutoValue();
            } else {
                return state.zoomState.zoom;
            }
        }
217638
def _is_visible(cls, property_name):
        
        if isinstance(property_name, list):
            return [cls._is_visible(p) for p in property_name]
        if property_name.startswith('__') and property_name.endswith('__'):
            return False
        return property_name.startswith(cls.STARTS_WITH) and property_name.endswith(cls.ENDS_WITH)