When do I use the PHP constant “PHP_EOL”?

Yes, PHP_EOL is ostensibly used to find the newline character in a cross-platform-compatible way, so it handles DOS/Unix issues. Note that PHP_EOL represents the endline character for the current system. For instance, it will not find a Windows endline when executed on a unix-like system.

What is the difference between allFile and allMarkdownRemark in gatsby

It always depends on your filesystem and how it is set up. The short answer is that allFile retrieves all kind of files (images, markdowns, JSONs, etc) set in your gatsby-source-filesystem while allMarkdownRemark only fetches the markdown files because a transformer plugin has previously created a specific node to do so. allMarkdownRemark, of course, is more specific and has better performance, … Read more

How to UPSERT (MERGE, INSERT … ON DUPLICATE UPDATE) in PostgreSQL?

9.5 and newer: PostgreSQL 9.5 and newer support INSERT … ON CONFLICT (key) DO UPDATE (and ON CONFLICT (key) DO NOTHING), i.e. upsert. Comparison with ON DUPLICATE KEY UPDATE. Quick explanation. For usage see the manual – specifically the conflict_action clause in the syntax diagram, and the explanatory text. Unlike the solutions for 9.4 and older that are given below, this feature works with … Read more

Does != have meaning in OCaml?

you have experienced the difference between structural and physical equality. <> is to = (structural equality) as != is to == (physical equality) is false because each is instantiated in different memory locations, doing: Most of the time you’ll want to use = and <>. edit about when structural and physical equality are equivalent: You can use the what_is_it function and find out all the types that … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)