import React, { useEffect } from "react";
export default function Buymeacoffee() {
useEffect(() => {
const script = document.createElement("script");
const div = document.getElementById("supportByBMC");
script.setAttribute("data-name", "BMC-Widget");
script.src = "https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js";
script.setAttribute("data-id", "evavic44");| // from: https://gist.github.com/MichaelDrogalis/37af55273ea17f3255c750ae60fc98d4 | |
| import java.util.List; | |
| public class Java23Example { | |
| record Person(String name, int age) {} | |
| public static void main(String[] args) { | |
| var people = List.of( | |
| new Person("Alice", 30), |
After months of discussions in a dedicated group, it's clear to me NodeJS is still stuck in finding a way to deliver native ESM to its users.
The "usual few" won't hear anything different from .mjs, but .mjs has been demonstrated to be not a solution neither.
Following few cases not covered by .mjs:
- evaluation of any string, via CLI, or on demand, where there is no extension
- tools that convert their syntax into JS, since it always worked to date (thanks to transpilers, bundlers, and loaders)
| { | |
| /* | |
| // Place your snippets for PureScript here. Each snippet is defined under a snippet name and has a prefix, body and | |
| // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
| // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
| // same ids are connected. | |
| // Example: | |
| "Print to console": { | |
| "prefix": "log", | |
| "body": [ |
| function translateError(msg) { | |
| var newErr = new Error(msg); // placed here to get correct stack | |
| return e => { | |
| newErr.originalError = e; | |
| throw newErr; | |
| } | |
| } | |
| async function asyncTask() { | |
| const user = await UserModel.findById(1).catch(translateError('No user found')) |
Should be work with 0.18
Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !
myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))| # Since React has made jQuery obsolete for me, I use $ to replace JSX. | |
| window.$ = React.create-element | |
| for key, value of React.DOM | |
| window."$#key" = value | |
| # And here's an example of a render function using this syntax. | |
| render: -> | |
| $ Jumbotron, style: styles.welcome.base, [ | |
| $h2 key: \tagline, 'this is a catchy tagline' | |
| $p key: \mission, 'here is a short mission statement, expanding on the tagline' |
| // General hints on defining types with constraints or invariants | |
| // | |
| // Just as in C#, use a private constructor | |
| // and expose "factory" methods that enforce the constraints | |
| // | |
| // In F#, only classes can have private constructors with public members. | |
| // | |
| // If you want to use the record and DU types, the whole type becomes | |
| // private, which means that you also need to provide: | |
| // * a constructor function ("create"). |
Je m’appelle Thibaut Assus, j’ai 30 ans, je suis freelance en développement web et ma technologie de prédilection est le Ruby on Rails. J’ai maintenant un peu d’expérience dans le domaine du freelancing et ce document a pour but de partager avec vous une partie de cette expérience.