Add the event and series listing data
336531
def get_context_data(self,**kwargs):
        '''  '''
        context = self.get_listing()
        context['showDescriptionRule'] = getConstant('registration__showDescriptionRule') or 'all'
        context.update(kwargs)

        # Update the site session data so that registration processes know to send return links to
        # the registration page.  set_return_page() is in SiteHistoryMixin.
        self.set_return_page('registration',_('Registration'))

        return super(ClassRegistrationView,self).get_context_data(**context)
427993
def select_catalogue_events(self, id0):
        '''
        
        '''
        for key in self.data:
            if isinstance(
                    self.data[key], np.ndarray) and len(self.data[key]) > 0:
                # Dictionary element is numpy array - use logical indexing
                self.data[key] = self.data[key][id0]
            elif isinstance(
                    self.data[key], list) and len(self.data[key]) > 0:
                # Dictionary element is list
                self.data[key] = [self.data[key][iloc] for iloc in id0]
            else:
                continue
1297549
function setEventData(events) { // events are already normalized at this point
		eventsByID = {};
		var i, len=events.length, event;
		for (i=0; i<len; i++) {
			event = events[i];
			if (eventsByID[event._id]) {
				eventsByID[event._id].push(event);
			}else{
				eventsByID[event._id] = [event];
			}
		}
	}
881471
public XYSeries addSeries(String seriesName, int[] xData, int[] yData, int[] errorBars) {

    return addSeries(
        seriesName,
        Utils.getDoubleArrayFromIntArray(xData),
        Utils.getDoubleArrayFromIntArray(yData),
        Utils.getDoubleArrayFromIntArray(errorBars),
        DataType.Number);
  }
883579
def add_event(self, event):
        
        self._events.append(event)
        self._events_by_name[event.get_name] = event
698991
function(json, options) {
	var series_list = _.plain(json).pselect('*').sortPlain().keys().value()
	, years = new Year();
	
	options = _.defaults(options || {}, {
		interval: 'month',
		date_key: 'date',
		timeSeries: true,
		series_list: series_list		
	});
	
	// build the timeSeries from an object grouped by date;
	// toJSON() applies the "select *, pivot" criteria to the PlainObject;
	_.plain(json).query('select *, pivot').each(function(row, date) {
		if (date) {
			years.add(_.date({'dateIn': date}).key(), row );
		}
	}, this);
	
	// now bucket series counts in year or year/month buckets; pivot back to the original form
	json = _.object( [options.date_key], [pivot( _.reduce(years.getRange(), function(result, year) {
		return _.extend(result, years.get(year).get(options.interval, _.reduce(series_list, function(res, c) { 
			res[c] = 0; 
			return res; 
		}, {}), options.date_key) || {});
	}, {}, this) )] );
	
	// add interval and date_key to the object;
	return _.extend(json, options);
}
735752
public void addSeries( String seriesName, double[] x, double[] y ) {
        XYSeries series = new XYSeries(seriesName);
        for( int i = 0; i < x.length; i++ ) {
            series.add(x[i], y[i]);
        }
        dataset.addSeries(series);
    }
1144140
def get_listing(self):
        '''
        
        '''
        if not hasattr(self,'listing'):
            allEvents = self.get_allEvents()

            openEvents = allEvents.filter(registrationOpen=True)
            closedEvents = allEvents.filter(registrationOpen=False)

            publicEvents = allEvents.instance_of(PublicEvent)
            allSeries = allEvents.instance_of(Series)

            self.listing = {
                'allEvents': allEvents,
                'openEvents': openEvents,
                'closedEvents': closedEvents,
                'publicEvents': publicEvents,
                'allSeries': allSeries,
                'regOpenEvents': publicEvents.filter(registrationOpen=True).filter(
                    Q(publicevent__category__isnull=True) | Q(publicevent__category__separateOnRegistrationPage=False)
                ),
                'regClosedEvents': publicEvents.filter(registrationOpen=False).filter(
                    Q(publicevent__category__isnull=True) | Q(publicevent__category__separateOnRegistrationPage=False)
                ),
                'categorySeparateEvents': publicEvents.filter(
                    publicevent__category__separateOnRegistrationPage=True
                ).order_by('publicevent__category'),
                'regOpenSeries': allSeries.filter(registrationOpen=True).filter(
                    Q(series__category__isnull=True) | Q(series__category__separateOnRegistrationPage=False)
                ),
                'regClosedSeries': allSeries.filter(registrationOpen=False).filter(
                    Q(series__category__isnull=True) | Q(series__category__separateOnRegistrationPage=False)
                ),
                'categorySeparateSeries': allSeries.filter(
                    series__category__separateOnRegistrationPage=True
                ).order_by('series__category'),
            }
        return self.listing
