Property to provide reference to `BIOSSettings` instance

        It is calculated once when the first time it is queried. On refresh,
        this property gets reset.
975496
def bios_settings(self):
        
        return bios.BIOSSettings(
            self._conn, utils.get_subresource_path_by(self, 'Bios'),
            redfish_version=self.redfish_version)
11221
def update(self, reset=True):
        
        if self.parent.info.dataset is not None:
            # read from the dataset, if available
            header = self.parent.info.dataset.header
            maximum = header['n_samples'] / header['s_freq']  # in s
            self.minimum = 0
            self.maximum = maximum
            self.start_time = self.parent.info.dataset.header['start_time']

        elif self.parent.notes.annot is not None:
            # read from annotations
            annot = self.parent.notes.annot
            self.minimum = annot.first_second
            self.maximum = annot.last_second
            self.start_time = annot.start_time

        # make it time-zone unaware
        self.start_time = self.start_time.replace(tzinfo=None)

        if reset:
            self.parent.value('window_start', 0)  # the only value that is reset

        self.display()
921285
public int refreshToCurrent(int iChangeType, boolean bWarningIfChanged)
    {
        try {
            if ((this.getEditMode() == Constants.EDIT_CURRENT)
                || (this.getEditMode() == Constants.EDIT_IN_PROGRESS))
            {
                Object bookmark = this.getCounterField().getData();
                if (bookmark != null)
                {
                    int iOldOpenMode = this.getOpenMode();
                    this.setOpenMode(Constants.OPEN_REFRESH_TO_CURRENT | (iOldOpenMode/* & Constants.LOCK_TYPE_MASK*/)); // This is only trigger server listeners for changes
                    
                    // First step - backup the current data
                    int iFieldsTypes = BaseBuffer.ALL_FIELDS;
                    BaseBuffer buffer = new VectorBuffer(null, iFieldsTypes);
                    buffer.fieldsToBuffer(this, iFieldsTypes);

                    boolean rgbModified[] = null;
                    if ((iChangeType != Constants.AFTER_DELETE_TYPE)
                        && (this.isModified()))
                    {
                        boolean bLockRecord = this.getEditMode() == Constants.EDIT_IN_PROGRESS;
                        // Second step, save which fields have been modified.
                        rgbModified = new boolean[this.getFieldCount()];
                        for (int iFieldSeq = 0; iFieldSeq < this.getFieldCount(); iFieldSeq++)
                        {
                            rgbModified[iFieldSeq] = this.getField(iFieldSeq).isModified();
                        }
                        // Third step - refresh the record
                        String strOldKey = this.getKeyName();
                        this.setKeyName(Constants.PRIMARY_KEY);
                        this.getCounterField().setData(bookmark);
                        boolean bSuccess = this.getTable().seek(null);
                        this.setKeyName(strOldKey);
                        // Forth step - Move the changed fields to the refreshed record
                        if (!bSuccess)
                            this.getTable().addNew();
                        else
                        {
                            if (bLockRecord)
                                this.getTable().edit();    // If I haven't changed any data, just refresh it.
                            buffer.resetPosition();
                            for (int iFieldSeq = 0; iFieldSeq < this.getFieldCount(); iFieldSeq++)
                            {
                                Object dataScreen = buffer.getNextData();
                                if (rgbModified[iFieldSeq])
                                {
                                    FieldInfo field = this.getField(iFieldSeq);
                                    Object dataUpdated = field.getData();
                                    if (((dataUpdated != null) && (!dataUpdated.equals(dataScreen)))
                                        || ((dataUpdated == null) && (dataScreen != dataUpdated)))
                                            field.setData(dataScreen);
                                }
                            }
                        }
                    }
                    else
                    {
                        this.getTable().addNew();    // Clear current bookmark
                        if (iChangeType != Constants.AFTER_DELETE_TYPE)
                        {
                            String strOldKey = this.getKeyName();
                            this.setKeyName(Constants.PRIMARY_KEY);
                            this.getCounterField().setData(bookmark);
                            this.getTable().seek(null);
                            this.setKeyName(strOldKey);
                        }
                    }
                    this.setOpenMode(iOldOpenMode);
                    buffer.resetPosition();
                    for (int iFieldSeq = 0; iFieldSeq < this.getFieldCount(); iFieldSeq++)
                    {
                        FieldInfo field = this.getField(iFieldSeq);
                        boolean bIsModified = false;
                        if (rgbModified != null)
                            if (rgbModified[iFieldSeq] == false)
                                bIsModified = field.isModified();   // If it wasn't modified until now, flag it.

                        Object dataScreen = buffer.getNextData();
                        Object dataUpdated = field.getData();
                        if (((dataUpdated != null) && (!dataUpdated.equals(dataScreen)))
                            || ((dataUpdated == null) && (dataScreen != dataUpdated)))
                                bIsModified = true;     // Changed somewhere else, better call fieldChanged just in case I read secondary or something.
                        if (bIsModified)
                        {
                            if ((this.getField(iFieldSeq).isVirtual())
                                && (!this.getField(iFieldSeq).isModified())
                                    && (this.getField(iFieldSeq).getData() == this.getField(iFieldSeq).getDefault()))
                            {   // Virtual fields that were not changed, need to be returned to their former value
                                this.getField(iFieldSeq).setData(dataScreen);
                                this.getField(iFieldSeq).setModified(false);
                            }
//                            else
//                                this.getFieldInfo(iFieldSeq).handleFieldChanged(true, Constants.SCREEN_MOVE); // Typical
                        }
                    }
                }
            }
        } catch (DBException ex) {
            ex.printStackTrace();
        }
        return Constants.NORMAL_RETURN;
    }
