Returns the antenna state of the Phidget.

 @return [Boolean] returns the ratiometric state or raises an error
762229
def antenna
      ptr = ::FFI::MemoryPointer.new(:int)
      Klass.getAntennaOn(@handle, ptr)
      (ptr.get_int(0) == 0) ? false : true
    end
602971
def phi(self):
        
        return np.arctan2(np.sqrt(self.x**2 + self.y**2), self.z)
539853
def unit_response(self):
        
        hc = units.HC

        if hasattr(self, 'primary_area'):
            area = self.primary_area
        else:
            area = refs.PRIMARY_AREA

        wave = self.GetWaveSet()
        thru = self(wave)

        return hc / (area * self.trapezoidIntegration(wave, thru*wave))
1368229
def _current_state(self):
        
        ret = self._grab_raw_image()
        # max-pooled over the last screen
        ret = np.maximum(ret, self.last_raw_screen)
        if self.viz:
            if isinstance(self.viz, float):
                cv2.imshow(self.windowname, ret)
                cv2.waitKey(int(self.viz * 1000))
        ret = ret.astype('float32')
        # 0.299,0.587.0.114. same as rgb2y in torch/image
        ret = cv2.cvtColor(ret, cv2.COLOR_RGB2GRAY)[:, :]
        return ret.astype('uint8')
842328
def poll(self):
        ''''''
        if self.out_queue.qsize() <= 0:
            return None
        evt = self.out_queue.get()
        while isinstance(evt, win_layout.WinLayout):
            win_layout.set_layout(evt, self.set_layout)
            if self.out_queue.qsize() == 0:
                return None
            evt = self.out_queue.get()
        return evt
1077287
def setCurrent(self, state=True):
        
        if self._current == state:
            return False
        
        widget = self.viewWidget()
        if widget:
            for other in widget.findChildren(type(self)):
                if other.isCurrent():
                    other._current = False
                    if not other.signalsBlocked():
                        other.currentStateChanged.emit(state)
                        other.deactivated.emit()
        
        self._current = state
        
        if not self.signalsBlocked():
            self.currentStateChanged.emit(state)
            if state:
                self.activated.emit()
            else:
                self.deactivated.emit()
        return True
44147
public State getWifiState() {
		if (connMan == null) {
			connMan = (ConnectivityManager) context
					.getSystemService(Context.CONNECTIVITY_SERVICE);
		}
		NetworkInfo wifiNetworkInfo = connMan.getNetworkInfo(TYPE_WIFI);
		if (wifiNetworkInfo == null) {
			return State.UNKNOWN;
		}

		return wifiNetworkInfo.getState();
	}
720316
function () {
            var state = this.state;
            return (state.viewportDimensions.clientHeight < state.totalHeight) ||
                   (state.viewportDimensions.clientWidth < state.totalWidth);
        }
1187240
def get_state(self) -> str:
        ''''''
        output, error = self._execute('get-state')
        if error:
            raise DeviceConnectionException(error.split(':', 1)[-1].strip())
        return output.strip()
774554
def state(self):
        
        if self._proto.HasField('state'):
            return yamcsManagement_pb2.YamcsInstance.InstanceState.Name(self._proto.state)
        return None
23668
def get_state(cls, clz):
        
        if clz not in cls.__shared_state:
            cls.__shared_state[clz] = (
                clz.init_state() if hasattr(clz, "init_state") else {}
            )
        return cls.__shared_state[clz]
23628
@Override
    protected boolean onStateChange(int[] state) {
        final int color = state == null ? mColorStateList.getDefaultColor() : mColorStateList.getColorForState(state, mColor);
        boolean bFlag = mColor != color;
        if (bFlag) {
            mColor = color;
        }
        return bFlag;
    }
973543
def dipole(self):
        
        dipole = np.zeros(3)
        mid_pt = np.sum(self.cart_coords, axis=0) / len(self)
        normal = self.normal
        for site in self:
            charge = sum([getattr(sp, "oxi_state", 0) * amt
                          for sp, amt in site.species.items()])
            dipole += charge * np.dot(site.coords - mid_pt, normal) * normal
        return dipole
956774
def state(self):
        """"""
        if self.lightlevel is None:
            return None
        lux = round(10 ** (float(self.lightlevel - 1) / 10000), 1)
        return lux
1327607
def measure(self) -> np.ndarray:
        
        # TODO: Can we do this within backend?
        probs = np.real(bk.evaluate(self.probabilities()))
        indices = np.asarray(list(np.ndindex(*[2] * self.qubit_nb)))
        res = np.random.choice(probs.size, p=probs.ravel())
        res = indices[res]
        return res
383495
def get_state(self, force_update=False):
        
        if force_update or self._state is None:
            return int(self.basicevent.GetBinaryState()['BinaryState'])
        return self._state
965200
def update(self):
        

        (data_format, data) = RuuviTagSensor.get_data(self._mac, self._bt_device)

        if data == self._data:
            return self._state

        self._data = data

        if self._data is None:
            self._state = {}
        else:
            self._state = get_decoder(data_format).decode_data(self._data)

        return self._state