visitorScreenCountUpdate
549306
protected function visitorScreenSetDebugSettings($visitors_category_id)
	{
	    $GLOBALS['visitors']['debug']['screenresolutioncount'] = false;
	
	    $objVisitors = \Database::getInstance()
	                           ->prepare("SELECT
                                                visitors_expert_debug_screenresolutioncount
                                            FROM
                                                tl_visitors
                                            LEFT JOIN
                                                tl_visitors_category ON (tl_visitors_category.id=tl_visitors.pid)
                                            WHERE
                                                pid=? AND published=?
                                            ORDER BY tl_visitors.id, visitors_name")
	                            ->limit(1)
	                            ->execute($visitors_category_id,1);
	    while ($objVisitors->next())
	    {
	        $GLOBALS['visitors']['debug']['screenresolutioncount'] = (boolean)$objVisitors->visitors_expert_debug_screenresolutioncount;
	        ModuleVisitorLog::writeLog('## START ##', '## SCREEN DEBUG ##', '#S'.(int)$GLOBALS['visitors']['debug']['screenresolutioncount']);
	    }
	}
890689
void updateCount() {
		if (this.hasChanged) {
			this.countArray = ArrayUtils.toPrimitive(getCountList().toArray(
					new Long[0]));
			this.hasChanged = false;
		}
	}
704935
def stats(self, start_date=None, end_date=None, registered_only=False):
        
        pageviews = self.filter(
            visitor__start_time__lt=end_date,
            visitor__start_time__gte=start_date,
        ).select_related('visitor')

        stats = {
            'total': 0,
            'unique': 0,
        }

        stats['total'] = total_views = pageviews.count()
        unique_count = 0

        if not total_views:
            return stats

        # Registered user sessions
        registered_pageviews = pageviews.filter(visitor__user__isnull=False)
        registered_count = registered_pageviews.count()

        if registered_count:
            registered_unique_count = registered_pageviews.values(
                'visitor', 'url').distinct().count()

            # Update the total unique count...
            unique_count += registered_unique_count

            stats['registered'] = {
                'total': registered_count,
                'unique': registered_unique_count,
            }

        if TRACK_ANONYMOUS_USERS and not registered_only:
            guest_pageviews = pageviews.filter(visitor__user__isnull=True)
            guest_count = guest_pageviews.count()

            if guest_count:
                guest_unique_count = guest_pageviews.values(
                    'visitor', 'url').distinct().count()

                # Update the total unique count...
                unique_count += guest_unique_count

                stats['guests'] = {
                    'total': guest_count,
                    'unique': guest_unique_count,
                }

        # Finish setting the total visitor counts
        stats['unique'] = unique_count

        return stats
413152
protected void updatedMonitor(ServiceReference<FileMonitor> monitorRef) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "CoreServiceImpl updatedMonitor", monitorRef);
        MonitorHolder existing = fileMonitors.get(monitorRef);
        if (existing == null)
            return;

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "CoreServiceImpl updatedMonitor, existing found");
        // Only initialize and start the monitor if the component has been activated
        if (cContext != null) {
            try {
                // Create a root cache location for the bundle that registered this service;
                // there could be multiple monitors associated with a bundle, but all should be destroyed
                // if/when the bundle is uninstalled, so keep them "together"..
                //TODO n.b. cacheRoot is unused
                File cacheRoot = cContext.getBundleContext().getDataFile(Long.toString(monitorRef.getBundle().getBundleId()));
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    Tr.debug(tc, "CoreServiceImpl updatedMonitor, about to refresh");
                existing.refresh(cacheRoot);
            } catch (RuntimeException re) {
                // Generated FFDC, rethrow to fail the bind
                fileMonitors.remove(monitorRef);
                throw re;
            }
        }
    }
843982
@SuppressWarnings("unchecked")
	static VisitorStatusType visitList(String name, List<Object> list, BindMapListener listener, VisitorStatusType status) {
		int i = 0;
		for (Object item : list) {
			if (item == null || item instanceof String) {
				visit(name + "." + i, (String) item, listener, status);
			} else if (item instanceof List) {
				visitList(name + "." + i, (List<Object>) item, listener, status);
			} else if (item instanceof Map) {
				visitMap(name + "." + i, (Map<String, Object>) item, listener, status);
			}
			i++;

			if (status == VisitorStatusType.STOP)
				return status;
		}

		return status;
	}
