Gets the last saved value for the given preference
181810
def preference_was(name, group)
        preference_changed?(name, group) ? preferences_changed_group(group)[name] : preferred(name, group)
      end
1082866
def goto_last_item
      bc = @buttons.count
      f = nil
      @components[bc..-1].each { |c| 
        if c.focusable
          f = c
        end
      }
      if f
        leave_current_component
        @current_component = f
        set_form_row
      end
    end
584246
def last_written_time(self):
    """"""
    if not self._registry_key and self._registry:
      self._GetKeyFromRegistry()

    if not self._registry_key:
      return None

    return self._registry_key.last_written_time
334874
protected String getLastQueryParam() {

        String param = parseOptionalStringValue(m_configObject, JSON_KEY_LAST_QUERYPARAM);
        if (param == null) {
            return null != m_baseConfig
            ? m_baseConfig.getGeneralConfig().getLastQueryParam()
            : DEFAULT_LAST_QUERY_PARAM;
        } else {
            return param;
        }
    }
309176
def preference_value_changed?(name, old, value)
        definition = preference_definitions[name]
        if definition.type == :integer && (old.nil? || old == 0)
          # For nullable numeric columns, NULL gets stored in database for blank (i.e. '') values.
          # Hence we don't record it as a change if the value changes from nil to ''.
          # If an old value of 0 is set to '' we want this to get changed to nil as otherwise it'll
          # be typecast back to 0 (''.to_i => 0)
          value = nil if value.blank?
        else
          value = definition.type_cast(value)
        end
        
        old != value
      end
952870
def last_change(self):
        
        try:
            cdt = self.latest('created')
            udt = self.latest('updated')
            #print cdt, udt
            return max(cdt.created, udt.updated)

        except ObjectDoesNotExist:
            return None
301860
def last_modified(self):
        
        if self.entries:
            latest = max(self.entries, key=lambda x: x.last_modified)
            return arrow.get(latest.last_modified)
        return arrow.get()
103664
def last_modified():
    
    files = model.FileFingerprint.select().order_by(
        orm.desc(model.FileFingerprint.file_mtime))
    for file in files:
        return file.file_mtime, file.file_path
    return None, None
838323
public static String getPreference( String preferenceKey, String defaultValue ) {
        Preferences preferences = Preferences.userRoot().node(PREFS_NODE_NAME);
        String preference = preferences.get(preferenceKey, defaultValue);
        return preference;
    }
182440
protected long getLastModified(Resource resource) {
        try {
            return resource.lastModified();
        } catch (IOException e) {
            this.logger.warn(
                    "Could not determine lastModified for "
                            + resource
                            + ". This resource will never be reloaded due to lastModified changing.",
                    e);
        }

        return 0;
    }
1191246
def last(conf):
    """"""
    try:
        v2ex = V2ex(conf.config)
        v2ex.login()
        last_date = v2ex.get_last()
        click.echo(last_date)
    except KeyError:
        click.echo('Keyerror, please check your config file.')
    except IndexError:
        click.echo('Please check your username and password.')
951623
function preferences_save($p)
    {
        if ($p['section'] == 'enigma') {
            $p['prefs'] = array(
                'enigma_signatures'    => (bool) rcube_utils::get_input_value('_enigma_signatures', rcube_utils::INPUT_POST),
                'enigma_decryption'    => (bool) rcube_utils::get_input_value('_enigma_decryption', rcube_utils::INPUT_POST),
                'enigma_encryption'    => (bool) rcube_utils::get_input_value('_enigma_encryption', rcube_utils::INPUT_POST),
                'enigma_sign_all'      => (bool) rcube_utils::get_input_value('_enigma_sign_all', rcube_utils::INPUT_POST),
                'enigma_encrypt_all'   => (bool) rcube_utils::get_input_value('_enigma_encrypt_all', rcube_utils::INPUT_POST),
                'enigma_attach_pubkey' => (bool) rcube_utils::get_input_value('_enigma_attach_pubkey', rcube_utils::INPUT_POST),
                'enigma_password_time' => intval(rcube_utils::get_input_value('_enigma_password_time', rcube_utils::INPUT_POST)),
            );
        }

        return $p;
    }
891676
function preferencesReload() {
    return this.initializedPromise.then(function () {
      this._readFromStorage(DEFAULT_PREFERENCES).then(function(prefObj) {
        if (prefObj) {
          this.prefs = prefObj;
        }
      }.bind(this));
    }.bind(this));
  }
701394
function getPreferences() {
        // It's senseless to look prefs up for the current file, instead look them up for
        // the current project (or globally)
        return {
            closeBelow  : prefs.get("below",  PreferencesManager.CURRENT_PROJECT),
            closeOthers : prefs.get("others", PreferencesManager.CURRENT_PROJECT),
            closeAbove  : prefs.get("above",  PreferencesManager.CURRENT_PROJECT)
        };
    }
955309
def get_preferences(self, user=None):
        
        if user is None:
            user = current_user
        return {pref.key: pref.value for pref in user.preferences}
715760
private String getLastLoginMessage(Long inacTime) {

        int days = (int)(inacTime.longValue() / (1000 * 60 * 60 * 24));
        if (days == 0) {
            return CmsVaadinUtils.getMessageText(Messages.GUI_USER_INFO_LAST_LOGIN_LESS_A_DAY_0);
        }
        if (days == 1) {
            return CmsVaadinUtils.getMessageText(Messages.GUI_USER_INFO_LAST_LOGIN_YESTERDAY_0);
        }
        return CmsVaadinUtils.getMessageText(Messages.GUI_USER_INFO_LAST_LOGIN_DAYS_AGO_1, new Integer(days));
    }
497127
private String getValue(String key, String previousValue) {
        final String value;
        final String valueUpdated = toSave.getProperty(key);
        if (valueUpdated == null) {
            value = previousValue;
        } else {
            value = valueUpdated;
        }
        return value;
    }