See how a minor change to your commit message style can make a difference. Examples
Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs
| import pymysql | |
| import requests | |
| from datetime import datetime, timedelta | |
| # Function to send a POST request for scheduling a notification | |
| def send_notification(event_date, event_id, notification_type): | |
| # Adjust the URL and payload as per your Firebase or push notification service | |
| print(f"Event scheduled for: {event_date}") | |
| url = 'https://your-firebase-url.com/schedule-notification' | |
| payload = { |
| import { INestApplication, Injectable, OnModuleInit } from '@nestjs/common'; | |
| import { PrismaClient } from '@prisma/client'; | |
| @Injectable() | |
| export class PrismaService extends PrismaClient | |
| implements OnModuleInit { | |
| async onModuleInit() { | |
| await this.$connect(); | |
| } |
See how a minor change to your commit message style can make a difference. Examples
Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs
| { | |
| // ... | |
| "scripts": { | |
| "start": "craco start", | |
| "build": "craco build", | |
| "test": "craco test", | |
| "eject": "react-scripts eject" | |
| }, | |
| } |
| // craco.config.js | |
| module.exports = { | |
| style: { | |
| postcss: { | |
| plugins: [ | |
| require('tailwindcss'), | |
| require('autoprefixer'), | |
| ], | |
| }, | |
| }, |
| import React from "react"; | |
| import { useField } from "formik"; | |
| const CustomInput = ({ label, ...props }) => { | |
| const [field, meta] = useField(props); | |
| return ( | |
| <div className="flex flex-col text-left"> | |
| {label && <label htmlFor={props.id || props.name}>{label}</label>} | |
| <input |
| --- | |
| METHOD 1 | |
| This should roughly sort the items on distance in MySQL, and should work in SQLite. | |
| If you need to sort them preciser, you could try using the Pythagorean theorem (a^2 + b^2 = c^2) to get the exact distance. | |
| --- | |
| SELECT * | |
| FROM table | |
| ORDER BY ((lat-$user_lat)*(lat-$user_lat)) + ((lng - $user_lng)*(lng - $user_lng)) ASC |
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| import axios from "axios"; | |
| const baseURL = process.env.API_URL | |
| ? process.env.API_URL | |
| : "http://127.0.0.1:8000/api/v1/"; | |
| const axiosInstance = axios.create({ | |
| baseURL: baseURL, | |
| timeout: 5000, | |
| headers: { |