84868
function refreshInstance (
  instanceId,
  data
) {
  var instance = instanceOptions[instanceId];
  if (!instance || !(instance.app instanceof instance.Vue)) {
    return new Error(("refreshInstance: instance " + instanceId + " not found!"))
  }
  if (instance.Vue && instance.Vue.set) {
    for (var key in data) {
      instance.Vue.set(instance.app, key, data[key]);
    }
  }
  // Finally `refreshFinish` signal needed.
  instance.document.taskCenter.send('dom', { action: 'refreshFinish' }, []);
}
947933
async function oneBehindFetch(input, init) {
  let cachedResponse = cache.get(input);
  if (!cachedResponse) {
    cachedResponse = {
      maxAge: Promise.resolve(MaxAge.zero()),
    };
    cache.set(input, cachedResponse);
  }
  const maxAge = await cachedResponse.maxAge;
  if (!maxAge.isExpired()) {
    // we have to clone the response to enable multiple reads
    const response = await cachedResponse.responsePromise;
    return response.clone();
  }
  const staleResponsePromise = cachedResponse.responsePromise;
  const newResponsePromise = fetch(input, init);
  cachedResponse = {
    responsePromise: newResponsePromise,
    maxAge: newResponsePromise.then(
        (response) => MaxAge.parse(response.headers.get('cache-control'))
    ),
  };
  cache.set(input, cachedResponse);
  const result = staleResponsePromise || newResponsePromise;
  // we have to clone the response to enable multiple reads
  const response = await result;
  return response.clone();
}
1334237
private boolean ensureHiveTableExistenceBeforeAlternation(String tableName, String dbName, IMetaStoreClient client,
      Table table, HiveSpec spec) throws TException{
    try (AutoCloseableLock lock = this.locks.getTableLock(dbName, tableName)) {
      try {
        try (Timer.Context context = this.metricContext.timer(CREATE_HIVE_TABLE).time()) {
          client.createTable(getTableWithCreateTimeNow(table));
          log.info(String.format("Created Hive table %s in db %s", tableName, dbName));
          return true;
        } catch (AlreadyExistsException e) {
        }
      }catch (TException e) {
        log.error(
            String.format("Unable to create Hive table %s in db %s: " + e.getMessage(), tableName, dbName), e);
        throw e;
      }

      log.info("Table {} already exists in db {}.", tableName, dbName);
      try {
        HiveTable existingTable;
        try (Timer.Context context = this.metricContext.timer(GET_HIVE_TABLE).time()) {
          existingTable = HiveMetaStoreUtils.getHiveTable(client.getTable(dbName, tableName));
        }
        if (needToUpdateTable(existingTable, spec.getTable())) {
          try (Timer.Context context = this.metricContext.timer(ALTER_TABLE).time()) {
            client.alter_table(dbName, tableName, getNewTblByMergingExistingTblProps(table, existingTable));
          }
          log.info(String.format("updated Hive table %s in db %s", tableName, dbName));
        }
      } catch (TException e2) {
        log.error(
            String.format("Unable to create or alter Hive table %s in db %s: " + e2.getMessage(), tableName, dbName),
            e2);
        throw e2;
      }
      // When the logic up to here it means table already existed in db and alteration happen. Return false.
      return false;
    }
  }