517323
private function _updateDocCount()
    {
        $this->_docCount = 0;
        foreach ($this->_segmentInfos as $segInfo) {
            $this->_docCount += $segInfo->count();
        }
    }
823447
protected function visitorScreenCountUpdate($vid, $BlockTime, $visitors_category_id, $BackendUser = false)
	{
	    ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , ': '.print_r($this->_SCREEN, true) );
	     
	    $ModuleVisitorChecks = new ModuleVisitorChecks($BackendUser);
	    if ($ModuleVisitorChecks->checkBot() === true)
	    {
	        //Debug log_message("visitorCountUpdate BOT=true","debug.log");
	        return; //Bot / IP gefunden, wird nicht gezaehlt
	    }
	    if ($ModuleVisitorChecks->checkUserAgent($visitors_category_id) === true)
	    {
	        //Debug log_message("visitorCountUpdate UserAgent=true","debug.log");
	        return ; //User Agent Filterung
	    }
	    if ($ModuleVisitorChecks->checkBE() === true)
	    {
	        return; // Backend eingeloggt, nicht zaehlen (Feature: #197)
	    }
	    //Debug log_message("visitorCountUpdate count: ".$this->Environment->httpUserAgent,"useragents-noblock.log");
	    $ClientIP = bin2hex(sha1($visitors_category_id . $ModuleVisitorChecks->visitorGetUserIP(),true)); // sha1 20 Zeichen, bin2hex 40 zeichen
	    $BlockTime = ($BlockTime == '') ? 1800 : $BlockTime; //Sekunden
	    $CURDATE = date('Y-m-d');
	
	    //Visitor Screen Blocker
	    \Database::getInstance()
                    ->prepare("DELETE FROM
                                    tl_visitors_blocker
                                WHERE
                                    CURRENT_TIMESTAMP - INTERVAL ? SECOND > visitors_tstamp
                                AND
                                    vid = ?
                                AND
                                    visitors_type = ?")
                    ->execute($BlockTime, $vid, 's');
	     
	    //Blocker IP lesen, sofern vorhanden
	    $objVisitBlockerIP = \Database::getInstance()
            	    ->prepare("SELECT
                                    id, visitors_ip
                                FROM
                                    tl_visitors_blocker
                                WHERE
                                    visitors_ip = ? AND vid = ? AND visitors_type = ?")
                    ->execute($ClientIP, $vid, 's');
	    //Debug ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , ':\n'.$objVisitBlockerIP->query );
	    //Daten lesen, nur Screen Angaben, die Inner Angaben werden jedesmal überschrieben
	    $objScreenCounter = \Database::getInstance()
	                                       ->prepare("SELECT
                                                            id, v_screen_counter
                                                        FROM
                                                            tl_visitors_screen_counter
                                                        WHERE
                                                            v_date = ?
                                                        AND vid = ?
                                                        AND v_s_w = ?
                                                        AND v_s_h = ?")
	                                        ->execute($CURDATE, $vid, $this->_SCREEN['scrw'], $this->_SCREEN['scrh']);
	     
	    if ($objScreenCounter->numRows < 1)
	    {
	        if ($objVisitBlockerIP->numRows < 1)
	        {
	            // Insert IP + Update Visits
	            \Database::getInstance()
	                            ->prepare("INSERT INTO
                                                 tl_visitors_blocker
                                            SET
                                                vid=?,
                                                visitors_tstamp=CURRENT_TIMESTAMP,
                                                visitors_ip=?,
                                                visitors_type=?")
                                ->execute($vid, $ClientIP, 's');
	            // Insert
	            $arrSet = array
	            (
	                'vid'              => $vid,
	                'v_date'           => $CURDATE,
	                'v_s_w'            => $this->_SCREEN['scrw'],
	                'v_s_h'            => $this->_SCREEN['scrh'],
	                'v_s_iw'           => $this->_SCREEN['scriw'],
	                'v_s_ih'           => $this->_SCREEN['scrih'],
	                'v_screen_counter' => 1
	            );
	            \Database::getInstance()
	                           ->prepare("INSERT IGNORE INTO tl_visitors_screen_counter %s")
	                           ->set($arrSet)
	                           ->execute();
	            ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , ': insert into tl_visitors_screen_counter' );
	            return ;
	        }
	        else
	        {
	            //Debug ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , ':'.'Update tstamp' );
	            // Update tstamp
	            \Database::getInstance()
	                           ->prepare("UPDATE
                                             tl_visitors_blocker
                                        SET
                                            visitors_tstamp=CURRENT_TIMESTAMP
                                        WHERE
                                            visitors_ip=? AND vid=? AND visitors_type=?")
                                ->execute($ClientIP, $vid, 's');
	            ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , ': update tl_visitors_blocker' );
	            return ;
	        }
	    }
	    else
	    {
	        //Debug ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , ':'.$objScreenCounter->numRows );
	        if ($objVisitBlockerIP->numRows < 1)
	        {
	            //Debug ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , ':'.$objVisitBlockerIP->numRows );
	            // Insert IP
	            \Database::getInstance()
	                           ->prepare("INSERT INTO
                                                 tl_visitors_blocker
                                             SET
                                                vid=?,
                                                visitors_tstamp=CURRENT_TIMESTAMP,
                                                visitors_ip=?,
                                                visitors_type=?")
                                ->execute($vid, $ClientIP, 's');
	
	            $objScreenCounter->next();
	            //Update der Screen Counter, Inner Daten dabei aktualisieren
	            \Database::getInstance()
	                            ->prepare("UPDATE
                            	                tl_visitors_screen_counter
                        	                SET
                            	                v_s_iw = ?,
                            	                v_s_ih = ?,
                                                v_screen_counter = ?
                        	               WHERE
                            	               v_date = ?
                                            AND vid = ?
                                            AND v_s_w = ?
                                            AND v_s_h = ?")
                                ->execute($this->_SCREEN['scriw'],
	                                                $this->_SCREEN['scrih'],
	                                                $objScreenCounter->v_screen_counter +1,
	                                                $CURDATE,
	                                                $vid,
	                                                $this->_SCREEN['scrw'],
	                                                $this->_SCREEN['scrh']
	                                               );
	            ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , ': update tl_visitors_screen_counter' );
	        }
	        else
	        {
	            //Debug ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , ':'.'Update tstamp' );
	            // Update tstamp
	            \Database::getInstance()
	                           ->prepare("UPDATE
                                                tl_visitors_blocker
                                             SET
                                                visitors_tstamp=CURRENT_TIMESTAMP
                                            WHERE
                                                visitors_ip=? AND vid=? AND visitors_type=?")
                                ->execute($ClientIP, $vid, 's');
	            ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , ': update tl_visitors_blocker' );
	        }
	    }
	    return ;
	}
202893
public function generateScreenTopResolution($VisitorsID,$limit=20)
    {
        $arrScreenStatCount = false;
        
        $this->TemplatePartial = new \BackendTemplate('mod_visitors_be_stat_partial_screentopresolution');
        
        $objScreenStatCount = \Database::getInstance()
                        ->prepare("SELECT 
                                        `v_s_w`,
                                        `v_s_h`,
                                        `v_s_iw`,
                                        `v_s_ih`,
                                        SUM(`v_screen_counter`) AS v_screen_sum
                                    FROM
                                        `tl_visitors_screen_counter`
                                    WHERE
                                        `vid` = ?
                                    GROUP BY `v_s_w`, `v_s_h`, `v_s_iw`, `v_s_ih`
                                    ORDER BY v_screen_sum DESC
                                ")
                        ->limit($limit)
                        ->execute($VisitorsID);

        while ($objScreenStatCount->next())
        {
            $arrScreenStatCount[] = array
            (
                'v_s_width'     => $objScreenStatCount->v_s_w,
                'v_s_height'    => $objScreenStatCount->v_s_h,
                'v_s_iwidth'    => $objScreenStatCount->v_s_iw,
                'v_s_iheight'   => $objScreenStatCount->v_s_ih,
                'v_screen_sum'  => $objScreenStatCount->v_screen_sum
            );
        }
        $this->TemplatePartial->ScreenTopResolution = $arrScreenStatCount;        
        return $this->TemplatePartial->parse();
    }
33590
public void updateOverviewPage()
	{
		try
		{
			theOverview.disposeFigures();
			traceRunner.drawOverview(theOverview, new Long(currentTime));

			for (Long cpu : cpuTabs.keySet())
			{
				GenericTabItem tab = cpuTabs.get(cpu);
				tab.disposeFigures();
				traceRunner.drawCpu(tab, cpu, new Long(currentTime));
			}

		} catch (Exception e)
		{
			TracefileViewerPlugin.log(e);
		}
	}
575240
function updateAvailablePages(pages) {
        var i, page;
        for (i = 0; i < pages.length; ++i) {
            page = pages[i];
            viewerAPI.fire('realtimeupdate', { page: page });
            scope.broadcast('pageavailable', { page: page });
        }
    }
391522
def _redraw_screen(self, stdscr):
        """"""
        with self._lock:
            stdscr.clear()
            stdscr.addstr(
                0, 0, "workflows service monitor -- quit with Ctrl+C", curses.A_BOLD
            )
            stdscr.refresh()
            self.message_box = self._boxwin(
                5, curses.COLS, 2, 0, title="last seen message", color_pair=1
            )
            self.message_box.scrollok(True)
            self.cards = []
1357961
def visitor_update(self, visitor_id, data, **kwargs):
        ""
        api_path = "/api/v2/visitors/{visitor_id}"
        api_path = api_path.format(visitor_id=visitor_id)
        return self.call(api_path, method="PUT", data=data, **kwargs)
772848
public void notifyUpdate( URL resource, int expected, int count )
    {
        synchronized( m_Monitors )
        {
            for( StreamMonitor monitor : m_Monitors )
            {
                monitor.notifyUpdate( resource, expected, count );
            }
        }
    }
407950
def update_views(self):
        """"""
        # Call the father's method
        super(Plugin, self).update_views()

        # Add specifics informations
        # Alert and log
        self.views['used']['decoration'] = self.get_alert_log(self.stats['used'], maximum=self.stats['total'])
        # Optional
        for key in ['active', 'inactive', 'buffers', 'cached']:
            if key in self.stats:
                self.views[key]['optional'] = True
116122
def update_screen_id(self):
        
        self.status_update_event.clear()
        # This gets the screenId but always throws. Couldn't find a better way.
        try:
            self.send_message({MESSAGE_TYPE: TYPE_GET_SCREEN_ID})
        except UnsupportedNamespace:
            pass
        self.status_update_event.wait()
        self.status_update_event.clear()
626148
function VirtualizeContentsView_updateAriaForAnnouncement(item, count) {
                    if (item === this._listView.header || item === this._listView.footer) {
                        return;
                    }

                    var index = -1;
                    var type = _UI.ObjectType.item;
                    if (_ElementUtilities.hasClass(item, _Constants._headerClass)) {
                        index = this._listView._groups.index(item);
                        type = _UI.ObjectType.groupHeader;
                        _ElementUtilities._setAttribute(item, "role", this._listView._headerRole);
                        _ElementUtilities._setAttribute(item, "tabindex", this._listView._tabIndex);
                    } else {
                        index = this.items.index(item);
                        _ElementUtilities._setAttribute(item, "aria-setsize", count);
                        _ElementUtilities._setAttribute(item, "aria-posinset", index + 1);
                        _ElementUtilities._setAttribute(item, "role", this._listView._itemRole);
                        _ElementUtilities._setAttribute(item, "tabindex", this._listView._tabIndex);
                    }

                    if (type === _UI.ObjectType.groupHeader) {
                        this._listView._fireAccessibilityAnnotationCompleteEvent(-1, -1, index, index);
                    } else {
                        this._listView._fireAccessibilityAnnotationCompleteEvent(index, index, -1, -1);
                    }
                }
411330
private void updateStatistics() {
        final PNCounterService service = getService();
        final LocalPNCounterStatsImpl stats = service.getLocalPNCounterStats(name);
        if (delta > 0) {
            stats.incrementIncrementOperationCount();
        } else if (delta < 0) {
            stats.incrementDecrementOperationCount();
        }
        stats.setValue(getBeforeUpdate ? (response.getValue() + delta) : response.getValue());
    }