Add a display to the simulation

@param displayID
@param display
@throws DuplictaedDisplayIDException
@throws DuplicatedPortrayalIDException
@throws ScenarioNotFoundException
556749
public void addDisplay(String displayID, Display2D display)
            throws ShanksException {
        Scenario2DPortrayal scenarioPortrayal = (Scenario2DPortrayal) this
                .getSimulation().getScenarioPortrayal();
        HashMap<String, Display2D> displays = scenarioPortrayal.getDisplays();
        if (!displays.containsKey(displayID)) {
            displays.put(displayID, display);
        } else {
            throw new DuplictaedDisplayIDException(displayID);
        }
    }
1341186
def opt_display(self, display):
        
        key = get_enum_key(display, DISPLAYS)
        if key is not None:
            self.conf["display"] = key
            self.display = DISPLAYS[key]
            print("Set display %r" % key)
        else:
            print("Unknown display %r" % display)
97079
function(display) {
      if(display) {
         Dom.addClass(this.el, this.dropinviteClassName);
      }
      else {
         Dom.removeClass(this.el, this.dropinviteClassName);
      }
   }
1183579
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPDisplayLayout addCPDisplayLayout(CPDisplayLayout cpDisplayLayout) {
		cpDisplayLayout.setNew(true);

		return cpDisplayLayoutPersistence.update(cpDisplayLayout);
	}
1135332
public void putPresenter(@NonNull String viewId,
      @NonNull MvpPresenter<? extends MvpView> presenter) {

    if (viewId == null) {
      throw new NullPointerException("ViewId is null");
    }

    if (presenter == null) {
      throw new NullPointerException("Presenter is null");
    }

    PresenterHolder presenterHolder = presenterMap.get(viewId);
    if (presenterHolder == null) {
      presenterHolder = new PresenterHolder();
      presenterHolder.presenter = presenter;
      presenterMap.put(viewId, presenterHolder);
    } else {
      presenterHolder.presenter = presenter;
    }
  }
78891
def switchDisplay(self, display):
        
        if display in self.displays:
            self.setWidget(self.displays[display])
            self._current = display
        else:
            raise Exception("Undefined display type "+ display)
537220
def display(self, dset_id: str):
        
        # update result
        self.skd[dset_id].compute()
        # build layout
        self.build_layout(dset_id=dset_id)
        # display widgets
        display(self._('dashboard'))
        # display data table and chart
        self._display_result(dset_id=dset_id)
435359
public void setDisplayMode(final DisplayMode displayMode) {
		content.setDisplayMode(displayMode);
		link.setOpenNewWindow(DisplayMode.OPEN_NEW_WINDOW.equals(content.getDisplayMode()));
	}
194672
public void addTimeChart(String chartID, String xAxisLabel,
            String yAxisLabel) throws ShanksException {
        Scenario2DPortrayal scenarioPortrayal = (Scenario2DPortrayal) this
                .getSimulation().getScenarioPortrayal();
        scenarioPortrayal.addTimeChart(chartID, xAxisLabel, yAxisLabel);
    }
232475
void draw(final DisplayerListener displayerListener) {
        tableDisplayer.addListener(displayerListener);
        view.setDisplayer(tableDisplayer);
        tableDisplayer.draw();
    }
688442
public void addOutputPlugin(OutputPluginModel<?, ?> outputPlugin) throws IllegalIDException {
        if (!futureHashMap.containsKey(outputPlugin.getID())) {
            outputPlugins.add(outputPlugin);
            futureHashMap.put(outputPlugin.getID(), submit(outputPlugin));
        } else {
            if (futureHashMap.get(outputPlugin.getID()).isDone()) {
                futureHashMap.remove(outputPlugin.getID());
                futureHashMap.put(outputPlugin.getID(), submit(outputPlugin));
            }
        }
    }
993483
public void addUser(UserDefinition userDef) {
        String userID = userDef.getID();
        Utils.require(!Utils.isEmpty(userID), "User ID must be set");
        Utils.require(!m_users.containsKey(userID), "Duplicate user ID: " + userID);
        m_users.put(userID, userDef);
    }
299654
def remake_display(self, *args):
        
        Builder.load_string(self.kv)
        if hasattr(self, '_kv_layout'):
            self.remove_widget(self._kv_layout)
            del self._kv_layout
        self._kv_layout = KvLayout()
        self.add_widget(self._kv_layout)
882080
protected void syncDuplicatedTopics(final Map<ITopicNode, ITopicNode> duplicatedTopics) {
        for (final Map.Entry<ITopicNode, ITopicNode> topicEntry : duplicatedTopics.entrySet()) {
            final ITopicNode topic = topicEntry.getKey();
            final ITopicNode cloneTopic = topicEntry.getValue();

            // Set the id
            topic.setId(cloneTopic.getDBId() == null ? null : cloneTopic.getDBId().toString());
        }
    }
131988
public static void putPresenter(@NonNull Activity activity, @NonNull String viewId,
      @NonNull MvpPresenter<? extends MvpView> presenter) {
    if (activity == null) {
      throw new NullPointerException("Activity is null");
    }

    ActivityScopedCache scopedCache = getOrCreateActivityScopedCache(activity);
    scopedCache.putPresenter(viewId, presenter);
  }
633105
@Override
    public synchronized INDArray replicateToDevice(Integer deviceId, INDArray array) {
        if (array == null)
            return null;

        // string arrays are stored in host memory only atm
        if (array.isS())
            return array.dup(array.ordering());

        if (array.isView())
            throw new UnsupportedOperationException("It's impossible to replicate View");

        val shape = array.shape();
        val stride = array.stride();
        val elementWiseStride = array.elementWiseStride();
        val ordering = array.ordering();
        val length = array.length();
        val dtype = array.dataType();

        // we use this call to get device memory updated
        AtomicAllocator.getInstance().getPointer(array, (CudaContext) AtomicAllocator.getInstance().getDeviceContext().getContext());

        int currentDeviceId = getDeviceForCurrentThread();

        if (currentDeviceId != deviceId.intValue()) {
            Nd4j.getMemoryManager().releaseCurrentContext();
            NativeOpsHolder.getInstance().getDeviceNativeOps().setDevice(deviceId);
            attachThreadToDevice(Thread.currentThread().getId(), deviceId);
        }


        DataBuffer newDataBuffer = replicateToDevice(deviceId, array.data());
        DataBuffer newShapeBuffer = Nd4j.getShapeInfoProvider().createShapeInformation(shape, stride, elementWiseStride, ordering, dtype).getFirst();
        INDArray result = Nd4j.createArrayFromShapeBuffer(newDataBuffer, newShapeBuffer);

        if (currentDeviceId != deviceId.intValue()) {
            Nd4j.getMemoryManager().releaseCurrentContext();
            attachThreadToDevice(Thread.currentThread().getId(), currentDeviceId);
            NativeOpsHolder.getInstance().getDeviceNativeOps().setDevice(currentDeviceId);
        }


        return result;
    }
843201
public static VAlarm display(Trigger trigger, String displayText) {
		VAlarm alarm = new VAlarm(Action.display(), trigger);
		alarm.setDescription(displayText);
		return alarm;
	}