160362
public final void onRefreshEvent(RefreshEvent event) {
        Map<String, Object> changes = event.getSource();
        if (changes == RefreshEvent.ALL_KEYS) {
            disposeOfAllBeans();
            refreshAllConfigurationProperties();
        } else {
            disposeOfBeanSubset(changes.keySet());
            refreshSubsetOfConfigurationProperties(changes.keySet());
        }
    }
927138
function ( oCache )
	{
		var s = this.fnGetSettings();
		var nTable = oCache.nNode;

		/* Set the wrapper width to match that of the cloned table */
		oCache.nWrapper.style.width = $(s.nTable).outerWidth()+"px";

		/* Remove any children the cloned table has */
		while ( nTable.childNodes.length > 0 )
		{
			nTable.removeChild( nTable.childNodes[0] );
		}

		/* Clone the DataTables footer */
		var nTfoot = $('tfoot', s.nTable).clone(true)[0];
		nTable.appendChild( nTfoot );

		/* Copy the widths across - apparently a clone isn't good enough for this */
		$("tfoot:eq(0)>tr th", s.nTable).each( function (i) {
			$("tfoot:eq(0)>tr th:eq("+i+")", nTable).width( $(this).width() );
		} );

		$("tfoot:eq(0)>tr td", s.nTable).each( function (i) {
			$("tfoot:eq(0)>tr td:eq("+i+")", nTable).width( $(this).width() );
		} );
	}
230840
def _refreshNodeFromTarget(self):
        
        tableModel = self.tableInspector.model

        # Disable row height and column with settings for large headers (too slow otherwise)
        if tableModel.rowCount() >= RESET_HEADERS_AT_SIZE:
            self.autoRowHeightCti.data = False
            self.model.emitDataChanged(self.autoRowHeightCti)
            self.autoRowHeightCti.enable = False
        else:
            self.autoRowHeightCti.enable = True

        if tableModel.columnCount() >= RESET_HEADERS_AT_SIZE:
            self.autoColWidthCti.data  = False
            self.model.emitDataChanged(self.autoColWidthCti)
            self.autoColWidthCti.enable = False
        else:
            self.autoColWidthCti.enable = True
167297
public void reset() {

        if (refCount.get() > 0 && isRefCountingEnabled()) {
            Tr.warning(tc, "reset called on " + id + " with a refCount of " + refCount);
            Thread.dumpStack();
        }

        cacheName = null;
        drsClock = -1;
        timeStamp = -1;
        serializedId = null;
        id = null;
        if (useByteBuffer && this.value != null) {
            if (this.value instanceof DistributedNioMapObject) {
                ((DistributedNioMapObject) this.value).release();
            }
        }
        serializedValue = null;
        value = null;
        clock = CacheConfig.DEFAULT_PRIORITY;
        refCount.set(0);
        priority = CacheConfig.DEFAULT_PRIORITY;
        timeLimit = -1;
        inactivity = -1;
        expirationTime = -1;
        validatorExpirationTime = -1;
        removeWhenUnpinned = false;
        _templates = EMPTY_STRING_ARRAY;
        _dataIds = EMPTY_OBJECT_ARRAY;
        _serializedDataIds = null;
        pendingRemoval = false;
        sharingPolicy = EntryInfo.NOT_SHARED;
        persistToDisk = true;
        isOverflowEntry = false;
        lruEvicted = false;
        lruHead = null;
        useByteBuffer = false;
        aliasList = EMPTY_OBJECT_ARRAY;
        serializedAliasList = null;
        userMetaData = null;
        serializedUserMetaData = null;
        loadedFromDisk = false;
        cacheType = CACHE_TYPE_DEFAULT;
        skipValueSerialized = false;
        skipMemoryAndWriteToDisk = false;
        skipMemoryAndWriteToDiskErrorCode = HTODDynacache.NO_EXCEPTION;
        valueHashcode = 0;
        externalCacheGroupId = null;
    }
