Sets the flag if last hop responded.
334411
def set_last_hop_responded(self, last_hop):
        """"""
        for packet in last_hop.packets:
            if packet.rtt:
                self.last_hop_responded = True
                break
928965
def set_destination_ip_responded(self, last_hop):
        """"""
        if not self.destination_address:
            return

        for packet in last_hop.packets:
            if packet.origin and \
                    self.destination_address == packet.origin:
                self.destination_ip_responded = True
                break
1247185
function setHeadsetState(newState){

    if (newState){

        appPlaying = true;
        appActive = true;

    }else{

        if (removeHeadsetPausesPlay)
            appPlaying = false;

    }


}
160731
function last(backendTplServer) {
    backendTplServer.app.post('/news/last', function(request, response) {
        var data = Mock.mock(getApiResult({
            'last|10-20': [news]
        }));

        response.json(data);
    });
}
1373463
def finish(self):
        
        if self._has_responded:
            raise NSQException('already responded')
        self._has_responded = True
        self.on_finish.send(self)
333780
def _set_status_flag(self, status):
        

        # Remove previous status flag file.
        flag_file_path = self._flag_file_path()
        try:
            os.remove(flag_file_path)
        except:
            # Print message only if the failure to remove the status flag
            # is unexpected; there's no flag for initialization, so we
            # can't remove the file.
            if self.status != "initializing":
                print("Could not remove flag file: '{}'".format(flag_file_path))
            pass

        # Set new status.
        prev_status = self.status
        self.status = status
        self._create_file(self._flag_file_path())
        print("\nChanged status from {} to {}.".format(
                prev_status, self.status))
562222
def SetStatus(self, status, message="", backtrace=None):
    """"""
    self.status.status = status
    self.status.error_message = utils.SmartUnicode(message)
    if backtrace:
      self.status.backtrace = utils.SmartUnicode(backtrace)
196324
void setResponse(HttpResponse response) {
        if (isResponseAborted) {
            // This means that we already tried to close the request, so abort the response immediately.
            if (!response.isComplete()) {
                response.abort();
            }
        } else {
            this.response = response;
        }
    }
394701
def finish(self, status, response):
        """"""

        self.response = binascii.hexlify(response).decode('utf-8')
        self.status = status
        self.runtime = monotonic() - self._start_time
1309088
def poll(self):
        """"""
        self._returncode = self.process.poll()

        if self._returncode is not None:
            self.set_status(self.S_DONE, "status set to Done")

        return self._returncode
518693
def _set_final_freeness(self, flag):
        
        if flag:
            self.state.memory.store(self.heap_base + self.heap_size - self._chunk_size_t_size, ~CHUNK_P_MASK)
        else:
            self.state.memory.store(self.heap_base + self.heap_size - self._chunk_size_t_size, CHUNK_P_MASK)
372787
private void setLastApplied(long lastApplied) {
    // lastApplied should be either equal to or one greater than this.lastApplied.
    if (lastApplied > this.lastApplied) {
      Assert.arg(lastApplied == this.lastApplied + 1, "lastApplied must be sequential");

      this.lastApplied = lastApplied;

      // Update the index for each session. This will be used to trigger queries that are awaiting the
      // application of specific indexes to the state machine. Setting the session index may cause query
      // callbacks to be called and queries to be evaluated.
      for (ServerSessionContext session : executor.context().sessions().sessions.values()) {
        session.setLastApplied(lastApplied);
      }

      // Take a state machine snapshot if necessary.
      takeSnapshot();

      // Install a state machine snapshot if necessary.
      installSnapshot();
    } else {
      Assert.arg(lastApplied == this.lastApplied, "lastApplied cannot be decreased");
    }
  }
424006
def set(self, timestamp, status, value):
        """"""
        received_timestamp = self._manager.time()
        reading = KATCPSensorReading(received_timestamp, timestamp, status, value)
        self._reading = reading
        self.call_listeners(reading)
598498
def setFlag(self, flag, state=True):
        
        if state:
            self.__flags |= flag
        else:
            self.__flags &= ~flag
1015741
public void setRespondsToMode(int iMoveMode, boolean flag)
    {
        if (iMoveMode == DBConstants.SCREEN_MOVE)
            m_bScreenMove = flag;
        if (iMoveMode == DBConstants.INIT_MOVE)
            m_bInitMove = flag;
        if (iMoveMode == DBConstants.READ_MOVE)
            m_bReadMove = flag;
    }
1339753
def start_pinging(self) -> None:
        """"""
        assert self.ping_interval is not None
        if self.ping_interval > 0:
            self.last_ping = self.last_pong = IOLoop.current().time()
            self.ping_callback = PeriodicCallback(
                self.periodic_ping, self.ping_interval * 1000
            )
            self.ping_callback.start()
156486
def set_last_access(self, tag):
        """"""
        import time
        # time defeats check that value didn't change

        self.buildstate.access.last = '{}-{}'.format(tag, time.time())
        self.buildstate.commit()