639846
private void addToList__() {
    //Theman suchen
    final String MUSTER_START = "<div class=\"mediaCon\">";
    final String MUSTER_STOPP = "<h2 class=\"rasterHeadline\">OFT GESUCHT</h2>";
    final String MUSTER_URL = "<a href=\"tvshow.htm?show=";
    final String MUSTER_THEMA = "title=\"";
    MSStringBuilder strSeite = new MSStringBuilder(Const.STRING_BUFFER_START_BUFFER);
    GetUrl getUrlIo = new GetUrl(getWartenSeiteLaden());
    strSeite = getUrlIo.getUriWithDelay(SENDERNAME, "http://swrmediathek.de/tvlist.htm", StandardCharsets.UTF_8, 2, strSeite, "", 4, TimeUnit.SECONDS);
    int pos = 0;
    String url;
    String thema;
    int stop = strSeite.indexOf(MUSTER_STOPP);
    while (!Config.getStop() && (pos = strSeite.indexOf(MUSTER_START, pos)) != -1) {
      if (stop > 0 && pos > stop) {
        break;
      }
      pos += MUSTER_START.length();
      url = strSeite.extract(MUSTER_URL, "\"", pos);
      thema = strSeite.extract(MUSTER_THEMA, "\"", pos);
      thema = StringEscapeUtils.unescapeHtml4(thema.trim()); //wird gleich benutzt und muss dann schon stimmen
      if (thema.isEmpty()) {
        Log.errorLog(915263078, "kein Thema");
      }
      if (url.isEmpty()) {
        Log.errorLog(163255009, "keine URL");
      } else {
        //url = url.replace("&amp;", "&");
        String[] add = new String[]{"http://swrmediathek.de/tvshow.htm?show=" + url, thema};
        listeThemen.addUrl(add);
      }
    }
  }
952882
public BubbleSeries addSeries(
      String seriesName,
      List<? extends Number> xData,
      List<? extends Number> yData,
      List<? extends Number> bubbleData) {

    return addSeries(
        seriesName,
        Utils.getDoubleArrayFromNumberList(xData),
        Utils.getDoubleArrayFromNumberList(yData),
        Utils.getDoubleArrayFromNumberList(bubbleData));
  }
876356
function addData(chart, label, data) {
    chart.data.labels.push(label)
    chart.data.datasets.forEach((dataset) => {
        dataset.data.push(data)
    })
    chart.update()
}
176987
def update(self, series_data):
        

        for key in series_data:
            try:
                data_list = list(self.data[key])
                data_list[2] = str(series_data[key])
                self.data[key] = tuple(data_list)
            except KeyError:
                pass
371491
protected function addEventListener()
    {
        Event::subscribe(ExtendMenuHandler::class);
        //Brand events
        Event::subscribe(BrandModelHandler::class);
        //Category events
        Event::subscribe(CategoryModelHandler::class);
        //Currency events
        Event::subscribe(CurrencyModelHandler::class);
        //Offer events
        Event::subscribe(OfferModelHandler::class);
        //Price events
        Event::subscribe(PriceModelHandler::class);
        //Product events
        Event::subscribe(ProductModelHandler::class);
        Event::subscribe(ProductRelationHandler::class);
        //Promo block events
        Event::subscribe(PromoBlockModelHandler::class);
        Event::subscribe(PromoBlockRelationHandler::class);
        //Tax events
        Event::subscribe(TaxModelHandler::class);
        Event::subscribe(TaxRelationHandler::class);
        Event::subscribe(ExtendTaxFieldsHandler::class);
    }
366045
def bind_events(self, events):
        '''
        '''
        evs = self._events
        if evs and events:
            for event in evs.values():
                if event.name in events:
                    event.bind(events[event.name])
951084
function addEvent(ev, val, line){

    var history = this.get('history');
    var maxLen  = this.get('MAX_LEN_HISTORY');
    history.push(ev);

    if (history.length > maxLen) history.shift();

    this.set('status', ev, true, {data: val, line: line});
  }
854213
function addEvent (date, value) {
  date = this.toDate(date);
  if (!date) {
    return null;
  }
  var info = getDayInfo(this.dayInfo, date, true);
  if (!info) {
    return null;
  }
  var events = info.events;
  events.push(value);
  return events.length - 1;
}
1170787
def add_series(self, series):
        """"""

        if not isinstance(series, Series):
            raise TypeError("'%s' is not a Series" % str(series))
        self._all_series.append(series)
        series._chart = self