596270
def populateFromRow(self, callSetRecord):
        
        self._biosampleId = callSetRecord.biosampleid
        self.setAttributesJson(callSetRecord.attributes)
328083
def refresh(self, datasource_names, merge_flag, refreshAll):
        
        session = db.session
        ds_list = (
            session.query(DruidDatasource)
            .filter(DruidDatasource.cluster_name == self.cluster_name)
            .filter(DruidDatasource.datasource_name.in_(datasource_names))
        )
        ds_map = {ds.name: ds for ds in ds_list}
        for ds_name in datasource_names:
            datasource = ds_map.get(ds_name, None)
            if not datasource:
                datasource = DruidDatasource(datasource_name=ds_name)
                with session.no_autoflush:
                    session.add(datasource)
                flasher(
                    _('Adding new datasource [{}]').format(ds_name), 'success')
                ds_map[ds_name] = datasource
            elif refreshAll:
                flasher(
                    _('Refreshing datasource [{}]').format(ds_name), 'info')
            else:
                del ds_map[ds_name]
                continue
            datasource.cluster = self
            datasource.merge_flag = merge_flag
        session.flush()

        # Prepare multithreaded executation
        pool = ThreadPool()
        ds_refresh = list(ds_map.values())
        metadata = pool.map(_fetch_metadata_for, ds_refresh)
        pool.close()
        pool.join()

        for i in range(0, len(ds_refresh)):
            datasource = ds_refresh[i]
            cols = metadata[i]
            if cols:
                col_objs_list = (
                    session.query(DruidColumn)
                    .filter(DruidColumn.datasource_id == datasource.id)
                    .filter(DruidColumn.column_name.in_(cols.keys()))
                )
                col_objs = {col.column_name: col for col in col_objs_list}
                for col in cols:
                    if col == '__time':  # skip the time column
                        continue
                    col_obj = col_objs.get(col)
                    if not col_obj:
                        col_obj = DruidColumn(
                            datasource_id=datasource.id,
                            column_name=col)
                        with session.no_autoflush:
                            session.add(col_obj)
                    col_obj.type = cols[col]['type']
                    col_obj.datasource = datasource
                    if col_obj.type == 'STRING':
                        col_obj.groupby = True
                        col_obj.filterable = True
                datasource.refresh_metrics()
        session.commit()
1269573
void reset(com.ibm.wsspi.bytebuffer.WsByteBuffer buff, RichByteBufferPool p)
   {
      this.buffer = buff;
      this.pool = p;
   }
