Door can be closed unattended.
552619
def close_allowed(self) -> bool:
        """"""
        return next(
            attr['Value'] for attr in self._device_json.get('Attributes', [])
            if attr.get('AttributeDisplayName') == 'isunattendedcloseallowed')\
            == "1"
704553
public AioSession closeOut() {
		if (null != this.channel) {
			try {
				this.channel.shutdownOutput();
			} catch (IOException e) {
				throw new IORuntimeException(e);
			}
		}
		return this;
	}
3428
public void hideDelayed() {

        // The reason for using this function, instead of calling hide directly, is that
        // the latter leads to harmless but annoying Javascript errors when called from
        // Javascript inside the IFrame, since the IFrame is closed before the function returns.
        Scheduler.get().scheduleDeferred(new ScheduledCommand() {

            /**
             * @see com.google.gwt.core.client.Scheduler.ScheduledCommand#execute()
             */
            public void execute() {

                if (m_closeHandler != null) {
                    m_closeHandler.run();
                }

                hide();
            }
        });
    }
83892
def __unLock(self):
        """"""
        self._operation = False
        self._timer = 0
        self._isLocked = False
70504
@Handler(channels = NetworkChannel.class)
    public void onClosed(Closed event, TcpChannel netConnChannel) {
        netConnChannel.associated(WebAppMsgChannel.class).ifPresent(
            appChannel -> appChannel.handleClosed(event));
        pooled.remove(netConnChannel.remoteAddress(), netConnChannel);
    }
109771
public void freeDependent()
    {
        if (m_recDependent != null) // If close and file is still open
            if (!m_recDependent.isInFree())
        {
            this.setDependentListener(null);    // In case you want to delete me!
            if (m_recDependent != null)
            {
                if (m_bCloseOnFree)
                    m_recDependent.close();    // File is still open, and my listener is still there, close it!
                else
                    m_recDependent.free();    // File is still open, and my listener is still there, close it!
            }
        }
        m_recDependent = null;
        if (m_freeable != null)
            m_freeable.free();
        m_freeable = null;
    }
802895
private synchronized void _release(@Nonnull FilePath p) {
        Entry old = inUse.get(p.getRemote());
        if (old==null)
            throw new AssertionError("Releasing unallocated workspace "+p);
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.log(Level.FINE, "releasing " + p + " with lock count " + old.lockCount, new Throwable("from " + this));
        }
        old.lockCount--;
        if (old.lockCount==0)
            inUse.remove(p.getRemote());
        notifyAll();
    }
104511
private void setOfflinePresences() {
        Presence packetUnavailable;
        outerloop: for (Jid user : presenceMap.keySet()) {
            Map<Resourcepart, Presence> resources = presenceMap.get(user);
            if (resources != null) {
                for (Resourcepart resource : resources.keySet()) {
                    packetUnavailable = new Presence(Presence.Type.unavailable);
                    EntityBareJid bareUserJid = user.asEntityBareJidIfPossible();
                    if (bareUserJid == null) {
                        LOGGER.warning("Can not transform user JID to bare JID: '" + user + "'");
                        continue;
                    }
                    packetUnavailable.setFrom(JidCreate.fullFrom(bareUserJid, resource));
                    try {
                        presencePacketListener.processStanza(packetUnavailable);
                    }
                    catch (NotConnectedException e) {
                        throw new IllegalStateException(
                                        "presencePacketListener should never throw a NotConnectedException when processStanza is called with a presence of type unavailable",
                                        e);
                    }
                    catch (InterruptedException e) {
                        break outerloop;
                    }
                }
            }
        }
    }
