Ferromagnetism Updated +Created
The wiki comments: en.wikipedia.org/w/index.php?title=Ferromagnetism&oldid=965600553#Explanation
The Bohr-van Leeuwen theorem, discovered in the 1910s, showed that classical physics theories are unable to account for any form of magnetism, including ferromagnetism. Magnetism is now regarded as a purely quantum mechanical effect. Ferromagnetism arises due to two effects from quantum mechanics: spin and the Pauli exclusion principle.
Feynman diagram Updated +Created
I think they are a tool to calculate the probability of different types of particle decays and particle collision outcomes. TODO Minimal example of that.
And they can be derived from a more complete quantum electrodynamics formulation via perturbation theory.
At Richard Feynman Quantum Electrodynamics Lecture at University of Auckland (1979), an intuitive explanation of them in termes of sum of products of propagators is given.
Feynman was a huge womanizer during a certain period of his life Updated +Created
Feynman became a terrible womanizer after his first wife Arline Greenbaum died, involving himself with several married women, and leading to at least two abortions according to Genius: Richard Feynman and Modern Physics by James Gleick (1994).
Ciro Santilli likes to think that he is quite liberal and not a strict follower of Christian morals, but this one shocked him slightly even. Feynman could be a God, but he could also be a dick sometimes.
One particular case that stuck to Ciro Santilli's mind, partly because he is Brazilian, is when Feynman was in Brazil, he had a girlfriend called Clotilde that called him "Ricardinho", which means "Little Richard"; -inho is a diminutive suffix in Portuguese, and also indicates affection. At some point he even promised to take her back to the United States, but didn't in the end, and instead came back and married his second wife in marriage that soon failed.
Richard's third and final wife, Gweneth Howarth, seemed a good match for him though. When they started courting, she made it very clear that Feynman should decide if he wanted her or not soon, because she had other options available and being actively tested. Fight fire with fire.
Fick's laws of diffusion Updated +Created
Field-effect transistor Updated +Created
Field (mathematics) Updated +Created
A ring where multiplication is commutative and there is always an inverse.
A field can be seen as an Abelian group that has two group operations defined on it: addition and multiplication.
And then, besides each of the two operations obeying the group axioms individually, and they are compatible between themselves according to the distributive property.
Basically the nicest, least restrictive, 2-operation type of algebra.
Fifth Solvay Conference (1927) Updated +Created
Fighting game Updated +Created
graphviz/node.dot Updated +Created
graphviz/quotes.dot Updated +Created
File manager Updated +Created
nodejs/sequelize/parallel_select_and_update.js Updated +Created
This example is the same as nodejs/sequelize/raw/parallel_select_and_update.js, but going through Sequelize rather than with Sequelize raw queries. NONE is not supported for now to not have a transaction at all because lazy.
Sample invocation:
node --unhandled-rejections=strict ./parallel_select_and_update.js p 10 100 READ_COMMITTED UPDATE
where:
Other examples:
  • node --unhandled-rejections=strict ./parallel_select_and_update.js p 10 100 READ_COMMITTED UPDATE
Then, the outcome is exactly as described at: nodejs/sequelize/raw/parallel_select_and_update.js:
nodejs/sequelize/raw/parallel_select_and_update_deterministic.js Updated +Created
This example contains a deterministic demo of when postgreSQL serialization failures may happen.
Tested on PostgreSQL 13.5.
nodejs/sequelize/raw/parallel_select_and_update.js Updated +Created
This example is similar to nodejs/sequelize/raw/parallel_update_async.js, but now we are doing a separate SELECT, later followed by an update:
  • SELECT FROM to get i
  • update on Js code newI = i + 1
  • UPDATE SET the newI
Although this specific example is useless in itself, as we could just use UPDATE "MyInt" SET i = i + 1 as in nodejs/sequelize/raw/parallel_update_async.js, which automatically solves any concurrency issue, this kind of code could be required for example if the update was a complex function not suitably implemented in SQL, or if the update depends on some external data source.
Sample execution:
node --unhandled-rejections=strict ./parallel_select_and_update.js p 2 10 'READ COMMITTED'
which does:
Another one:
node --unhandled-rejections=strict ./parallel_select_and_update.js p 2 10 'READ COMMITTED' 'FOR UPDATE'
this will run SELECT FOR UPDATE rather than just SELECT
Observed behaviour under different SQL transaction isolation levels:
  • READ COMMITTED: fails. Nothing in this case prevents:
    • thread 1: SELECT, obtains i = 0
    • thread 2: SELECT, obtains i = 0
    • thread 2: newI = 1
    • thread 2: UPDATE i = 1
    • thread 1: newI = 1
    • thread 1: UPDATE i = 1
  • REPEATABLE READ: works. the manual mentions that if multiple concurrent updates would happen, only the first commit succeeds, and the following ones fail and rollback and retry, therefore preventing the loss of an update.
  • READ COMMITTED + SELECT FOR UPDATE: works. And does not do rollbacks, which probably makes it faster. With p 10 100, REPEATABLE READ was about 4.2s and READ COMMITTED + SELECT FOR UPDATE 3.2s on Lenovo ThinkPad P51 (2017).
    SELECT FOR UPDATE should be enough as mentioned at: www.postgresql.org/docs/13/explicit-locking.html#LOCKING-ROWS
    FOR UPDATE causes the rows retrieved by the SELECT statement to be locked as though for update. This prevents them from being locked, modified or deleted by other transactions until the current transaction ends. That is, other transactions that attempt UPDATE, DELETE, SELECT FOR UPDATE, SELECT FOR NO KEY UPDATE, SELECT FOR SHARE or SELECT FOR KEY SHARE of these rows will be blocked until the current transaction ends; conversely, SELECT FOR UPDATE will wait for a concurrent transaction that has run any of those commands on the same row, and will then lock and return the updated row (or no row, if the row was deleted). Within a REPEATABLE READ or SERIALIZABLE transaction, however, an error will be thrown if a row to be locked has changed since the transaction started. For further discussion see Section 13.4.
A non-raw version of this example can be seen at: nodejs/sequelize/parallel_select_and_update.js.
nodejs/sequelize/raw/parallel_select_and_update.js Updated +Created
Gibbs free energy Updated +Created
TODO understand more intuitively how that determines if a reaction happens or not.
At least from the formula we see that:
  • the more exothermic, the more likely it is to occur
  • if the entropy increases, the higher the temperature, the more likely it is to occur
    • otherwise, the lower the temperature the more likely it is to occur
A prototypical example of reaction that is exothermic but does not happen at any temperature is combustion.
Video 1.
Lab 7 - Gibbs Free Energy by MJ Billman (2020)
Source. Shows the shift of equilibrium due to temperature change with a color change in a HCl CoCl reaction. Unfortunately there are no conclusions because its student's homework.
nodejs/sequelize/raw/trigger_count.js Updated +Created
In this example we cache track the number of posts per user on a cache column.

Unlisted articles are being shown, click here to show only listed articles.