942084
@SuppressWarnings("FutureReturnValueIgnored")
  void refreshIfNeeded(Node<K, V> node, long now) {
    if (!refreshAfterWrite()) {
      return;
    }
    K key;
    V oldValue;
    long oldWriteTime = node.getWriteTime();
    long refreshWriteTime = (now + ASYNC_EXPIRY);
    if (((now - oldWriteTime) > refreshAfterWriteNanos())
        && ((key = node.getKey()) != null) && ((oldValue = node.getValue()) != null)
        && node.casWriteTime(oldWriteTime, refreshWriteTime)) {
      try {
        CompletableFuture<V> refreshFuture;
        long startTime = statsTicker().read();
        if (isAsync) {
          @SuppressWarnings("unchecked")
          CompletableFuture<V> future = (CompletableFuture<V>) oldValue;
          if (Async.isReady(future)) {
            @SuppressWarnings("NullAway")
            CompletableFuture<V> refresh = future.thenCompose(value ->
              cacheLoader.asyncReload(key, value, executor));
            refreshFuture = refresh;
          } else {
            // no-op if load is pending
            node.casWriteTime(refreshWriteTime, oldWriteTime);
            return;
          }
        } else {
          @SuppressWarnings("NullAway")
          CompletableFuture<V> refresh = cacheLoader.asyncReload(key, oldValue, executor);
          refreshFuture = refresh;
        }
        refreshFuture.whenComplete((newValue, error) -> {
          long loadTime = statsTicker().read() - startTime;
          if (error != null) {
            logger.log(Level.WARNING, "Exception thrown during refresh", error);
            node.casWriteTime(refreshWriteTime, oldWriteTime);
            statsCounter().recordLoadFailure(loadTime);
            return;
          }

          @SuppressWarnings("unchecked")
          V value = (isAsync && (newValue != null)) ? (V) refreshFuture : newValue;

          boolean[] discard = new boolean[1];
          compute(key, (k, currentValue) -> {
            if (currentValue == null) {
              return value;
            } else if ((currentValue == oldValue) && (node.getWriteTime() == refreshWriteTime)) {
              return value;
            }
            discard[0] = true;
            return currentValue;
          }, /* recordMiss */ false, /* recordLoad */ false, /* recordLoadFailure */ true);

          if (discard[0] && hasRemovalListener()) {
            notifyRemoval(key, value, RemovalCause.REPLACED);
          }
          if (newValue == null) {
            statsCounter().recordLoadFailure(loadTime);
          } else {
            statsCounter().recordLoadSuccess(loadTime);
          }
        });
      } catch (Throwable t) {
        node.casWriteTime(refreshWriteTime, oldWriteTime);
        logger.log(Level.SEVERE, "Exception thrown when submitting refresh task", t);
      }
    }
  }
29685
function reset() {
    var data,
        event,
        me = this,
        index = 0,
        changes = { 'length': 0 },
        queue = { 'length': 0 };

    if (me.running && !calledBy.abort) {
      // no worries, `reset()` is called within `abort()`
      calledBy.reset = true;
      me.abort();
      delete calledBy.reset;
    }
    else {
      // a non-recursive solution to check if properties have changed
      // http://www.jslab.dk/articles/non.recursive.preorder.traversal.part4
      data = { 'destination': me, 'source': extend({}, me.constructor.prototype, me.options) };
      do {
        forOwn(data.source, function(value, key) {
          var changed,
              destination = data.destination,
              currValue = destination[key];

          if (value && typeof value == 'object') {
            if (isClassOf(value, 'Array')) {
              // check if an array value has changed to a non-array value
              if (!isClassOf(currValue, 'Array')) {
                changed = currValue = [];
              }
              // or has changed its length
              if (currValue.length != value.length) {
                changed = currValue = currValue.slice(0, value.length);
                currValue.length = value.length;
              }
            }
            // check if an object has changed to a non-object value
            else if (!currValue || typeof currValue != 'object') {
              changed = currValue = {};
            }
            // register a changed object
            if (changed) {
              changes[changes.length++] = { 'destination': destination, 'key': key, 'value': currValue };
            }
            queue[queue.length++] = { 'destination': currValue, 'source': value };
          }
          // register a changed primitive
          else if (value !== currValue && !(value == null || isClassOf(value, 'Function'))) {
            changes[changes.length++] = { 'destination': destination, 'key': key, 'value': value };
          }
        });
      }
      while ((data = queue[index++]));

      // if changed emit the `reset` event and if it isn't cancelled reset the benchmark
      if (changes.length && (me.emit(event = Event('reset')), !event.cancelled)) {
        forEach(changes, function(data) {
          data.destination[data.key] = data.value;
        });
      }
    }
    return me;
  }
