type Item = {
id: string
name: string
}
const items1: Item[] = [
// npm install date-fns date-fns-tz
import { fromUnixTime, } from 'date-fns';
import { utcToZonedTime, format as utcFormat } from 'date-fns-tz';
// Unix epoch timestamp is a string in milliseconds in UTC
const unixTimestampString = '1692761130000'; // 2023-08-23 03:25:30.000Z
Say you want to parse this date: 2023-05-31 T06:52:03Z
.
Note: This date is non-standard as it has a space
between 31
and T
// npm install date-fns date-fns-tz
import { parseISO } from 'date-fns';
import { utcToZonedTime, format as utcFormat } from 'date-fns-tz';
It's preferable to create an Axios instance in node.js. Why? Because it offers several advantages over using Axios directly. It provides a more flexible, organized, and maintainable way to manage HTTP requests:
When you create an instance, you can set default configurations like base URL, headers, timeouts, etc., that will be applied to all requests made using that instance. This eliminates the need to specify these settings for each request.
Reasons why workflows should be grouped into multiple AWS Logic Apps in order to help improve the development and maintenance lifecycle of workflows.
Grouping workflows by related business process helps you implement, test and deploy a logic app without impacting other logic apps.
In the example above there are three Logic App Standard apps - Orders, Shipment Notification, Overnight Batches - each one with multiple logic app workflows that are used to fulfil a specific business process.
Organizing the logic apps this way, allows changes in the Orders Logic App Standard app to be implemented, tested, and deployed without having any impact on Shipment Notification or Overnight Batches.
- Use concurrency for I/O bound calls (e.g. REST API calls)
- Use parallelizm for CPU bound calls
You're working on a python 3.X codebase. You have a service that has 1,000 TODO IDs. For each TODO IDs, you want to get the TODO details via https://jsonplaceholder.typicode.com/todos/{tod_id}
. How should you fan out the 1,000 calls to the TODO details web api? Which one of these techniques should you use? Either: