This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private boolean isAmbient_temp = false; | |
private boolean isMagnetic = false; | |
private HashMap<Integer, float[]> sensorValues = new HashMap<>(); | |
public void onSensorChanged(SensorEvent event) { | |
switch (event.sensor.getType()){ | |
case Sensor.TYPE_AMBIENT_TEMPERATURE: | |
// blah blah | |
sensorValues.put(Sensor.TYPE_AMBIENT_TEMPERATURE, event.values); | |
isAmbient_temp = true; | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2015-04-12 02:34:11,229 [1765019] INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home | |
2015-04-12 02:34:11,229 [1765019] INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home | |
2015-04-12 02:34:11,230 [1765020] INFO - util.EmbeddedDistributionPaths - Looking for embedded Maven repo at '/Applications/Android Studio.app/Contents/gradle/m2repository' | |
2015-04-12 02:34:11,231 [1765021] INFO - .project.GradleExecutionHelper - Passing command-line args to Gradle Tooling API: [-Pandroid.injected.build.model.only=true, -Pandroid.injected.build.model.only.advanced=true, -Pandroid.injected.invoked.from.ide=true, --init-script, /private/var/folders/w0/pbg93bm92wq3n0__t0n3ynl00000gn/T/asLocalRepo2055788470259646157.gradle, --init-script, /private/var/folders/w0/pbg93bm92wq3n0__t0n3ynl00000gn/T/ijinit3434146205477802898.gradle] | |
2015-04-12 02: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source | |
``` | |
switch(integerA){ | |
case 0: | |
method1(); | |
case 1: | |
method2(); | |
break; | |
default: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from requests import get | |
from enum import IntEnum | |
SK_PLANET_APP_KEY = "KEEEEEEY" | |
class Stations(IntEnum): | |
def __str__(self): | |
return "{}".format(self.value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(int argc, char *argv[]) { | |
// BLAHBLAH | |
UART_eSetRTS(iUartFd, 1); // nRESET | |
UART_eSetDTR(iUartFd, 1); // nPROG | |
struct timespec ts; | |
ts.tv_sec = 0; | |
ts.tv_nsec = 100000000; // 100 ms | |
nanosleep(&ts, NULL); | |
UART_eSetRTS(iUartFd, 0); // nRESET | |
ts.tv_sec = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template: | |
- sensor: | |
- name: "Average temperature" | |
unique_id: avrg_temperature | |
unit_of_measurement: "°C" | |
state: > | |
{% set bedroom = states('sensor.anbang_t_h_temperature') | float %} | |
{% set kitchen = states('sensor.kitchen_temperature') | float %} | |
{% set living = states('sensor.geosil_temperature') | float %} |
OlderNewer