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
{"name":"JS","settings":"{\"settings\":\"{\\r\\n // Suppression de la sauvegarde automatique :\\r\\n \\\"files.autoSave\\\": \\\"off\\\",\\r\\n\\r\\n // Taille des tabulations par défaut :\\r\\n \\\"editor.tabSize\\\": 2,\\r\\n \\\"editor.formatOnSave\\\": false,\\r\\n\\r\\n // Linting & formatting on save :\\r\\n \\\"editor.codeActionsOnSave\\\": {\\r\\n \\\"source.fixAll.eslint\\\": \\\"explicit\\\"\\r\\n },\\r\\n \\\"[prisma]\\\": {\\r\\n \\\"editor.formatOnSave\\\": true,\\r\\n },\\r\\n \\r\\n \\\"editor.wordWrap\\\": \\\"bounded\\\",\\r\\n \\\"editor.wrappingIndent\\\": \\\"indent\\\",\\r\\n \\\"editor.wordWrapColumn\\\": 150,\\r\\n \\r\\n \\\"editor.rulers\\\": [\\r\\n {\\r\\n \\\"column\\\": 150,\\r\\n \\\"color\\\": \\\"#b1b1b127\\\"\\r\\n }\\r\\n ],\\r\\n \\r\\n \\\"javascript.updateImportsOnFileMove.enabled\\\": \\\"always\\\",\\r\\n \\\"typescript.updateImportsOnFileMove.enabled\\\": \\\"always\\\",\\r\\n\\r\\n // Theme :\\r\\n \\\"workbench.colorTheme\\\ |
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
import { ReactElement } from "react"; | |
export const TimeDisplay = (): ReactElement => { | |
const currentHour = new Date().getHours(); | |
const currentMinute = new Date().getMinutes(); | |
const formattedHour = addZero(currentHour); | |
const formattedMinute = addZero(currentMinute); | |
return <p>Current Time: {formattedHour}:{formattedMinute}</p>; |
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
"use client"; | |
import { ReactElement } from "react"; | |
import { useWindowSize } from "usehooks-ts"; | |
export const Child = (): ReactElement => { | |
const { width } = useWindowSize(); | |
const minimize = (wLarge: string, wMobile: string) => { | |
return width < 640 ? wMobile : wLarge; |
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
import type { Dispatch, ReactElement, SetStateAction } from "react"; | |
export type Component<Props> = (props?: Props) => ReactElement; | |
export type AsyncComponent<Props> = (props?: Props) => Promise<ReactElement>; | |
export type NPComponent<> = () => ReactElement; | |
export type NPAsyncComponent<> = () => Promise<ReactElement>; | |
export type SetState<T> = Dispatch<SetStateAction<T>>; |
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
package com.author.appname | |
import android.content.Intent | |
import androidx.core.content.FileProvider | |
import com.facebook.react.bridge.ReactApplicationContext | |
import com.facebook.react.bridge.ReactContextBaseJavaModule | |
import com.facebook.react.bridge.ReactMethod | |
import java.io.File | |
class ApkInstallerModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) { |
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
const colors = { | |
reset: "\x1b[0m", | |
bold: "\x1b[1m", | |
thin: "\x1b[2m", | |
underscore: "\x1b[4m", | |
blink: "\x1b[5m", | |
reverse: "\x1b[7m", | |
hidden: "\x1b[8m", | |
fg: { |
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
import type { PropsWithChildren, ReactElement } from "react"; | |
import { useState } from "react"; | |
import { TouchableWithoutFeedback } from "react-native-gesture-handler"; | |
type DoubleClickableViewProps = { | |
onDoubleClick: () => void; | |
delay?: number; | |
} & PropsWithChildren; | |
export const DoubleClickableView = ({ onDoubleClick, delay = 300, children }: DoubleClickableViewProps): ReactElement => { |
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
You're a coach who's going to give special sports programs to user requests | |
- You must respond in JSON format with a list of steps | |
- There must be no repetition in the steps | |
- There must be at least 3 steps, and you must give them a title, a description (describing the exercise) and a duration in seconds. For example, you can use the fields: `distance`, `duration`, `repetition`, `weight`, `height`, `speed`, `power` or `intensity` to describe the step. | |
> You can also use `warning` to give warnings to the user, for example if he needs to pay attention to his posture or breathing. | |
> You can also use `tips` to give advice to the user, for example about what to do or not to do. | |
- There must be a warm-up step and a stretching step as first and last steps. |
NewerOlder