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 incomingByte = 0; | |
int ledPin = 13; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(ledPin, OUTPUT); | |
} | |
void loop() { | |
if (Serial.available() > 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
#include <Wire.h> | |
#define MPU6050_ACCEL_XOUT_H 0x3B // R | |
#define MPU6050_WHO_AM_I 0x75 // R | |
#define MPU6050_PWR_MGMT_1 0x6B // R/W | |
#define MPU6050_I2C_ADDRESS 0x68 | |
typedef union accel_t_gyro_union{ | |
struct{ | |
uint8_t x_accel_h; |
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
var str0 = '{"id":0,"name":"GMT","difference":0}'; | |
var str1 = '{"id":1,"name":"JST","difference":9}'; | |
var str2 = '{"id":2,"name":"PST","difference":-8}'; | |
timezones = new Array(JSON.parse(str1), JSON.parse(str2), JSON.parse(str0)); | |
localStorage.setItem("currentTimezone",JSON.stringify(timezones[0])); | |
localStorage.setItem("myTimezone",JSON.stringify(timezones)); |
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
public class BoundingBox { | |
public int smallestArea(int[] X, int[] Y) { | |
return getl(X)*getl(Y); | |
} | |
private int getl(int[] N) { | |
int max = -100; | |
int min = 100; |
NewerOlder