865213
synchronized void refresh() {
    if(reinitOnRefresh) {
      LOG.debug("Reinitialize in thread " + Thread.currentThread().getName());
      reinitialize();
      reinitOnRefresh = false;
      return;
    }
    synchronized(plot) {
      boolean refreshcss = false;
      if(plotmap == null) {
        throw new IllegalStateException("Plotmap is null");
      }
      final int thumbsize = (int) Math.max(screenwidth / plotmap.getWidth(), screenheight / plotmap.getHeight());
      for(PlotItem pi : plotmap.keySet()) {
        for(Iterator<PlotItem> iter = pi.itemIterator(); iter.hasNext();) {
          PlotItem it = iter.next();

          for(Iterator<VisualizationTask> tit = it.tasks.iterator(); tit.hasNext();) {
            VisualizationTask task = tit.next();
            Pair<Element, Visualization> pair = vistoelem.get(it, task);
            // New task?
            if(pair == null) {
              if(visibleInOverview(task)) {
                Element elem = plot.svgElement(SVGConstants.SVG_G_TAG);
                pair = new Pair<>(elem, embedOrThumbnail(thumbsize, it, task, elem));
                vistoelem.get(it, null).first.appendChild(elem);
                vistoelem.put(it, task, pair);
                refreshcss = true;
              }
            }
            else if(pair.first != null) {
              if(visibleInOverview(task)) {
                // unhide if hidden.
                if(pair.first.hasAttribute(SVGConstants.CSS_VISIBILITY_PROPERTY)) {
                  pair.first.removeAttribute(SVGConstants.CSS_VISIBILITY_PROPERTY);
                }
              }
              else {
                // hide if there is anything to hide.
                if(pair.first.hasChildNodes()) {
                  pair.first.setAttribute(SVGConstants.CSS_VISIBILITY_PROPERTY, SVGConstants.CSS_HIDDEN_VALUE);
                }
              }
              // TODO: unqueue pending thumbnails
            }
          }
        }
      }
      if(refreshcss) {
        plot.updateStyleElement();
      }
    }
  }
224793
public void refresh() {
    File configFile = new File(CONFIG_FILE_PATH);

    if (!configFile.exists()) {
      BufferedWriter writer = null;
      BufferedReader reader = null;
      try {
        configFile.createNewFile();
        InputStream in = Chemistry.class.getResourceAsStream("/org/helm/notation2/resources/MonomerStoreConfig.properties");
        reader = new BufferedReader(new InputStreamReader(in));

        writer = new BufferedWriter(new FileWriter(configFile));
        String line;
        while ((line = reader.readLine()) != null) {
          writer.write(line + System.getProperty("line.separator"));
        }

      } catch (Exception e) {
        resetConfigToDefault();
        e.printStackTrace();

      } finally {
        try {
          if (writer != null) {
            writer.close();
          }
          if (reader != null) {
            reader.close();
          }
        } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
    }

    try

    {
      PropertiesConfiguration conf = new PropertiesConfiguration(CONFIG_FILE_PATH);
      isUseWebservice = conf.getBoolean(USE_WEBSERVICE);
      isUpdateAutomatic = conf.getBoolean(UPDATE_AUTOMATIC);
      webserviceMonomersURL = conf.getString(WEBSERVICE_MONOMERS_URL);
      webserviceMonomersPath = conf.getString(WEBSERVICE_MONOMERS_PATH);
      webserviceMonomersPutPath = conf.getString(WEBSERVICE_MONOMERS_PUT_PATH);
      webserviceNucleotidesURL = conf.getString(WEBSERVICE_NUCLEOTIDES_URL);
      webserviceNucleotidesPath = conf.getString(WEBSERVICE_NUCLEOTIDES_PATH);
      webserviceNucleotidesPutPath = conf.getString(WEBSERVICE_NUCLEOTIDES_PUT_PATH);
      webserviceEditorCategorizationURL = conf.getString(WEBSERVICE_EDITOR_CATEGORIZATION_URL);
      webserviceEditorCategorizationPath = conf.getString(WEBSERVICE_EDITOR_CATEGORIZATION_PATH);
 
      /* load from external xml file */
      isUseExternalMonomers = conf.getBoolean(USE_EXTERNAL_MONOMERS);
      externalMonomersPath = conf.getString(EXTERNAL_MONOMERS_PATH);
      isUseExternalNucleotides = conf.getBoolean(USE_EXTERNAL_NUCLEOTIDES);
      externalNucleotidesPath = conf.getString(EXTERNAL_NUCLEOTIDES_PATH);
      isUseExternalAttachments = conf.getBoolean(USE_EXTERNAL_ATTACHMENTS);
      externalAttachmentsPath = conf.getString(EXTERNAL_ATTACHMENTS_PATH);

    } catch (ConfigurationException | NoSuchElementException e) {
      resetConfigToDefault();
      e.printStackTrace();
    }

  }