Refresh day btn tables
557038
@SuppressWarnings("deprecation")
    private void refreshDayBtns() {

        remove(daysPanel);

        daysPanel = new JPanel();

        daysPanel.removeAll();
        daysPanel.setLayout(new GridLayout(0, 7));

        int displayYear = getDisplayYear();
        int displayMonth = getDisplayMonth();
        String[] days = getDays(displayYear, displayMonth - 1);

        addDayHeadLabels();

        Date d = picker.getDate();

        Calendar cal = Calendar.getInstance();
        cal.setTime(d);
        int currentYear = cal.get(Calendar.YEAR);

        int currentMonth = cal.get(Calendar.MONTH);
        int currentDay = cal.get(Calendar.DAY_OF_MONTH);
        /*
         * Add days label before 1st
         */
        for (Date it : getBeforeDays(displayYear, displayMonth - 1)) {
            JLabel label = new JLabel(String.valueOf(it.getDate()));
            label.setVerticalAlignment(JLabel.CENTER);
            label.setHorizontalAlignment(JLabel.CENTER);
            label.setEnabled(false);
            daysPanel.add(label);
        }

        for (String it : days) {
            DayBtn btn = new DayBtn(it);
            if (displayYear == currentYear && displayMonth == currentMonth + 1 && currentDay == Integer.parseInt(it)) {
                btn.setBackground(Color.GRAY);
                btn.clicked = true;
            }

            dayBtns.add(btn);
            daysPanel.add(btn);
        }

        /*
         * Add days label after last day
         */
        for (Date it : getAfterDays(displayYear, displayMonth - 1)) {
            JLabel label = new JLabel(String.valueOf(it.getDate()));
            label.setVerticalAlignment(JLabel.CENTER);
            label.setHorizontalAlignment(JLabel.CENTER);
            daysPanel.add(label);
            label.setEnabled(false);
        }

        add(daysPanel);

        /*
         * Update ui
         */
        updateUI();
        if (picker.getPopup() != null) {
            Method method;
            try {
                method = Popup.class.getDeclaredMethod("pack");
                method.setAccessible(true);
                method.invoke(picker.getPopup());
            } catch (Exception e) {
            }
        }
    }
930770
async def _refresh_table(self):
        
        results = []
        for node_id in self.protocol.get_refresh_ids():
            node = Node(node_id)
            nearest = self.protocol.router.find_neighbors(node, self.alpha)
            spider = NodeSpiderCrawl(self.protocol, node, nearest,
                                     self.ksize, self.alpha)
            results.append(spider.find())

        # do our crawling
        await asyncio.gather(*results)

        # now republish keys older than one hour
        for dkey, value in self.storage.iter_older_than(3600):
            await self.set_digest(dkey, value)
885903
def refresh(self):
        """"""
        self._update_id_list()
        for _id in self.history[:]:
            if _id not in self.id_list:
                self.history.remove(_id)
1244371
public function Refresh()
    {
        $iPt = $this->getItemPointer();
        $this->GoToStart();
        while ($oTmp = $this->Next()) {
            if (false === $oTmp->sqlData || ($oTmp->dAmount <= 0)) {
                $this->RemoveArticle($oTmp);
            } else {
                // refresh stock from db
                $oTmp->RefreshDataFromDatabase();
            }
        }
        if ($iPt > $this->Length()) {
            $iPt = $this->Length();
        }
        $this->setItemPointer($iPt);
        $this->UpdateListData();
    }
536033
def make_timestamp_columns():
    """"""
    return (
        Column('created_at', DateTime, default=func.utcnow(), nullable=False),
        Column('updated_at', DateTime, default=func.utcnow(), onupdate=func.utcnow(), nullable=False),
    )
368566
protected function updateTimestamps()
    {
        if ($this->parent->timestamps)
        {
            $time = $this->freshTimestamp();

            $this->setUpdatedAt($time);

            if ( ! $this->exists())
            {
                $this->setCreatedAt($time);
            }
        }
    }
628837
def refresh(self, thread=None):
        """"""
        if not thread:
            thread = self._dbman._get_notmuch_thread(self._id)

        self._total_messages = thread.get_total_messages()
        self._notmuch_authors_string = thread.get_authors()

        subject_type = settings.get('thread_subject')
        if subject_type == 'notmuch':
            subject = thread.get_subject()
        elif subject_type == 'oldest':
            try:
                first_msg = list(thread.get_toplevel_messages())[0]
                subject = first_msg.get_header('subject')
            except IndexError:
                subject = ''
        self._subject = subject

        self._authors = None
        ts = thread.get_oldest_date()

        try:
            self._oldest_date = datetime.fromtimestamp(ts)
        except ValueError:  # year is out of range
            self._oldest_date = None
        try:
            timestamp = thread.get_newest_date()
            self._newest_date = datetime.fromtimestamp(timestamp)
        except ValueError:  # year is out of range
            self._newest_date = None

        self._tags = {t for t in thread.get_tags()}
        self._messages = {}  # this maps messages to its children
        self._toplevel_messages = []
1027352
protected function updateTimestamps()
    {
        $time = $this->freshTimestamp();

        if (! is_null(static::UPDATED_AT) && ! $this->hasChanged(static::UPDATED_AT)) {
            $this->setUpdatedAt($time);
        }

        if (! $this->exists && ! is_null(static::CREATED_AT) &&
            ! $this->hasChanged(static::CREATED_AT)) {
            $this->setCreatedAt($time);
        }
    }