1241643
void closedHandler(Object context, String input, Object frame, String stateName) {
        if (getReadyState() == ReadyState.CLOSED) {
            return;
        }
        
        // TODO: Determine whether channels need to be cleaned up.
        if (this.channels.size() != 0) {
            for (int i = 1; i <= this.channels.size(); i++) { // 1-based
                AmqpChannel channel = this.channels.get(i);
                AmqpFrame   f = new AmqpFrame();
                
                // Close each channel which should result in CLOSE event
                // to be fired for each of the registered ChannelListener(s).
                f.setMethodName("closeChannel");
                f.setChannelId((short) i);
                channel.channelClosedHandler(this, "", f, "closeChannel");
            }
        }
        
        try {
            // Mark the readyState to be CLOSED.
            readyState = ReadyState.CLOSED;
            
            // Fire CLOSE event for the ConnectionListener(s) registered
            // on AmqpClient object.
            fireOnClosed(new ConnectionEvent(this, Kind.CLOSE));

            // If the WebSocket(or ByteSocket) is still not closed, then 
            // invoke the close() method. The callback in this case will be a
            // a no-op as we have completed the book-keeping here.
            if (websocket != null) {
                websocket.close();
            }
        }
        catch (Exception e1) {
            throw new IllegalStateException(e1);
        }
        finally {
            websocket = null;
        }

    }
701563
function onHidden() {
    bus.sounds.forEach(sound => {
        if (sound.playing) {
            sound.pause();
            pageHiddenPaused.push(sound);
        }
    });
}
1357996
function handleClose(mode) {
        var targetIndex  = MainViewManager.findInWorkingSet(MainViewManager.ACTIVE_PANE, MainViewManager.getCurrentlyViewedPath(MainViewManager.ACTIVE_PANE)),
            workingSetList = MainViewManager.getWorkingSet(MainViewManager.ACTIVE_PANE),
            start        = (mode === closeBelow) ? (targetIndex + 1) : 0,
            end          = (mode === closeAbove) ? (targetIndex) : (workingSetList.length),
            files        = [],
            i;

        for (i = start; i < end; i++) {
            if ((mode === closeOthers && i !== targetIndex) || (mode !== closeOthers)) {
                files.push(workingSetList[i]);
            }
        }

        CommandManager.execute(Commands.FILE_CLOSE_LIST, {fileList: files});
    }
1280645
private void closeQuietly(Closeable c) {
		if (c != null) {
			try {
				c.close();
			} catch (Throwable t) {
				logger.warn("Error closing, ignoring", t);
			}
		}
	}
329072
function handleHiddenChange (hidden, oldHidden) {
    if (!hidden && oldHidden) {
      positionDropdown();

      // Report in polite mode, because the screen reader should finish the default description of
      // the input element.
      reportMessages(true, ReportType.Count | ReportType.Selected);

      if (elements) {
        $mdUtil.disableScrollAround(elements.ul);
        enableWrapScroll = disableElementScrollEvents(angular.element(elements.wrap));
      }
    } else if (hidden && !oldHidden) {
      $mdUtil.enableScrolling();

      if (enableWrapScroll) {
        enableWrapScroll();
        enableWrapScroll = null;
      }
    }
  }
43273
def save_and_close_enable(self, top_left, bottom_right):
        """"""
        self.btn_save_and_close.setEnabled(True)
        self.btn_save_and_close.setAutoDefault(True)
        self.btn_save_and_close.setDefault(True)
120024
public synchronized void onClose() {
        if (state == State.DISABLED || state == State.DISABLING)
            throw new IllegalStateException("Do not call onClose if not opened before");
        if (state == State.WAITING) {
            state = State.DISABLED;
        } else {
            state = State.DISABLING;
        }
    }
1149518
def door(idf, fsdobject, deletebsd=True, setto000=False):
    """"""
    # ('DOOR', Door, None)
    # test if it is aroof
    if fsdobject.Surface_Type.upper() == 'DOOR': # Surface_Type == w
        simpleobject = idf.newidfobject('DOOR')
        simpleobject.Name = fsdobject.Name
        simpleobject.Construction_Name = fsdobject.Construction_Name
        simpleobject.Building_Surface_Name = fsdobject.Building_Surface_Name
        simpleobject.Multiplier = fsdobject.Multiplier
        surforigin = fsdorigin(fsdobject, setto000=setto000)
        simpleobject.Starting_X_Coordinate = surforigin[0]
        simpleobject.Starting_Z_Coordinate = surforigin[1]
        simpleobject.Length = fsdobject.width
        simpleobject.Height = fsdobject.height
        if deletebsd:
            idf.removeidfobject(fsdobject)
        return simpleobject
    return None
421075
public static void safeClose(Closeable obj)
   {
      try
      {
         obj.close();
      }
      catch (IOException e)
      {
         LOG.error("Error while closing " + obj, e);
      }
   }