/**
* @param {number[][]} grid
* @return {number}
*/
var maxProductPath = function(grid) {
const MOD = 1_000_000_007;
const m = grid.length;
const n = grid[0].length;
// Create DP tables for max and min products
const maxDP = Array.from({ length: m }, () => Array(n).fill(0));
const minDP = Array.from({ length: m }, () => Array(n).fill(0));
// -- 1. Initialize the starting cell --
maxDP[0][0] = grid[0][0];
minDP[0][0] = grid[0][0];
// -- 2. Fill the f#include <Adafruit_PN532.h>
#include <Wire.h>
#define I2C_SDA 8
#define I2C_SCL 9
Adafruit_PN532 nfc(-1, -1);
uint8_t allowedUID[] = {0x01, 0x23, 0x45, 0x67}; // secret code
// for phonew uid is changeing
uint8_t allowedLength = 4;
bool checkUID(uint8_t *uid, uint8_t uidLength)
{
if (uidLength != allowedLength)
return false;
for (uint8_t i = 0; i < uidLength; i++)
{
if (uid[i] != allowedUID[i])
return false;
}
return true;
}
void setup()
{
#include <Arduino.h>
#include <Wire.h>
#include "Adafruit_VL53L0X.h"
Adafruit_VL53L0X lox = Adafruit_VL53L0X(); // +-1cm
void setup()
{
Serial.begin(115200);
delay(1000);
Wire.begin(8, 9);
delay(500);
Serial.println("Adafruit VL53L0X test.");
if (!lox.begin(0x29, false, &Wire)) // 0x29
{
Serial.println(F("Failed to boot VL53L0X"));
while (1);
}
Serial.println(F("VL53L0X ready!"));
lox.startRangeContinuous();
}
void loop()
{
if (lo<a id="download-csv" download="data.csv">CSVダウンロード</a>In terminal Ubuntu
`docker update --restart=on-failure:10 girouette`
In docker-compose.yml
```
girouette-reload:
image: docker:cli
depends_on:
app:
condition: service_started
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: docker restart girouette
restart: "no"
networks:
- webgateway
```
H
interior design
dairy?
scrarces
tight budget
a world leader
uncludgered
comunity bounds
belonging
I
take off
come up with
black canvas
do up
property ladder
hustle and bustle
J
pebbly beach
chicky - naughty, mischi
seagel
garden court#include <Arduino.h>
#include "esp_camera.h"
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 15
#define SIOD_GPIO_NUM 4
#define SIOC_GPIO_NUM 5
#define Y9_GPIO_NUM 16
#define Y8_GPIO_NUM 17
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 12
#define Y5_GPIO_NUM 10
#define Y4_GPIO_NUM 8
#define Y3_GPIO_NUM 9
#define Y2_GPIO_NUM 11
#define VSYNC_GPIO_NUM 6
#define HREF_GPIO_NUM 7
#define PCLK_GPIO_NUM 13
bool initCamera()
/**
* @param {number[][]} mat
* @param {number[][]} target
* @return {boolean}
*/
var findRotation = function(mat, target) {
const n = mat.length;
// Helper: rotate matrix 90° clockwise
const rotate = (m) => {
const res = Array.from({ length: n }, () => Array(n).fill(0));
for (let i = 0; i < n; i++) {
for (let j = 0; j < n; j++) {
res[j][n - i - 1] = m[i][j];
}
}
return res;
};
// Try all 4 rotationimport React, { useState, useRef, useEffect } from 'react';
import {
View,
Text,
TouchableOpacity,
Image,
ScrollView,
Animated,
Modal,
} from 'react-native';
import { MaterialIcons, Feather, Ionicons } from '@expo/vector-icons';
import * as ImagePicker from 'expo-image-picker';
import "../global.css";
import TopNav from '../components/topNav.jsx';
import BottomNav from '../components/bottomNav.jsx';
import PersonalInfoModal from '../components/PersonalIexport async function DeleteUpdate(id) {
try {
const token = await AsyncStorage.getItem("access");
if (!token) {
throw new Error("Authentication failed!");
}
const response = await fetch(`${API_URL}/api/updates/deleteupdate/${id}`, {
method: "DELETE",
headers: {
"Authorization": `Bearer ${token}`,
}
});
if (response.ok) {
return { success: true };
#define TINY_GSM_MODEM_SIM800
#include <TinyGsmClient.h>
#include <HardwareSerial.h>
#include <Arduino.h>
// Define pins for SIM800
// ESP32 RX (connects to SIM800 TX) -> GPIO 17
// ESP32 TX (connects to SIM800 RX) -> GPIO 16
#define SIM800_RX_PIN 17
#define SIM800_TX_PIN 16
// APN data
const char APN[] = "internet.vivacom.bg"; // CHANGED TO VIVACOM APN because SIM is Vivacom
const char APN_USER[] = "VIVACOM";
const char APN_PASS[] = "VIVACOM";
// SpringBoot server data
const char POST_HOST[export async function EditUpdate(id) { // Patch updates
try {
const token = await AsyncStorage.getItem("access");
if (!token) {
throw new Error("Authentication failed!");
}
const response = await fetch(`${API_URL}/api/updates/updateupdate/${id}`, {
method: "PATCH",
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "application/json"
}
});
export async function GetUpdate(id) { // GET one fetch
try {
const response = await fetch(`${API_URL}/api/updates/getupdate/${id}`, {
method: "GET",
});
if (response.ok) {
const data = await response.json();
return data;
} else {
throw new Error("Failed to get update");
}
} catch (error) {
console.error('Error fetching update:', error);
throw error;
}
}export async function GetUpdates() { // GET many fetch
try {
const response = await fetch(`${API_URL}/api/updates/getall`, {
method: "GET",
});
if (response.ok) {
const data = await response.json();
return data;
} else {
throw new Error("Failed to get updates");
}
} catch (error) {
console.error('Error fetching updates:', error);
throw error;
}
}export async function AddUpdate(title, article, image) {
try {
const token = await AsyncStorage.getItem("access");
if (!token) {
throw new Error("Authentication failed!");
}
const formData = new FormData();
formData.append('title', title);
formData.append('article', article);
const response = await fetch(`${API_URL}/api/updates/createupdate`, {
method: "POST",
headers: {
export async function AddUpdate(title, article, image) {
try {
const token = await AsyncStorage.getItem("access");
if (!token) {
throw new Error("Authentication failed!");
}
if (!image) {
throw new Error("Image is required!");
}
const formData = new FormData();
formData.append('title', title);
formData.append('article', article);
formData.append('image', {
ur