230220
protected function updateTimestamps()
    {
        $time = $this->freshTimestamp();

        if (! is_null($column = $this->getUpdatedAtColumn()) && ! $this->isDirty($column)) {
            $this->setAttribute($column, $time);
        }

        if (! $this->exists && ! is_null($column = $this->getCreatedAtColumn()) && ! $this->isDirty($column)) {
            $this->setAttribute($column, $time);
        }
    }
571415
void refresh() {
    // Request latest expressions from the server
    try {
      HttpResponse res = client.get(uri)
          .withConnectTimeout(connectTimeout)
          .withReadTimeout(readTimeout)
          .addHeader("If-None-Match", etag)
          .send()
          .decompress();
      if (res.status() == 304) {
        LOGGER.debug("no modification to subscriptions");
      } else if (res.status() != 200) {
        LOGGER.warn("failed to update subscriptions, received status {}", res.status());
      } else {
        etag = res.header("ETag");
        payload = filterByStep(mapper.readValue(res.entity(), Subscriptions.class));
      }
    } catch (Exception e) {
      LOGGER.warn("failed to update subscriptions (uri={})", uri, e);
    }

    // Update with the current payload, it will be null if there hasn't been a single
    // successful request
    if (payload != null) {
      long now = clock.wallTime();
      payload.update(subscriptions, now, now + configTTL);
    }
  }
1044293
def list_tables(refresh=False, cache_file=None):
    
    # default cache listing all objects available is
    # ~/.bcdata
    if not cache_file:
        cache_file = os.path.join(str(Path.home()), ".bcdata")

    # regenerate the cache if:
    # - the cache file doesn't exist
    # - we force a refresh
    # - the cache is older than 1 month
    if refresh or check_cache(cache_file):
        wfs = WebFeatureService(url=bcdata.OWS_URL, version="2.0.0")
        bcdata_objects = [i.strip("pub:") for i in list(wfs.contents)]
        with open(cache_file, "w") as outfile:
            json.dump(sorted(bcdata_objects), outfile)
    else:
        with open(cache_file, "r") as infile:
            bcdata_objects = json.load(infile)

    return bcdata_objects
767320
def do_refresh(self,args):
        """"""
        self.wrappedStack = self.wrapStack(AwsConnectionFactory.instance.getCfResource().Stack(self.wrappedStack['rawStack'].name))
336864
def update_total(self, n=1):
    """"""
    with self._lock:
      self._pbar.total += n
      self.refresh()
1008277
def add_time_stamp(self, db_id, name):
        """"""
        with self.lock:
            self.cur.execute(
                'insert into "timestamps" ("job", "what")'
                'values (?, ?);', (db_id, name))
788337
def refresh(self, reloadData=False, force=False):
        
        if not (self.isVisible() or force):
            self._refreshTimer.start()
            return
        
        if self.isLoading():
            return
        
        if reloadData:
            self.refreshQueryRecords()
        
        # cancel current work
        self._refreshTimer.stop()
        self.worker().cancel()
        
        if self._popup:
            self._popup.close()
        
        # grab the record set
        currset = self.currentRecordSet()
        
        self.worker().setBatched(self.isPaged())
        self.worker().setBatchSize(self.pageSize())
        
        # group the information
        if self._searchTerms:
            currset.setGroupBy(None)
            pageSize = 0
        
        # work with groups
        elif self.groupBy() and self.isGroupingActive():
            currset.setGroupBy(self.groupBy())
        
        # work with batching
        else:
            currset.setGroupBy(None)
        
        # order the information
        if self.order():
            currset.setOrdered(True)
            currset.setOrder(self.order())
        
        # for larger queries, run it through the thread
        if self.useLoader():
            loader = XLoaderWidget.start(self)
        
        # specify the columns to load
        if self.specifiedColumnsOnly():
            currset.setColumns(map(lambda x: x.name(),
                                   self.specifiedColumns()))
        
        self._loadedColumns = set(self.visibleColumns())
        
        if self.isThreadEnabled() and currset.isThreadEnabled():
            self.worker().setPreloadColumns(self._preloadColumns)
            self.loadRequested.emit(currset)
        else:
            QApplication.setOverrideCursor(Qt.WaitCursor)
            self.worker().loadRecords(currset)
            QApplication.restoreOverrideCursor()
249764
def refresh(self):
        ''''''

        if not self._item_path:
            raise AttributeError('refresh is not available for %s' % self._type)
        if not self.id:
            raise RedmineError('%s did not come from the Redmine server - no link.' % self._type)

        try:
            self.save()
        except:
            pass

        # Mimic the Redmine_Item_Manager.get command
        target = self._item_path % self.id
        json_data = self._redmine.get(target)
        data = self._redmine.unwrap_json(self._type, json_data)
        self._update_data(data=data)
566224
function (table) {
			var time;
			
			if (!table) {
				time = Date['now']? Date['now']() : new Date().getTime();
				
			} else {
				var day, month, year, hour, min, sec;
				
				if (!(day = table.getMember('day'))) throw new shine.Error("Field 'day' missing in date table");
				if (!(month = table.getMember('month'))) throw new shine.Error("Field 'month' missing in date table");
				if (!(year = table.getMember('year'))) throw new shine.Error("Field 'year' missing in date table");
				hour = table.getMember('hour') || 12;
				min = table.getMember('min') || 0;
				sec = table.getMember('sec') || 0;
				
				if (table.getMember('isdst')) hour--;
				time = new Date(year, month - 1, day, hour, min, sec).getTime();
			}
			
			return Math.floor(time / 1000);
		}